cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Newbie
Newbie
370 Views
Registered: ‎09-11-2019

[XilSecure] Is it possible to use an identical input and output buffer for AES to make the en/decryption inplace?

Hello guys,

In the XilSecure function 

s32 XSecure_AesDecrypt(XSecure_Aes *InstancePtr, u8 *Dst, const u8 *Src, u32 Length)

do you know if I can use the same buffer as Dst and Src parameters here? Or will this cause unexpected behaviour? I could imagine two problems:

1) Ciphertext expansion (due to padding, the ciphertext could be larger than the plain text)

2) GCM tag (if the GCM tag is appended to the ciphertext, then this will also require more size)

Reason to do it is obviously to save memory consumption during runtime. :)

Best regards,

Jannis

0 Kudos
Reply
0 Replies