main
Raw Download raw file
 1/*
 2Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.
 3
 4Validation of public keys.
 5
 6The Diffie-Hellman function, as described in RFC-7748 [1], works for any
 7public key. However, if a different protocol requires contributory
 8behaviour [2,3], then the public keys must be validated against low-order
 9points [3,4]. To do that, the Shared function performs this validation
10internally and returns false when the public key is invalid (i.e., it
11is a low-order point).
12
13References:
14  - [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
15  - [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
16  - [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
17  - [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)
18*/
19package x25519