From 98329ca0e806c97c29e2fefe45db53d1cc001ead Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Thu, 25 Aug 2022 08:44:59 +0800 Subject: [PATCH] Updated is my code constant time? (markdown) --- is-my-code-constant-time?.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/is-my-code-constant-time?.md b/is-my-code-constant-time?.md index 2cb9dd8..4a1dc85 100644 --- a/is-my-code-constant-time?.md +++ b/is-my-code-constant-time?.md @@ -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轴值。