NewHope provides post-quantum Ring-LWE-based key exchange between two peers.
This is a reference version, which uses SHA3. See newhopeaessha module for the BoringSSL-compatible implementation, which uses AES-SHA256.
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.
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