diff options
author | jsing <> | 2024-03-29 11:19:01 +0000 |
---|---|---|
committer | jsing <> | 2024-03-29 11:19:01 +0000 |
commit | 3e3539b40954d9f4b256cf32c523d9e6a75823bc (patch) | |
tree | 5838eae775bd7c5c8024d3d777867a00f7b83de0 /src | |
parent | 75b82074adb4b78df59f9391f6cb70b6bb285522 (diff) | |
download | openbsd-3e3539b40954d9f4b256cf32c523d9e6a75823bc.tar.gz openbsd-3e3539b40954d9f4b256cf32c523d9e6a75823bc.tar.bz2 openbsd-3e3539b40954d9f4b256cf32c523d9e6a75823bc.zip |
Tweak defines since the Td4 table is only used for AES_{encrypt,decrypt}
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/aes/aes_core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/libcrypto/aes/aes_core.c b/src/lib/libcrypto/aes/aes_core.c index bf5149d833..23211dfcd0 100644 --- a/src/lib/libcrypto/aes/aes_core.c +++ b/src/lib/libcrypto/aes/aes_core.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: aes_core.c,v 1.21 2024/03/29 11:00:57 jsing Exp $ */ | 1 | /* $OpenBSD: aes_core.c,v 1.22 2024/03/29 11:19:01 jsing Exp $ */ |
2 | /** | 2 | /** |
3 | * rijndael-alg-fst.c | 3 | * rijndael-alg-fst.c |
4 | * | 4 | * |
@@ -37,11 +37,6 @@ | |||
37 | #include "aes_local.h" | 37 | #include "aes_local.h" |
38 | #include "crypto_internal.h" | 38 | #include "crypto_internal.h" |
39 | 39 | ||
40 | #if !defined(HAVE_AES_SET_ENCRYPT_KEY_INTERNAL) || \ | ||
41 | !defined(HAVE_AES_SET_DECRYPT_KEY_INTERNAL) || \ | ||
42 | !defined(HAVE_AES_ENCRYPT_INTERNAL) || \ | ||
43 | !defined(HAVE_AES_DECRYPT_INTERNAL) | ||
44 | |||
45 | /* | 40 | /* |
46 | Te0[x] = S [x].[02, 01, 01, 03]; | 41 | Te0[x] = S [x].[02, 01, 01, 03]; |
47 | Te1[x] = S [x].[03, 02, 01, 01]; | 42 | Te1[x] = S [x].[03, 02, 01, 01]; |
@@ -55,6 +50,10 @@ Td3[x] = Si[x].[09, 0d, 0b, 0e]; | |||
55 | Td4[x] = Si[x].[01]; | 50 | Td4[x] = Si[x].[01]; |
56 | */ | 51 | */ |
57 | 52 | ||
53 | #if !defined(HAVE_AES_SET_ENCRYPT_KEY_INTERNAL) || \ | ||
54 | !defined(HAVE_AES_SET_DECRYPT_KEY_INTERNAL) || \ | ||
55 | !defined(HAVE_AES_ENCRYPT_INTERNAL) || \ | ||
56 | !defined(HAVE_AES_DECRYPT_INTERNAL) | ||
58 | static const u32 Te0[256] = { | 57 | static const u32 Te0[256] = { |
59 | 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, | 58 | 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, |
60 | 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, | 59 | 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, |
@@ -584,6 +583,10 @@ static const u32 Td3[256] = { | |||
584 | 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, | 583 | 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, |
585 | 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, | 584 | 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, |
586 | }; | 585 | }; |
586 | #endif | ||
587 | |||
588 | #if !defined(HAVE_AES_ENCRYPT_INTERNAL) || \ | ||
589 | !defined(HAVE_AES_DECRYPT_INTERNAL) | ||
587 | static const u8 Td4[256] = { | 590 | static const u8 Td4[256] = { |
588 | 0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U, | 591 | 0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U, |
589 | 0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU, | 592 | 0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU, |