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
It's a copy from RIOT and shouldn't have been here. Also since non-RIOT package (e.g., POSIX) never uses this macro, each ndn_ecdsa_sign will fall into uECC_sign_deterministic even if they already set a RNG (e.g., ndn_lite_startup in POSIX package).
The adaptation needs to pass -DFEATURE_PERIPH_HWRNG to compiler, so that normal signing is selected at compile time.
It would be a bad idea to select code path at runtime using if-else, because it increases binary code size.
Yes, and I'm not saying to use runtime if-else. I think I missed something here. No documentation have ever mentioned about FEATURE_PERIPH_HWRNG and how to use it, so if you simply follow instructions on README, normal signing is never used. One can only see a simple statement below:
/**
* Sign a buffer using ECDSA algorithm. This function will automatically use
* deterministic signing when no hardware pseudo-random number generator is available.
* The signature generated will be in ASN.1 DER format.
What I wonder is should adaptation define the FEATURE_PERIPH_HWRNG in code, otherwise we should improve the documentation.
Current ECC backend uses macro
FEATURE_PERIPH_HWRNG
to decide whether to use deterministic signing.It's a copy from RIOT and shouldn't have been here. Also since non-RIOT package (e.g., POSIX) never uses this macro, each
ndn_ecdsa_sign
will fall intouECC_sign_deterministic
even if they already set a RNG (e.g.,ndn_lite_startup
in POSIX package).The text was updated successfully, but these errors were encountered: