Skip to content

Ed448 + X448#722

Open
karel-m wants to merge 2 commits intodevelopfrom
pr/ed448-x448-attempt3
Open

Ed448 + X448#722
karel-m wants to merge 2 commits intodevelopfrom
pr/ed448-x448-attempt3

Conversation

@karel-m
Copy link
Copy Markdown
Member

@karel-m karel-m commented Apr 14, 2026

Implemented Ed448 / X448 support

Since I could not find any reasonable CC0/public-domain reference implementation for Ed448 + X448, I took the existing src/pk/ec25519/tweetnacl.c and tweaked it into src/pk/ec448/ec448_common.c (yes, this is a custom implementation with the usual caveats around performance, security and other potential issues).

So it more or less blindly follows the existing Ed25519 / X25519 code and is basically a 1:1 adaptation - for any issues in the 448 part, the 25519 author is probably the more appropriate target of blame :)

File layout

Area 25519 448
Shared internal layer src/pk/ec25519/tweetnacl.c src/pk/ec448/ec448_common.c
src/pk/ec25519/ec25519_export.c src/pk/ec448/ec448_export.c
src/pk/ec25519/ec25519_import_pkcs8.c src/pk/ec448/ec448_import_pkcs8.c
src/pk/ec25519/ec25519_crypto_ctx.c src/pk/ec448/ec448_crypto_ctx.c
Ed* public functions src/pk/ed25519/ed25519_make_key.c src/pk/ed448/ed448_make_key.c
src/pk/ed25519/ed25519_export.c src/pk/ed448/ed448_export.c
src/pk/ed25519/ed25519_import.c src/pk/ed448/ed448_import.c
src/pk/ed25519/ed25519_import_raw.c src/pk/ed448/ed448_import_raw.c
src/pk/ed25519/ed25519_import_x509.c src/pk/ed448/ed448_import_x509.c
src/pk/ed25519/ed25519_import_pkcs8.c src/pk/ed448/ed448_import_pkcs8.c
src/pk/ed25519/ed25519_sign.c src/pk/ed448/ed448_sign.c
src/pk/ed25519/ed25519_verify.c src/pk/ed448/ed448_verify.c
X* public functions src/pk/x25519/x25519_make_key.c src/pk/x448/x448_make_key.c
src/pk/x25519/x25519_export.c src/pk/x448/x448_export.c
src/pk/x25519/x25519_import.c src/pk/x448/x448_import.c
src/pk/x25519/x25519_import_raw.c src/pk/x448/x448_import_raw.c
src/pk/x25519/x25519_import_x509.c src/pk/x448/x448_import_x509.c
src/pk/x25519/x25519_import_pkcs8.c src/pk/x448/x448_import_pkcs8.c
src/pk/x25519/x25519_shared_secret.c src/pk/x448/x448_shared_secret.c
Tests tests/ed25519_test.c tests/ed448_test.c
tests/x25519_test.c tests/x448_test.c

EdDSA APIs

25519 448
ed25519_make_key ed448_make_key
ed25519_export ed448_export
ed25519_import ed448_import
ed25519_import_raw ed448_import_raw
ed25519_import_x509 ed448_import_x509
ed25519_import_pkcs8 ed448_import_pkcs8
ed25519_sign ed448_sign
ed25519ctx_sign ed448ctx_sign
ed25519ph_sign ed448ph_sign
ed25519_verify ed448_verify
ed25519ctx_verify ed448ctx_verify
ed25519ph_verify ed448ph_verify

DH APIs

25519 448
x25519_make_key x448_make_key
x25519_export x448_export
x25519_import x448_import
x25519_import_raw x448_import_raw
x25519_import_x509 x448_import_x509
x25519_import_pkcs8 x448_import_pkcs8
x25519_shared_secret x448_shared_secret

Checklist

  • documentation is added or updated
  • tests are added or updated

@karel-m karel-m requested a review from sjaeckel April 14, 2026 14:42
@sjaeckel sjaeckel added this to the next milestone Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants