Skip to content

Commit 654eb53

Browse files
committed
x448: Initial import
1 parent e6c6f8c commit 654eb53

File tree

5 files changed

+584
-1
lines changed

5 files changed

+584
-1
lines changed

.github/workflows/x448.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: x448
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/x448.yml"
7+
- "ed448-goldilocks/**"
8+
- "x448/**"
9+
- "Cargo.*"
10+
push:
11+
branches: master
12+
13+
defaults:
14+
run:
15+
working-directory: x448
16+
17+
env:
18+
CARGO_INCREMENTAL: 0
19+
RUSTFLAGS: "-Dwarnings"
20+
RUSTDOCFLAGS: "-Dwarnings"
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
rust:
28+
- 1.85.0 # MSRV
29+
- stable
30+
target:
31+
- thumbv7em-none-eabi
32+
- wasm32-unknown-unknown
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: dtolnay/rust-toolchain@master
36+
with:
37+
toolchain: ${{ matrix.rust }}
38+
targets: ${{ matrix.target }}
39+
- run: cargo build --target ${{ matrix.target }} --release
40+
41+
test:
42+
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
include:
46+
# 32-bit Linux
47+
- target: i686-unknown-linux-gnu
48+
rust: 1.85.0 # MSRV
49+
deps: sudo apt update && sudo apt install gcc-multilib
50+
- target: i686-unknown-linux-gnu
51+
rust: stable
52+
deps: sudo apt update && sudo apt install gcc-multilib
53+
54+
# 64-bit Linux
55+
- target: x86_64-unknown-linux-gnu
56+
rust: 1.85.0 # MSRV
57+
- target: x86_64-unknown-linux-gnu
58+
rust: stable
59+
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: dtolnay/rust-toolchain@master
63+
with:
64+
toolchain: ${{ matrix.rust }}
65+
targets: ${{ matrix.target }}
66+
- uses: RustCrypto/actions/cargo-hack-install@master
67+
- run: ${{ matrix.deps }}
68+
- run: cargo test --release --target ${{ matrix.target }}
69+
70+
cross:
71+
strategy:
72+
matrix:
73+
include:
74+
# ARM32
75+
- target: armv7-unknown-linux-gnueabihf
76+
rust: 1.85.0 # MSRV (cross)
77+
- target: armv7-unknown-linux-gnueabihf
78+
rust: stable
79+
80+
# ARM64
81+
- target: aarch64-unknown-linux-gnu
82+
rust: 1.85.0 # MSRV (cross)
83+
- target: aarch64-unknown-linux-gnu
84+
rust: stable
85+
86+
# PPC32
87+
- target: powerpc-unknown-linux-gnu
88+
rust: 1.85.0 # MSRV (cross)
89+
- target: powerpc-unknown-linux-gnu
90+
rust: stable
91+
92+
runs-on: ubuntu-latest
93+
steps:
94+
- uses: actions/checkout@v4
95+
- run: ${{ matrix.deps }}
96+
- uses: dtolnay/rust-toolchain@master
97+
with:
98+
toolchain: ${{ matrix.rust }}
99+
targets: ${{ matrix.target }}
100+
- uses: RustCrypto/actions/cross-install@master
101+
- run: cross test --release --target ${{ matrix.target }}
102+
103+
doc:
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@v4
107+
- uses: RustCrypto/actions/cargo-cache@master
108+
- uses: dtolnay/rust-toolchain@master
109+
with:
110+
toolchain: stable
111+
- run: cargo doc

Cargo.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ members = [
1414
"p521",
1515
"primefield",
1616
"primeorder",
17-
"sm2"
17+
"sm2",
18+
"x448"
1819
]
1920

2021
[profile.dev]
2122
opt-level = 2
2223

2324
[patch.crates-io]
25+
ed448-goldilocks = { path = "ed448-goldilocks" }
2426
hash2curve = { path = "hash2curve" }
2527
primefield = { path = "primefield" }
2628
primeorder = { path = "primeorder" }

x448/Cargo.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "x448"
3+
version = "0.7.0-pre"
4+
authors = ["RustCrypto Developers"]
5+
categories = ["cryptography"]
6+
keywords = ["cryptography", "crypto", "x448", "diffie-hellman", "curve448",]
7+
homepage = "https://docs.rs/x448/"
8+
repository = "https://github.com/RustCrypto/elliptic-curves/tree/master/x448"
9+
documentation = "https://docs.rs/ed448-goldilocks"
10+
license = "BSD-3-Clause"
11+
edition = "2024"
12+
rust-version = "1.85"
13+
readme = "README.md"
14+
description = "A pure-Rust implementation of X448."
15+
16+
[dependencies]
17+
ed448-goldilocks = { version = "0.14.0-pre.0", default-features = false }
18+
rand_core = { version = "0.9", default-features = false }
19+
20+
[dependencies.zeroize]
21+
version = "1"
22+
default-features = false
23+
features = ["zeroize_derive"]
24+
25+
[dev-dependencies]
26+
rand = "0.9"

0 commit comments

Comments
 (0)