summaryrefslogtreecommitdiff
path: root/sys/crypto
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2021-10-06 21:08:46 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-10-21 15:51:25 +0000
commit83b3e8e05ad9bab3f6cd79cc7842c37fa5f84951 (patch)
treefd1f12228b3faee4e62f5690998e3688e712c925 /sys/crypto
parent11db133ecad7930dd4f289815e2a1b531390f124 (diff)
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/ccp/ccp_hardware.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/crypto/ccp/ccp_hardware.c b/sys/crypto/ccp/ccp_hardware.c
index a2ca8e1cb71a..68f46a553f3c 100644
--- a/sys/crypto/ccp/ccp_hardware.c
+++ b/sys/crypto/ccp/ccp_hardware.c
@@ -1356,10 +1356,9 @@ ccp_collect_iv(struct cryptop *crp, const struct crypto_session_params *csp,
crypto_read_iv(crp, iv);
/*
- * If the input IV is 12 bytes, append an explicit counter of 1.
+ * Append an explicit counter of 1 for GCM.
*/
- if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16 &&
- csp->csp_ivlen == 12)
+ if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16)
*(uint32_t *)&iv[12] = htobe32(1);
if (csp->csp_cipher_alg == CRYPTO_AES_XTS &&