Skip to content

Commit 6adb31f

Browse files
andrea-caforionasahlpa
authored andcommitted
[crypto] ECC: Adapt doc of otcrypto_ecc_p*_arith_share_private_key
Clarify in the documentation which types of Boolean-shared inputs are permissible to those API functions. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
1 parent 25ae99d commit 6adb31f

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

sw/device/lib/crypto/include/ecc_p256.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,8 @@ status_t otcrypto_ecc_p256_base_point_mult(
570570
/**
571571
* Arithmetically share a private key provided as Boolean shares.
572572
*
573-
* Given a Boolean-shared private key d in the range [1, n-1] and shared, this
574-
* routine arithmetically shares the key such that d = d0 + d1 mod n, where n
575-
* is the curve order.
573+
* Given a Boolean-shared 320-bit key d this function arithmetically shares the
574+
* key such that d = d0 + d1 mod n where n is the curve order.
576575
*
577576
* It is allowed to pass the key in plain with the second share being set to 0.
578577
*

sw/device/lib/crypto/include/ecc_p384.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,11 +480,10 @@ status_t otcrypto_ecc_p384_base_point_mult(
480480
otcrypto_unblinded_key_t *public_key);
481481

482482
/**
483-
* Arithmetically share a private key provided as Boolean shares.
483+
* Arithmetically share a private key/seed provided as Boolean shares.
484484
*
485-
* Given a Boolean-shared private key d in the range [1, n-1] and shared, this
486-
* routine arithmetically shares the key such that d = d0 + d1 mod n, where n
487-
* is the curve order.
485+
* Given a Boolean-shared 320-bit key d this function arithmetically shares the
486+
* key such that d = d0 + d1 mod n where n is the curve order.
488487
*
489488
* It is allowed to pass the key in plain with the second share being set to 0.
490489
*

0 commit comments

Comments
 (0)