Updated is my code constant time? (markdown)

Sun Yimin 2022-08-25 08:44:59 +08:00
parent 6607d09711
commit 98329ca0e8

@ -64,6 +64,8 @@ type Curve interface {
// For X25519, this performs ECDH as specified in RFC 7748, Section 6.1. If
// the result is the all-zero value, ECDH returns an error.
ECDH(local *PrivateKey, remote *PublicKey) ([]byte, error)
SM2MQV(sLocal, eLocal *PrivateKey, sRemote, eRemote *PublicKey) (*PublicKey, error)
// GenerateKey generates a new PrivateKey from rand.
GenerateKey(rand io.Reader) (*PrivateKey, error)
@ -103,4 +105,4 @@ type Curve interface {
}
```
其实sm2 key exchange和[SEC 1, Version 2.0](https://www.secg.org/sec1-v2.pdf), Section 3.4 Elliptic Curve MQV Primitive 描述的方法一样只是最后取shared secret方法不同: MQV和DH一样都只取X轴值。
其实sm2 key exchange和[SEC 1, Version 2.0](https://www.secg.org/sec1-v2.pdf), Section 3.4 Elliptic Curve MQV Primitive 描述的方法类似只是最后取shared secret方法不同: ECMQV和DH一样都只取X轴值。