intel / intel-ipsec-mb

Intel(R) Multi-Buffer Crypto for IPSec
BSD 3-Clause "New" or "Revised" License
292 stars 88 forks source link

RTE_CRYPTO_CIPHER_AES_CBC decrypt fails with pck size less 16 byte (block size) #74

Closed barby1138 closed 3 years ago

barby1138 commented 3 years ago

Hi,

Should I handle subj pck by some other way - else I have

Thread 1 "dpdk-crypto-app" received signal SIGSEGV, Segmentation fault. 0x00007ffff712b9af in aes_gcm_dec_256_sse () from /usr/lib/libIPSec_MB.so.0

Thanks

tkanteck commented 3 years ago

Please note that AES-CBC is a block cipher that normally requires message size to be multiple of 16 bytes.

barby1138 commented 3 years ago

Oh I see, thanks.

Czesch!!!

tkanteck commented 3 years ago

if you can share snippet of code here then it may help narrow down the problem

barby1138 commented 3 years ago

No the issue is solved - I had to pad the buffer to be multiple of 16 bytes. But strange that I had problem only with not padded buffers < 16 bytes and only in DECRYPT, but may be it just reproduced faster.

Thanks.

tkanteck commented 3 years ago

Yep, in encrypt direction it would happen as soon as algorithmic code is executed (after 4, 8 or 16 submissions or after flush operation). Glad to hear it is solved. Closing the issue then. Cheers