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
There seem to be an issue with the ML-DSA / Dilithium code in WolfCrypt. Specifically, the wc_Dilithium_PublicKeyToDer, calls the SetAsymDerPublic() here:
The SetAsymDerPublic() is defined in the asn.c (L:12043) file and it is meant to be used for ED curves, not for generic ASN.1 (i.e., the documentation refers to RFC8410). The buffer size for the dataASN is set to edPubKeyASN_Length, which does not work for Dilithium.
Proposed Resolution:
Change the name of the function to be specific for ED curves, and
Fix the use in MlDsa/Dilithium code.
The text was updated successfully, but these errors were encountered:
The documentation and variable names around SetAsymKeyDerPublic() are outdated, and we'll open a PR to update this.
The SetAsymKeyDerPublic() is a generic function we use for sphincs, dilithium, falcon, Ed, etc. The edPubKeyASN_Length is just the number of ASN items in the template for this type of pub key.
There seem to be an issue with the ML-DSA / Dilithium code in WolfCrypt. Specifically, the
wc_Dilithium_PublicKeyToDer
, calls theSetAsymDerPublic()
here:wolfssl/wolfcrypt/src/dilithium.c
Line 9730 in bc68819
The
SetAsymDerPublic()
is defined in theasn.c
(L:12043) file and it is meant to be used for ED curves, not for generic ASN.1 (i.e., the documentation refers to RFC8410). The buffer size for thedataASN
is set toedPubKeyASN_Length
, which does not work for Dilithium.Proposed Resolution:
The text was updated successfully, but these errors were encountered: