mirror of
https://github.com/ipxe/ipxe
synced 2025-12-16 17:41:18 +03:00
[crypto] Ensure relevant GCM cipher state is cleared by cipher_setiv()
Reset the accumulated authentication state when cipher_setiv() is called, to allow the cipher to be reused without resetting the key. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -44,14 +44,14 @@ union gcm_block {
|
||||
|
||||
/** GCM context */
|
||||
struct gcm_context {
|
||||
/** Hash key (H) */
|
||||
union gcm_block key;
|
||||
/** Counter (Y) */
|
||||
union gcm_block ctr;
|
||||
/** Accumulated hash (X) */
|
||||
union gcm_block hash;
|
||||
/** Accumulated lengths */
|
||||
union gcm_block len;
|
||||
/** Counter (Y) */
|
||||
union gcm_block ctr;
|
||||
/** Hash key (H) */
|
||||
union gcm_block key;
|
||||
/** Underlying block cipher */
|
||||
struct cipher_algorithm *raw_cipher;
|
||||
/** Underlying block cipher context */
|
||||
|
||||
Reference in New Issue
Block a user