Add Chacha20 cipher, and poly1305 mac - #72
Closed
hannesm wants to merge 3 commits into
Closed
Conversation
dinosaure
approved these changes
Jun 26, 2020
Member
Author
|
A second commit adds the poly1305 mac. Another extension (AEAD construction of poy1305/chacha20) is on its way. I'm curious about feedback in respect to the 1305 interface. NB: manually ensured that 598fd89 compiles (and test run) fine on a 32bit switch. |
Member
Author
|
that's it, again ensured manually that 036c143 compiles and works on a 32bit switch. |
Differences include: - OCaml API (no separate expand and encrypt/decrypt), - support for IETF mode (nonce 12 bytes, counter 32bit) - reduced allocation overhead
This mostly fits into a hash algorithm, but only computes a mac. The difference is that val empty has a key argument to initialize the context. This is based on https://github.com/floodyberry/poly1305-donna.git
dinosaure
approved these changes
Jun 29, 2020
dinosaure
left a comment
Member
There was a problem hiding this comment.
Redo my approval with changes.
hannesm
added a commit
to hannesm/opam-repository
that referenced
this pull request
Jul 2, 2020
…mirage-crypto-rng-mirage (0.8.1) CHANGES: * Add Chacha20 implementation (based on abeaumont/ocaml-chacha), supporting both DJB's original specification (nonce 64 bit, counter 64 bit) and IETF (RFC 8439: nonce 96 bit, counter 32 bit) (mirage/mirage-crypto#72 @hannesm) * Add Poly1305 implementation based on floodyberry/poly1305-donna (mirage/mirage-crypto#72 @hannesm) * Unified AEAD module type, implemented by CCM, GCM, and Chacha20/Poly1305 The functions "authenticate_encrypt" and "authenticate_decrypt" are defined, which append (encrypt) and check equality (decrypt, using Eqaf for constant-time comparison) the authentication tag directly. Breaking changes: - GCM "~iv" is now "~nonce" - GCM encrypt returns the encrypted data and authentication tag appended - GCM decrypt returns the plaintext as option (None on authentication failure) (mirage/mirage-crypto#73 @hannesm)
avsm
pushed a commit
to avsm/mirage-crypto
that referenced
this pull request
Jul 14, 2020
Add Chacha20 cipher, and poly1305 mac
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.
Differences include: