You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Correct the signature length check for ECDSA keys supplied via PKCS#11
An ASN.1 DER encoded signature is specified by RFC 3279 as:
Ecdsa-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER
}
ASN.1 gives an overhead of 6 bytes (SEQUENCE and INTEGER tags + length) and
for P-256 "r" and "s" are 32 bytes each. This gives a minimum length of 70
bytes. "r" and "s" should be positive numbers so if the numbers are negative
(msb is 1), the numbers need to be padded, i.e. they will use 33 bytes
instead of 32. This means the encoded signature can be 71 or 72 bytes
depending on padding.
Ticket: MEN-7941
Changelog: Title
Signed-off-by: John Olav Lund <[email protected]>
0 commit comments