Skip to content

Conversation

@frkv
Copy link
Contributor

@frkv frkv commented Nov 17, 2025

-This is a [nrf fromlist] as this is based on a patch we have
received from Oberon ahead of introducing this in a coming
version of the Oberon PSA crypto deliverable.
-There was an issue found in test on deterministic ECDSA using NIST
secp521r1 curve type for the Oberon PSA crypto driver. The issue
was caused by an arithmetic issue with the buffer used to handle
padding of ECDSA sign and verify operations. The buffer length is
set according to the key size (modulo size) of the ECC curve
and when secp521r1 is enabled (then this buffer is 66 bytes long).
The padding is used when digests are smaller than the buffer and
since secp521r1 uses SHA-512 (normally, 64 bytes long digest) the
system handled this as a normal padding. ocrypto_ APIs expects 64
bytes input, and was handed a digest with invalid bytes.
-Signing: The API to do signature generation uses hash + 2 to get the
right offset for the digest
-Verification: The API has special handling for secp521r1 to get the
proper offset and uses hash + 2 for the right offset for the digest

ref: NCSDK-36329

-This is a [nrf fromlist] as this is based on a patch we have
 received from Oberon ahead of introducing this in a coming
 version of the Oberon PSA crypto deliverable.
-There was an issue found in test on deterministic ECDSA using NIST
 secp521r1 curve type for the Oberon PSA crypto driver. The issue
 was caused by an arithmetic issue with the buffer used to handle
 padding of ECDSA sign and verify operations. The buffer length is
 set according to the key size (modulo size) of the ECC curve
 and when secp521r1 is enabled (then this buffer is 66 bytes long).
 The padding is used when digests are smaller than the buffer and
 since secp521r1 uses SHA-512 (normally, 64 bytes long digest) the
 system handled this as a normal padding. ocrypto_ APIs expects 64
 bytes input, and was handed a digest with invalid bytes.
-Signing: The API to do signature generation uses hash + 2 to get the
 right offset for the digest
-Verification: The API has special handling for secp521r1 to get the
 proper offset and uses hash + 2 for the right offset for the digest

ref: NCSDK-36329

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants