summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2025-12-31 10:16:24 +0000
committerjsing <>2025-12-31 10:16:24 +0000
commit126a2d3ddac6e54e807fc6e4f115de54de845ce4 (patch)
tree1ad9b2024bdee017269f07c0f2f0ab27de2edb43 /src
parentafd5c8b34fa977b678e98f64ff01c43bf0631022 (diff)
downloadopenbsd-126a2d3ddac6e54e807fc6e4f115de54de845ce4.tar.gz
openbsd-126a2d3ddac6e54e807fc6e4f115de54de845ce4.tar.bz2
openbsd-126a2d3ddac6e54e807fc6e4f115de54de845ce4.zip
Require SSE in order to use gcm_{gmult,ghash}_4bit_mmx().
Contrary to naming, the '"June" MMX version' of gcm_ghash_4bit_mmx() uses SSE, while the 'pure-MMX "May" version' does not. This detail got missed when I was untangling OPENSSL_IA32_SSE2. Found the hard way by Tate Baldwin and Dennis Camera.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/modes/gcm128_i386.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/modes/gcm128_i386.c b/src/lib/libcrypto/modes/gcm128_i386.c
index ac517fdb04..14b0b9ce64 100644
--- a/src/lib/libcrypto/modes/gcm128_i386.c
+++ b/src/lib/libcrypto/modes/gcm128_i386.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gcm128_i386.c,v 1.1 2025/06/28 12:39:10 jsing Exp $ */ 1/* $OpenBSD: gcm128_i386.c,v 1.2 2025/12/31 10:16:24 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2025 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2025 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -43,7 +43,7 @@ gcm128_init(GCM128_CONTEXT *ctx)
43 return; 43 return;
44 } 44 }
45 45
46 if ((crypto_cpu_caps_i386 & CRYPTO_CPU_CAPS_I386_MMX) != 0) { 46 if ((crypto_cpu_caps_i386 & CRYPTO_CPU_CAPS_I386_SSE) != 0) {
47 gcm_init_4bit(ctx->Htable, ctx->H.u); 47 gcm_init_4bit(ctx->Htable, ctx->H.u);
48 ctx->gmult = gcm_gmult_4bit_mmx; 48 ctx->gmult = gcm_gmult_4bit_mmx;
49 ctx->ghash = gcm_ghash_4bit_mmx; 49 ctx->ghash = gcm_ghash_4bit_mmx;