ecdheParameters implements Diffie-Hellman with either NIST curves or X25519, according to RFC 8446, Section 4.2.8.2.
| 104 | // ecdheParameters implements Diffie-Hellman with either NIST curves or X25519, |
| 105 | // according to RFC 8446, Section 4.2.8.2. |
| 106 | type ecdheParameters interface { |
| 107 | CurveID() CurveID |
| 108 | PublicKey() []byte |
| 109 | SharedKey(peerPublicKey []byte) []byte |
| 110 | } |
| 111 | |
| 112 | func generateECDHEParameters(rand io.Reader, curveID CurveID) (ecdheParameters, error) { |
| 113 | if curveID == X25519 { |
no outgoing calls
no test coverage detected
searching dependent graphs…