Problem:
Use-case: on a signal, I want to send A xor B message immediately. To save on the TLS encryption, I want to encrypt both messages beforehand, with the same nonce. crypto/fipsmodule/cipher/e_aes.c prevents this.
Solution:
In crypto/fipsmodule/cipher/e_aes.c, remove the given_counter < gcm_ctx->min_next_nonce check. (the min_next_nonce field can be removed compleltey)
The change is trivial, but I do not understand why the check is there on the first place. To protect the user against accidental misuse? I can prepare an MR.
- Does this change any public APIs?
No
- Which algorithm(s) will this impact?
AES
Problem:
Use-case: on a signal, I want to send A xor B message immediately. To save on the TLS encryption, I want to encrypt both messages beforehand, with the same nonce. crypto/fipsmodule/cipher/e_aes.c prevents this.
Solution:
In crypto/fipsmodule/cipher/e_aes.c, remove the
given_counter < gcm_ctx->min_next_noncecheck. (the min_next_nonce field can be removed compleltey)The change is trivial, but I do not understand why the check is there on the first place. To protect the user against accidental misuse? I can prepare an MR.
No
AES