Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key validation #53

Merged
merged 1 commit into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions dh/x25519/doc.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
// Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.
//
// References:
// - RFC7748 https://rfc-editor.org/rfc/rfc7748.txt
// - Curve25519 https://cr.yp.to/ecdh.html
//
// Validation of public keys.
//
// The Diffie-Hellman function, as described in RFC-7748, works for any public
// key. However, if a different protocol requires contributory behaviour, then
// the public keys must be validated against low-order points. To do that, the
// Shared function performs this validation internally and returns false when
// the public key is invalid (i.e., it is a low-order point).
// See https://cr.yp.to/ecdh.html#validate.
/*
Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.

Validation of public keys.

The Diffie-Hellman function, as described in RFC-7748 [1], works for any
public key. However, if a different protocol requires contributory
behaviour [2,3], then the public keys must be validated against low-order
points [3,4]. To do that, the Shared function performs this validation
internally and returns false when the public key is invalid (i.e., it
is a low-order point).

References:
- [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
- [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
- [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
- [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)

*/
package x25519
33 changes: 19 additions & 14 deletions dh/x448/doc.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
// Package x448 provides Diffie-Hellman functions as specified in RFC-7748.
//
// References:
// - Curve448 and Goldilocks https://eprint.iacr.org/2015/625
// - RFC7748 https://rfc-editor.org/rfc/rfc7748.txt
//
// Validation of public keys.
//
// The Diffie-Hellman function, as described in RFC-7748, works for any public
// key. However, if a different protocol requires contributory behaviour, then
// the public keys must be validated against low-order points. To do that, the
// Shared function performs this validation internally and returns false when
// the public key is invalid (i.e., it is a low-order point).
// See https://cr.yp.to/ecdh.html#validate.
/*
Package x448 provides Diffie-Hellman functions as specified in RFC-7748.

Validation of public keys.

The Diffie-Hellman function, as described in RFC-7748 [1], works for any
public key. However, if a different protocol requires contributory
behaviour [2,3], then the public keys must be validated against low-order
points [3,4]. To do that, the Shared function performs this validation
internally and returns false when the public key is invalid (i.e., it
is a low-order point).

References:
- [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
- [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
- [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
- [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)

*/
package x448