Skip to content

x448: initial import #1250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions .github/workflows/x448.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: x448

on:
pull_request:
paths:
- ".github/workflows/x448.yml"
- "ed448-goldilocks/**"
- "x448/**"
- "Cargo.*"
push:
branches: master

defaults:
run:
working-directory: x448

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.85.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --release

test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.85.0 # MSRV
deps: sudo apt update && sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt update && sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.85.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: ${{ matrix.deps }}
- run: cargo test --release --target ${{ matrix.target }}

cross:
strategy:
matrix:
include:
# ARM32
- target: armv7-unknown-linux-gnueabihf
rust: 1.85.0 # MSRV (cross)
- target: armv7-unknown-linux-gnueabihf
rust: stable

# ARM64
- target: aarch64-unknown-linux-gnu
rust: 1.85.0 # MSRV (cross)
- target: aarch64-unknown-linux-gnu
rust: stable

# PPC32
- target: powerpc-unknown-linux-gnu
rust: 1.85.0 # MSRV (cross)
- target: powerpc-unknown-linux-gnu
rust: stable

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ${{ matrix.deps }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cross-install@master
- run: cross test --release --target ${{ matrix.target }}

doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo doc
25 changes: 25 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ members = [
"p521",
"primefield",
"primeorder",
"sm2"
"sm2",
"x448"
]

[profile.dev]
Expand All @@ -24,6 +25,7 @@ opt-level = 2
ecdsa = { git = "https://github.com/RustCrypto/signatures.git" }
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git" }

ed448-goldilocks = { path = "ed448-goldilocks" }
hash2curve = { path = "hash2curve" }
primefield = { path = "primefield" }
primeorder = { path = "primeorder" }
26 changes: 26 additions & 0 deletions x448/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "x448"
version = "0.7.0-pre"
authors = ["RustCrypto Developers"]
categories = ["cryptography"]
keywords = ["cryptography", "crypto", "x448", "diffie-hellman", "curve448",]
homepage = "https://docs.rs/x448/"
repository = "https://github.com/RustCrypto/elliptic-curves/tree/master/x448"
documentation = "https://docs.rs/ed448-goldilocks"
license = "Apache-2.0 OR MIT"
edition = "2024"
rust-version = "1.85"
readme = "README.md"
description = "A pure-Rust implementation of X448."

[dependencies]
ed448-goldilocks = { version = "0.14.0-pre.0", default-features = false }
rand_core = { version = "0.9", default-features = false }

[dependencies.zeroize]
version = "1"
default-features = false
features = ["zeroize_derive"]

[dev-dependencies]
rand = "0.9"
Loading