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
98329ca0e8
commit
4f97c5c30e
@ -65,7 +65,11 @@ type Curve interface {
|
|||||||
// the result is the all-zero value, ECDH returns an error.
|
// the result is the all-zero value, ECDH returns an error.
|
||||||
ECDH(local *PrivateKey, remote *PublicKey) ([]byte, error)
|
ECDH(local *PrivateKey, remote *PublicKey) ([]byte, error)
|
||||||
|
|
||||||
SM2MQV(sLocal, eLocal *PrivateKey, sRemote, eRemote *PublicKey) (*PublicKey, error)
|
// SM2MQV performs a SM2 specific style ECMQV exchange and return the shared secret.
|
||||||
|
SM2MQV(sLocal, eLocal *PrivateKey, sRemote, eRemote *PublicKey) (*PublicKey, error)
|
||||||
|
|
||||||
|
// SM2SharedKey performs SM2 key derivation to generate shared keying data, the uv was generated by SM2MQV.
|
||||||
|
SM2SharedKey(isResponder bool, kenLen int, uv, sPub, sRemote *PublicKey, uid []byte, remoteUID []byte) ([]byte, error)
|
||||||
|
|
||||||
// GenerateKey generates a new PrivateKey from rand.
|
// GenerateKey generates a new PrivateKey from rand.
|
||||||
GenerateKey(rand io.Reader) (*PrivateKey, error)
|
GenerateKey(rand io.Reader) (*PrivateKey, error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user