Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Ed25519 support #35

Merged
merged 2 commits into from
Jul 15, 2020
Merged

Ed25519 support #35

merged 2 commits into from
Jul 15, 2020

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Jul 15, 2020

this PR adds Hacl_ed25519, and imports the C source from the same commit and branch. Ed25519 can be used by at least ssh private keys and X.509 certificates -- here the primitives "generate key", "sign", and "verify" are provided, to be used by libraries doing actual decoding / encoding.

The tests from RFC 8032 are copy and pasted into a separate test module (I did not understand how the current test suite is supposed to be run / executed).

Sponsored by Nitrokey GmbH

hannesm added 2 commits July 15, 2020 16:24
also, OCaml boilerplate and test cases for Ed25519

Sponsored by Nitrokey GmbH
Copy link
Member

@dinosaure dinosaure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmhmm it's a bit annoying, can you reuse C files extracted and used by hacl-star-raw? Upstream fixed several bugs and we should fallback them into this package. On my side, I did the extraction for Curve25519 to properly fix #34. I will propose a PR at the end of this day.

EDIT: hacl-star-raw.0.2.1

@hannesm
Copy link
Member Author

hannesm commented Jul 15, 2020

@dinosaure this is the minimum path for ed25519 support (using the very same commit of extracted hacl as done in curve_25519), it does not fix 32 bit support, neither use an updated extraction from hacl. I agree that this could be done, but IMHO deserves a separate PR. I agree that #19 and #20 should be improved. The test vectors from 8032 - part of this PR - are useful for updating the extraction as well.

@dinosaure
Copy link
Member

Ok, in any case, I did the extraction so I will integrate the new version of Ed25519 too in a separate PR.

@dinosaure dinosaure merged commit 80519e5 into mirage:master Jul 15, 2020
@dinosaure dinosaure mentioned this pull request Jul 24, 2020
hannesm added a commit to hannesm/opam-repository that referenced this pull request Jul 28, 2020
CHANGES:

- interface and expose Ed25519 code in the Hacl_ed25519 module (mirage/hacl#35 @hannesm)
- update C code to hacl-star-raw 0.2.1, adds 32 bit support (mirage/hacl#36 @dinosaure)
- provide Hacl_x25519.encode_secret and Hacl_ed25519.encode_priv (mirage/hacl#41 @hannesm)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants