Add multi-part operations for asymmetric signature#335
Add multi-part operations for asymmetric signature#335athoelke wants to merge 5 commits intoARM-software:mainfrom
Conversation
|
This needs to wait for the 1.4.1 publication to be finalised. One aspect of the proposed API that might be debatable:
|
3ffb7f7 to
a2c823f
Compare
MarcusJGStreets
left a comment
There was a problem hiding this comment.
Looks to be the obvious way to implement multipart sign and verify.
A fair counter-argument can be made for a separate function for a context based on the following observations:
So I will update this PR to pass the context in an optional |
Likewise for the multi-part verify operation.
a2c823f to
1028873
Compare
|
In our opinion the benefit of this new interface is quite small. Most signature algorithms are of the hash-and-sign type and can be used incrementally anyway. EDDSA and SLH-DSA do not work with the new interface because they need to traverse the message twice. ML-DSA has a hashed variant for the large message case. The only remaining algorithms are LMS/HSS and XMSS. Besides its incremental nature, the new interface would have another advantage: it allows to use the operation object to store intermediate data. With the standard signature interface, all data has to be stored on the stack (in a heapless system). This is a severe problem for post-quantum algorithms like ML-DSA which need up to around 100k RAM. And it is not a replacement for a low level ML-DSA interface in case |
Unfortunately, HashML-DSA is forbidden by CNSA 2.0. In TF-PSA-Crypto, we have a customer who needs to sign a message that's scattered in RAM, and the protocol requires the use of pure ML-DSA, where CNSA compliance is a reason for not using HashML-DSA. |
This adds the new operations for multipart sign and multi-part verify for asymmetric signatures (previous discussions suggested these should be ditinct types).
Fixes #319