GaloisInc / cryptol-specs

A central repository for specifications of cryptographic algorithms in Cryptol
BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

Prepare to add ECDH #121

Closed marsella closed 2 weeks ago

marsella commented 4 weeks ago

We want to have a version of elliptic-curve Diffie-Hellman, as standardized in NIST SP 800-56A revision 3. There are several versions (not sure yet how all the models are different; one thing is key durability but maybe others):

Some initial poking around suggests that this might need to be broken into multiple issues / PRs: one to set up key management (association with curves, distinguishing between ephemeral and static keys, maybe generation?), one to implement other preliminaries and the ECDH primitive, and maybe a third to do all the different models.

kiniry commented 3 weeks ago

I provided my input on this topic in today's MTV meeting, but we should also get input from @weaversa as well.

weaversa commented 3 weeks ago

I provided my input on this topic in today's MTV meeting, but we should also get input from @weaversa as well.

I've only ever attempted 186-5. This is new territory for me. Let me suggest you keep the CAVP and KASVS specific to 800-56A in mind, ensuring that the invariants laid out are adhered to (when possible) and documented regardless. Also, providing interfaces to the provided test suites will be beneficial.

marsella commented 3 weeks ago

I read through most of the spec (800-56A). Here are my notes:


Per offline discussion, we decided on the following priorities:

I'll write a follow-up issue to handle the ECDH primitive and basic key representation and leave the rest here for now.

marsella commented 2 weeks ago

Closing this as we don't have concrete plans to continue adding the key agreement schemes or any other items right now. Can reopen if / when we decide to do so.