CryptoLib icon indicating copy to clipboard operation
CryptoLib copied to clipboard

AOS: IV not incrementing between frames

Open samoht opened this issue 2 months ago • 0 comments

I'm using CryptoLib dev branch for interop testing and noticed that Crypto_AOS_ApplySecurity doesn't increment the IV between calls, while Crypto_TM_ApplySecurity does. What I'm seeing:

Frame 1 IV: 000000000000000000000000
Frame 2 IV: 000000000000000000000000
Frame 3 IV: 000000000000000000000000

TM works as expected (IV increments each frame).

Looking at the code, crypto_tm.c has Crypto_increment(sa_ptr->iv, sa_ptr->iv_len) but crypto_aos.c only has Crypto_increment(sa_ptr->arsn, sa_ptr->arsn_len).

Do you know if this is expected?

Minimal repro at: https://gist.github.com/samoht/77f57eb4ced02a1572cc821643829ae9

Environment: dev branch commit 2372efd Ubuntu 24.04, libgcrypt 1.10.3

Thanks!

samoht avatar Dec 13 '25 17:12 samoht