Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.cand tweaked it intosrc/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
src/pk/ec25519/tweetnacl.csrc/pk/ec448/ec448_common.csrc/pk/ec25519/ec25519_export.csrc/pk/ec448/ec448_export.csrc/pk/ec25519/ec25519_import_pkcs8.csrc/pk/ec448/ec448_import_pkcs8.csrc/pk/ec25519/ec25519_crypto_ctx.csrc/pk/ec448/ec448_crypto_ctx.csrc/pk/ed25519/ed25519_make_key.csrc/pk/ed448/ed448_make_key.csrc/pk/ed25519/ed25519_export.csrc/pk/ed448/ed448_export.csrc/pk/ed25519/ed25519_import.csrc/pk/ed448/ed448_import.csrc/pk/ed25519/ed25519_import_raw.csrc/pk/ed448/ed448_import_raw.csrc/pk/ed25519/ed25519_import_x509.csrc/pk/ed448/ed448_import_x509.csrc/pk/ed25519/ed25519_import_pkcs8.csrc/pk/ed448/ed448_import_pkcs8.csrc/pk/ed25519/ed25519_sign.csrc/pk/ed448/ed448_sign.csrc/pk/ed25519/ed25519_verify.csrc/pk/ed448/ed448_verify.csrc/pk/x25519/x25519_make_key.csrc/pk/x448/x448_make_key.csrc/pk/x25519/x25519_export.csrc/pk/x448/x448_export.csrc/pk/x25519/x25519_import.csrc/pk/x448/x448_import.csrc/pk/x25519/x25519_import_raw.csrc/pk/x448/x448_import_raw.csrc/pk/x25519/x25519_import_x509.csrc/pk/x448/x448_import_x509.csrc/pk/x25519/x25519_import_pkcs8.csrc/pk/x448/x448_import_pkcs8.csrc/pk/x25519/x25519_shared_secret.csrc/pk/x448/x448_shared_secret.ctests/ed25519_test.ctests/ed448_test.ctests/x25519_test.ctests/x448_test.cEdDSA APIs
ed25519_make_keyed448_make_keyed25519_exported448_exported25519_imported448_imported25519_import_rawed448_import_rawed25519_import_x509ed448_import_x509ed25519_import_pkcs8ed448_import_pkcs8ed25519_signed448_signed25519ctx_signed448ctx_signed25519ph_signed448ph_signed25519_verifyed448_verifyed25519ctx_verifyed448ctx_verifyed25519ph_verifyed448ph_verifyDH APIs
x25519_make_keyx448_make_keyx25519_exportx448_exportx25519_importx448_importx25519_import_rawx448_import_rawx25519_import_x509x448_import_x509x25519_import_pkcs8x448_import_pkcs8x25519_shared_secretx448_shared_secretChecklist