-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use secure memory not for verification operation #14
Comments
I agree - it should be easy to implement. For Dilithium, this only affects one function Currently, many buffers are also allocated on the stack. Is there a reason to make the allocation dynamic? Or asked differently, what could we define as a criteria whether to dynamically or statically allocate? |
The difference is that stack allocations will never be secure allocations – except is the whole stack was locked, which will consume unnecessarily much locked memory. In any case libgcrypt does not support this, and it would be complicated to implement also. |
|
Why did you change "public operations" to "signing operation"? Shouldn't it have been correct before? I think that the function pointer for the allocation function sounds reasonable. It can even be set in the context struct that we already pass around (in the high level sign/verify/keygen operation), however, then the naming "param" is a bit misleading and it should then be called Perhaps we should pass a struct around that is built like this:
|
Because for KEM there is a secret involved in the encryption operation: the secret key.
Looks reasonable to me. |
Ah, I see. So we can only use non-secure memory in the ML/SLH-DSA verification call and for ML-KEM not at all. |
For signature schemes we should find a way to restrict the usage of secure (non-swapable) memory to the key generation and the private (signing) operation. For this purpose, we might hand to each function that needs to allocate memory a pointer to an allocation function. I think this would be the best solution. The reason is that we assume that a hash is signed (and not the message directly, in which case it would have to be treated as a secret).
ML-KEM should use secure memory also in the encapsulation operation, as the message is a secret.
@TJ-91
The text was updated successfully, but these errors were encountered: