summaryrefslogtreecommitdiff
path: root/cipher/cipher-gcm.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-08-18 11:25:47 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-08-18 11:25:47 +0900
commitb512121503ac8d31e7225e302e8cd857576d4147 (patch)
tree00d79f61290f07f0fe7d350ae3ab5a480ddfa6f0 /cipher/cipher-gcm.c
parentc5480b4934bb0adecdfc29a47b5e123f995507e1 (diff)
downloadlibgcrypt-b512121503ac8d31e7225e302e8cd857576d4147.tar.gz
Adding gcry_cipher_setup_geniv and gcry_cipher_geniv.
... to allow use of GCM in FIPS mode. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'cipher/cipher-gcm.c')
-rw-r--r--cipher/cipher-gcm.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
index 683f07b0..8652967d 100644
--- a/cipher/cipher-gcm.c
+++ b/cipher/cipher-gcm.c
@@ -1105,13 +1105,6 @@ _gcry_cipher_gcm_setiv (gcry_cipher_hd_t c, const byte *iv, size_t ivlen)
{
c->marks.iv = 0;
c->marks.tag = 0;
- c->u_mode.gcm.disallow_encryption_because_of_setiv_in_fips_mode = 0;
-
- if (fips_mode ())
- {
- /* Direct invocation of GCM setiv in FIPS mode disables encryption. */
- c->u_mode.gcm.disallow_encryption_because_of_setiv_in_fips_mode = 1;
- }
return _gcry_cipher_gcm_initiv (c, iv, ivlen);
}