Implement SPAKE2 (for I1024) #3
Merged
Conversation
Much input derived from a PR to implement this for Javascript: bitwiseshiftleft/sjcl#273
Includes full-ish `createSessionKey` implementation
Also implement our own Group, but it's a really crappy one that must not be used for cryptography.
Doesn't pass, but at least doesn't crash due to `notImplemented`
I1024 only one provided so far Update interop to use i1024 group A better test of interoperability. Still fails.
Gives us more control for doing experiments.
- capital "M" etc. for seed - correct HKDF information (remove a space) - do modulo arithmetic correctly to get byte size - hash session key elements as byte digests, not as hex digests Unrelated - export `elementSizeBytes` (for testing) - derive Eq, Show for group (for testing) - refactor arbitraryElement (for easier comparison with Python)
A lot has been learned, so a lot of the documentation can be summarised. This isn't as good as it could be, but hopefully more will follow.
Merged
I'm going to merge this now. I'd still really like feedback, especially on:
And, for @exarkun in particular, I'd be happy to answer any questions about Haskell things that are strange or unfamiliar. |
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.
A "working" implementation of SPAKE2 with the I1024 group.
Group
typeclass and implements it for theIntegerGroup
that's in the Python implementationThis is ready to merge, IMO.
Future work: