NewHope provides post-quantum Ring-LWE-based key exchange between two peers.
One peer generates an "offer message"" by calling offer(), and sends it to the other peer. The other peer accepts the offer and generates "accept message" by calling accept() with the received offer message. It then send the result to the first peer, which calls finish(). After completing these steps, both peers call getSharedKey() to get the established shared key.
This is a reference version, which uses SHAKE-128 and SHA-3-256. You can create a custom version by requiring "lib/custom" and extending CustomNewHope class.
Erdem Alkim, Léo Ducas, Thomas Pöppelmann, and Peter Schwabe: Post-quantum key exchange – a new hope.
Checks the offer message and returns an accept message.
Checks the accept message and generates shared key, which can be retrieved using getSharedKey().
Returns an offer message.
Optional public seed must have PUBLIC_SEED_LENGTH random bytes. If not provided, it's generated using randomBytes.
Generated using TypeDoc