Skip to content
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

ed448: Ed448 Implementation #727

Merged
merged 11 commits into from
Oct 15, 2023
Merged

Conversation

ashWhiteHat
Copy link
Contributor

Part of #8

Hi there.
I implemented ed448.

Implementation and documentation are aligned with ed25519 implementation.

What I did

  • hex display and serialization
  • pkcs v1 private/public key encoding and decoding
  • seder serializers and deserializers

Issues

I don't know how to convert pkcs v1 to v2 format so I couldn't implement pkcs v2 enc/dec.

discussion

code duplication

Ed448 implementation is almost the same as Ed25519.
There is huge code duplication.
PublicKeyBytes is only the difference between Ed448 and Ed25519.

In Ed25519, the public key bytes length is 32, and type [u8; 32] supports Default.
However, in Ed448, the public key bytes length is 57, and type [u8; 57] doesn't support Default.
I implemented PublicKeyBytes as a struct in Ed448.

If we integrate both formats, we would be able to implement them as a macro.

crate name

ed448 crate was already taken. I would like to know what name we should name.

Todo

  • support pkcs v2
  • ignore code duplication or not
  • decide crate name

I would appreciate it if you could confirm.
Thank you.

ed448/Cargo.toml Outdated Show resolved Hide resolved
@tarcieri tarcieri merged commit d9c304c into RustCrypto:master Oct 15, 2023
37 checks passed
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