Skip to content

Commit c64ae7c

Browse files
committed
Updating key validation refs.
The key validation can mitigate some attacks as such as the ones reported by [1] and [2]. [1] Genking-Valenta-Yarom (https://dx.doi.org/10.1145/3133956.3134029) [2] Cremers&Jackson (https://eprint.iacr.org/2019/526) Relates: #49
1 parent 85937ef commit c64ae7c

File tree

2 files changed

+38
-28
lines changed

2 files changed

+38
-28
lines changed

dh/x25519/doc.go

+19-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
// Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.
2-
//
3-
// References:
4-
// - RFC7748 https://rfc-editor.org/rfc/rfc7748.txt
5-
// - Curve25519 https://cr.yp.to/ecdh.html
6-
//
7-
// Validation of public keys.
8-
//
9-
// The Diffie-Hellman function, as described in RFC-7748, works for any public
10-
// key. However, if a different protocol requires contributory behaviour, then
11-
// the public keys must be validated against low-order points. To do that, the
12-
// Shared function performs this validation internally and returns false when
13-
// the public key is invalid (i.e., it is a low-order point).
14-
// See https://cr.yp.to/ecdh.html#validate.
1+
/*
2+
Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.
3+
4+
Validation of public keys.
5+
6+
The Diffie-Hellman function, as described in RFC-7748 [1], works for any
7+
public key. However, if a different protocol requires contributory
8+
behaviour [2,3], then the public keys must be validated against low-order
9+
points [3,4]. To do that, the Shared function performs this validation
10+
internally and returns false when the public key is invalid (i.e., it
11+
is a low-order point).
12+
13+
References:
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+
19+
*/
1520
package x25519

dh/x448/doc.go

+19-14
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
// Package x448 provides Diffie-Hellman functions as specified in RFC-7748.
2-
//
3-
// References:
4-
// - Curve448 and Goldilocks https://eprint.iacr.org/2015/625
5-
// - RFC7748 https://rfc-editor.org/rfc/rfc7748.txt
6-
//
7-
// Validation of public keys.
8-
//
9-
// The Diffie-Hellman function, as described in RFC-7748, works for any public
10-
// key. However, if a different protocol requires contributory behaviour, then
11-
// the public keys must be validated against low-order points. To do that, the
12-
// Shared function performs this validation internally and returns false when
13-
// the public key is invalid (i.e., it is a low-order point).
14-
// See https://cr.yp.to/ecdh.html#validate.
1+
/*
2+
Package x448 provides Diffie-Hellman functions as specified in RFC-7748.
3+
4+
Validation of public keys.
5+
6+
The Diffie-Hellman function, as described in RFC-7748 [1], works for any
7+
public key. However, if a different protocol requires contributory
8+
behaviour [2,3], then the public keys must be validated against low-order
9+
points [3,4]. To do that, the Shared function performs this validation
10+
internally and returns false when the public key is invalid (i.e., it
11+
is a low-order point).
12+
13+
References:
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+
19+
*/
1520
package x448

0 commit comments

Comments
 (0)