Function aes128_decrypt_oracle
pub unconstrained fn aes128_decrypt_oracle<let N: u32>(
ciphertext: BoundedVec<u8, N>,
iv: [u8; 16],
sym_key: [u8; 16],
) -> BoundedVec<u8, N>
pub unconstrained fn aes128_decrypt_oracle<let N: u32>(
ciphertext: BoundedVec<u8, N>,
iv: [u8; 16],
sym_key: [u8; 16],
) -> BoundedVec<u8, N>
Decrypts a ciphertext, using AES128.
Returns a BoundedVec containing the plaintext.
It's up to the calling function to determine whether decryption succeeded or failed. See the tests below for an example of how.
Note that we accept ciphertext as a BoundedVec, not as an array. This is because this function is typically used when processing logs and at that point we don't have a comptime information about the length of the ciphertext as the log is not specific to any individual note.