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
@embetrix I am hoping to better understand your use case. The code within Pkcs11AesCbcEncrypt can of course be changed to use C_EncryptUpdate, but I am not sure how that helps you as I am not aware of any top level interface that takes partial data in an encryptupdate fashion. The most commonly used top level AES-CBC function wc_AesCbcEncrypt() takes all of the data at once, so you will still run into the same problem.
Please let me know if you can provide any more information to clear this up so we can find a way to accommodate your use case.
@ColtonWilley: there are HSMs that have a limited stack size and cannot encrypt/decrypt large data buffer at once, this should be done by chunks using C_EncryptUpdate/C_DecryptUpdate.
Ideally the chunck size should be set to something small e.g : 1K and be configurable at build time.
@embetrix I understand your issue now. I will change the code to use C_EncryptUpdate/C_DecryptUpdate instead with a configurable chunk size. I will let you know on this issue when the PR is up.
Version
master
Description
Pkcs11AesCbcEncrypt
Pkcs11AesCbcDecrypt
do not make use ofC_EncryptUpdate
C_DecryptUpdate
which make them unusable for larger buffer.The text was updated successfully, but these errors were encountered: