mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-12 03:56:17 +08:00
Updated is my code constant time? (markdown)
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轴值。
|
||||
|
Loading…
x
Reference in New Issue
Block a user