Topic: [FEATURE REQUEST] AES-GCM stream encryption
Hi,
I'm trying to implement AES-GCM stream encryption, but it seems WolfSSL doesn't provide such feature for GCM mode, while it does for CBC mode.
Encrypted output of the following processing
wc_AesGcmEncrypt(&enc, buffer.data(), s_plain_text.data(), 0xf, s_iv.data(), s_iv.size(), auth_tag.data(), auth_tag.size(), aad.data(), aad.size());
wc_AesGcmEncrypt(&enc, buffer.data() + 0xf, s_plain_text.data() + 0xf, s_plain_text.size() - 0xf, s_iv.data(), s_iv.size(), auth_tag.data(), auth_tag.size(), aad.data(), aad.size());
is not the same as of such one
wc_AesGcmEncrypt(&enc, buffer.data(), s_plain_text.data(), s_plain_text.size(), s_iv.data(), s_iv.size(), auth_tag.data(), auth_tag.size(), aad.data(), aad.size());
I debugged a bit and found that Aes structure which is passed to wc_AesGcmEncrypt is not changed between wc_AesGcmEncrypt invocations, so counter value is not stored.
Is there another way of doing AES-GCM stream encryption or is it planned to add such feature?
Thanks in advance,
Yaroslav