-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wolfHSM support for ML-DSA #523
base: master
Are you sure you want to change the base?
Conversation
Converting to draft until @danielinux merges #521 |
- consolidate AURIX scripts into wbaurixtool.sh - documentation updates
04682a0
to
ace953a
Compare
rebased after #521 was merged, re-tested on Sim + AURIX. Ready for review |
tools/keytools/keygen.c
Outdated
if (saveAsDer) { | ||
/* Export public key in DER format */ | ||
uint8_t pubDer[ | ||
#if ML_DSA_LEVEL == 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These come from run-time arguments now. You might need to rebase and fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops. Already had rebased but forgot to change this line. Fixed in latest commit to switch on ml_dsa_level
94d13b4
to
3148d36
Compare
tools/keytools/keygen.c
Outdated
exit(1); | ||
break; | ||
} | ||
pubDer = malloc(pubDerSz); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cast (uint8_t*)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in latest commit. Didn't realize this was in our coding standard, but indeed it is. Just of curiosity why do we do this? For C++ compatibility?
pubOutLen = wc_Dilithium_PublicKeyToDer(&key, pubDer, pubDerSz, | ||
WITH_ALG_SPKI); | ||
if (pubOutLen < 0) { | ||
fprintf(stderr, "Unable to export public key to DER, ret=%d\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to free pubDer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we immediately exit(1)
on any failure, so didn't free. Just following the paradigm elsewhere in keygen.c
.
wbaurixtool.sh
, a one-stop-shop configuration tool that handles the manual configuration steps that aren't handled by AURIX IDENote that this requires updating wolfSSL to include wolfSSL/wolfssl#8177 and wolfSSL/wolfssl#8229. If we need to wait until the required changes are incorporated in a release, let me know and this can remain a draft PR