From 14ac3748530b84d58e8129d23b33dea309118f9e Mon Sep 17 00:00:00 2001
From: Daniel Huigens
Perform the ECDSA signing process, as specified in [[RFC6090]],
- Section 5.4, with |M| as the message, using |params| as the
+ Section 5.4.2, with |M| as the message, using |params| as the
EC domain parameters, and with |d| as the private key.
- Perform the ECDSA verifying process, as specified in [[RFC6090]], Section 5.3, with |M| as the received
+ Perform the ECDSA verifying process, as specified in [[RFC6090]], Section 5.4.3, with |M| as the received
message, |signature| as the received signature and using
|params| as the EC domain parameters, and
|Q| as the public key.
From 8deea685ed8a44e163e14c2534736cf906768e6a Mon Sep 17 00:00:00 2001
From: Daniel Huigens
+ To convert a byte sequence
+ to a non-negative integer,
+ interpret the byte sequence as a big-endian non-negative integer
+ (most significant bit first),
+ and return that integer.
+
Comparing two strings in a case-sensitive
manner means comparing them exactly, code point for code point.
@@ -7235,12 +7242,41 @@
- Perform the ECDSA verifying process, as specified in [[RFC6090]], Section 5.4.3, with |M| as the received
- message, |signature| as the received signature and using
- |params| as the EC domain parameters, and
- |Q| as the public key.
-
+ Let |n| be the smallest integer such that |n| * 8 is greater than
+ the logarithm to base 2 of the order of the base point of the elliptic curve identified
+ by |params|.
+
+ If |signature| does not have a [= byte sequence/length =] of |n| * 2 bytes,
+ then return false.
+
+ Let |r| be the result of
+ converting the first |n| bytes of |signature| to an integer.
+
+ Let |s| be the result of
+ converting the last |n| bytes of |signature| to an integer.
+
+ Perform the ECDSA verifying process, as specified in [[RFC6090]], Section 5.4.3, with |M| as the received
+ message, (|r|, |s|) as the signature and using
+ |params| as the EC domain parameters, and
+ |Q| as the public key.
+ Sign
Verify
Terminology
then return the [= byte sequence =] formed by considering each consecutive
sequence of 8 bits in that bit sequence as a byte.
Verify
|key| is "`P-256`", "`P-384`" or "`P-521`":
+
Terminology
and then considering each consecutive sequence of 8 bits in that string as a byte.
- When this specification says to convert a non-negative + To convert a non-negative integer |i| to a byte sequence of length |n|, where |n| * 8 - is greater than the logarithm to base 2 of |i|, the user agent must - first calculate the binary representation of |i|, most significant bit first, + is greater than the logarithm to base 2 of |i|, + calculate the binary representation of |i|, most significant bit first, prefix this with sufficient zero bits to form a bit sequence of length |n| * 8, and then return the [= byte sequence =] formed by considering each consecutive sequence of 8 bits in that bit sequence as a byte.