summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/aes/aes_core.c45
-rw-r--r--src/lib/libcrypto/aes/asm/aes-586.pl16
-rw-r--r--src/lib/libcrypto/aes/asm/aes-armv4.pl18
-rw-r--r--src/lib/libcrypto/aes/asm/aes-mips.pl20
-rwxr-xr-xsrc/lib/libcrypto/aes/asm/aes-x86_64.pl40
-rw-r--r--src/lib/libcrypto/arch/amd64/Makefile.inc5
-rw-r--r--src/lib/libcrypto/arch/arm/Makefile.inc3
-rw-r--r--src/lib/libcrypto/arch/i386/Makefile.inc5
-rw-r--r--src/lib/libcrypto/arch/mips64/Makefile.inc5
9 files changed, 100 insertions, 57 deletions
diff --git a/src/lib/libcrypto/aes/aes_core.c b/src/lib/libcrypto/aes/aes_core.c
index bb1006acf1..ee0bbb9f40 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.19 2024/03/27 11:15:44 jsing Exp $ */ 1/* $OpenBSD: aes_core.c,v 1.20 2024/03/29 04:39:54 jsing Exp $ */
2/** 2/**
3 * rijndael-alg-fst.c 3 * rijndael-alg-fst.c
4 * 4 *
@@ -37,6 +37,9 @@
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
40/* 43/*
41Te0[x] = S [x].[02, 01, 01, 03]; 44Te0[x] = S [x].[02, 01, 01, 03];
42Te1[x] = S [x].[03, 02, 01, 01]; 45Te1[x] = S [x].[03, 02, 01, 01];
@@ -618,12 +621,20 @@ static const u32 rcon[] = {
618 0x10000000, 0x20000000, 0x40000000, 0x80000000, 621 0x10000000, 0x20000000, 0x40000000, 0x80000000,
619 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ 622 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
620}; 623};
624#endif
621 625
622/** 626#ifdef HAVE_AES_SET_ENCRYPT_KEY_INTERNAL
627int aes_set_encrypt_key_internal(const unsigned char *userKey, const int bits,
628 AES_KEY *key);
629
630#else
631
632/*
623 * Expand the cipher key into the encryption key schedule. 633 * Expand the cipher key into the encryption key schedule.
624 */ 634 */
625int 635static inline int
626AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key) 636aes_set_encrypt_key_internal(const unsigned char *userKey, const int bits,
637 AES_KEY *key)
627{ 638{
628 u32 *rk; 639 u32 *rk;
629 int i = 0; 640 int i = 0;
@@ -719,12 +730,25 @@ AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key)
719 } 730 }
720 return 0; 731 return 0;
721} 732}
733#endif
722 734
723/** 735int
736AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key)
737{
738 return aes_set_encrypt_key_internal(userKey, bits, key);
739}
740
741#ifdef HAVE_AES_SET_DECRYPT_KEY_INTERNAL
742int aes_set_decrypt_key_internal(const unsigned char *userKey, const int bits,
743 AES_KEY *key);
744
745#else
746/*
724 * Expand the cipher key into the decryption key schedule. 747 * Expand the cipher key into the decryption key schedule.
725 */ 748 */
726int 749static inline int
727AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key) 750aes_set_decrypt_key_internal(const unsigned char *userKey, const int bits,
751 AES_KEY *key)
728{ 752{
729 u32 *rk; 753 u32 *rk;
730 int i, j, status; 754 int i, j, status;
@@ -778,6 +802,13 @@ AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key)
778 } 802 }
779 return 0; 803 return 0;
780} 804}
805#endif
806
807int
808AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key)
809{
810 return aes_set_decrypt_key_internal(userKey, bits, key);
811}
781 812
782#ifndef AES_ASM 813#ifndef AES_ASM
783/* 814/*
diff --git a/src/lib/libcrypto/aes/asm/aes-586.pl b/src/lib/libcrypto/aes/asm/aes-586.pl
index 733675ce7d..a2d98009e8 100644
--- a/src/lib/libcrypto/aes/asm/aes-586.pl
+++ b/src/lib/libcrypto/aes/asm/aes-586.pl
@@ -2849,12 +2849,12 @@ sub enckey()
2849 &set_label("exit"); 2849 &set_label("exit");
2850&function_end("_x86_AES_set_encrypt_key"); 2850&function_end("_x86_AES_set_encrypt_key");
2851 2851
2852# int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 2852# int aes_set_encrypt_key_internal(const unsigned char *userKey, const int bits,
2853# AES_KEY *key) 2853# AES_KEY *key)
2854&function_begin_B("AES_set_encrypt_key"); 2854&function_begin_B("aes_set_encrypt_key_internal");
2855 &call ("_x86_AES_set_encrypt_key"); 2855 &call ("_x86_AES_set_encrypt_key");
2856 &ret (); 2856 &ret ();
2857&function_end_B("AES_set_encrypt_key"); 2857&function_end_B("aes_set_encrypt_key_internal");
2858 2858
2859sub deckey() 2859sub deckey()
2860{ my ($i,$key,$tp1,$tp2,$tp4,$tp8) = @_; 2860{ my ($i,$key,$tp1,$tp2,$tp4,$tp8) = @_;
@@ -2911,9 +2911,9 @@ sub deckey()
2911 &mov (&DWP(4*$i,$key),$tp1); 2911 &mov (&DWP(4*$i,$key),$tp1);
2912} 2912}
2913 2913
2914# int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 2914# int aes_set_decrypt_key_internal(const unsigned char *userKey, const int bits,
2915# AES_KEY *key) 2915# AES_KEY *key)
2916&function_begin_B("AES_set_decrypt_key"); 2916&function_begin_B("aes_set_decrypt_key_internal");
2917 &call ("_x86_AES_set_encrypt_key"); 2917 &call ("_x86_AES_set_encrypt_key");
2918 &cmp ("eax",0); 2918 &cmp ("eax",0);
2919 &je (&label("proceed")); 2919 &je (&label("proceed"));
@@ -2969,6 +2969,6 @@ sub deckey()
2969 &jb (&label("permute")); 2969 &jb (&label("permute"));
2970 2970
2971 &xor ("eax","eax"); # return success 2971 &xor ("eax","eax"); # return success
2972&function_end("AES_set_decrypt_key"); 2972&function_end("aes_set_decrypt_key_internal");
2973 2973
2974&asm_finish(); 2974&asm_finish();
diff --git a/src/lib/libcrypto/aes/asm/aes-armv4.pl b/src/lib/libcrypto/aes/asm/aes-armv4.pl
index 1cb9586d4b..3d581c5d7c 100644
--- a/src/lib/libcrypto/aes/asm/aes-armv4.pl
+++ b/src/lib/libcrypto/aes/asm/aes-armv4.pl
@@ -404,12 +404,12 @@ _armv4_AES_encrypt:
404 ldr pc,[sp],#4 @ pop and return 404 ldr pc,[sp],#4 @ pop and return
405.size _armv4_AES_encrypt,.-_armv4_AES_encrypt 405.size _armv4_AES_encrypt,.-_armv4_AES_encrypt
406 406
407.global AES_set_encrypt_key 407.global aes_set_encrypt_key_internal
408.type AES_set_encrypt_key,%function 408.type aes_set_encrypt_key_internal,%function
409.align 5 409.align 5
410AES_set_encrypt_key: 410aes_set_encrypt_key_internal:
411_armv4_AES_set_encrypt_key: 411_armv4_AES_set_encrypt_key:
412 sub r3,pc,#8 @ AES_set_encrypt_key 412 sub r3,pc,#8 @ aes_set_encrypt_key_internal
413 teq r0,#0 413 teq r0,#0
414 moveq r0,#-1 414 moveq r0,#-1
415 beq .Labrt 415 beq .Labrt
@@ -679,12 +679,12 @@ _armv4_AES_set_encrypt_key:
679.Labrt: tst lr,#1 679.Labrt: tst lr,#1
680 moveq pc,lr @ be binary compatible with V4, yet 680 moveq pc,lr @ be binary compatible with V4, yet
681 bx lr @ interoperable with Thumb ISA:-) 681 bx lr @ interoperable with Thumb ISA:-)
682.size AES_set_encrypt_key,.-AES_set_encrypt_key 682.size aes_set_encrypt_key_internal,.-aes_set_encrypt_key_internal
683 683
684.global AES_set_decrypt_key 684.global aes_set_decrypt_key_internal
685.type AES_set_decrypt_key,%function 685.type aes_set_decrypt_key_internal,%function
686.align 5 686.align 5
687AES_set_decrypt_key: 687aes_set_decrypt_key_internal:
688 str lr,[sp,#-4]! @ push lr 688 str lr,[sp,#-4]! @ push lr
689 bl _armv4_AES_set_encrypt_key 689 bl _armv4_AES_set_encrypt_key
690 teq r0,#0 690 teq r0,#0
@@ -773,7 +773,7 @@ $code.=<<___;
773 moveq pc,lr @ be binary compatible with V4, yet 773 moveq pc,lr @ be binary compatible with V4, yet
774 bx lr @ interoperable with Thumb ISA:-) 774 bx lr @ interoperable with Thumb ISA:-)
775#endif 775#endif
776.size AES_set_decrypt_key,.-AES_set_decrypt_key 776.size aes_set_decrypt_key_internal,.-aes_set_decrypt_key_internal
777 777
778.type AES_Td,%object 778.type AES_Td,%object
779.align 5 779.align 5
diff --git a/src/lib/libcrypto/aes/asm/aes-mips.pl b/src/lib/libcrypto/aes/asm/aes-mips.pl
index b95d1afd5a..b3649bc60f 100644
--- a/src/lib/libcrypto/aes/asm/aes-mips.pl
+++ b/src/lib/libcrypto/aes/asm/aes-mips.pl
@@ -1038,9 +1038,9 @@ _mips_AES_set_encrypt_key:
1038 nop 1038 nop
1039.end _mips_AES_set_encrypt_key 1039.end _mips_AES_set_encrypt_key
1040 1040
1041.globl AES_set_encrypt_key 1041.globl aes_set_encrypt_key_internal
1042.ent AES_set_encrypt_key 1042.ent aes_set_encrypt_key_internal
1043AES_set_encrypt_key: 1043aes_set_encrypt_key_internal:
1044 .frame $sp,$FRAMESIZE,$ra 1044 .frame $sp,$FRAMESIZE,$ra
1045 .mask $SAVED_REGS_MASK,-$SZREG 1045 .mask $SAVED_REGS_MASK,-$SZREG
1046 .set noreorder 1046 .set noreorder
@@ -1062,7 +1062,7 @@ $code.=<<___ if ($flavour =~ /nubi/i); # optimize non-nubi prologue
1062___ 1062___
1063$code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification 1063$code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification
1064 .cplocal $Tbl 1064 .cplocal $Tbl
1065 .cpsetup $pf,$zero,AES_set_encrypt_key 1065 .cpsetup $pf,$zero,aes_set_encrypt_key_internal
1066___ 1066___
1067$code.=<<___; 1067$code.=<<___;
1068 .set reorder 1068 .set reorder
@@ -1085,7 +1085,7 @@ ___
1085$code.=<<___; 1085$code.=<<___;
1086 jr $ra 1086 jr $ra
1087 $PTR_ADD $sp,$FRAMESIZE 1087 $PTR_ADD $sp,$FRAMESIZE
1088.end AES_set_encrypt_key 1088.end aes_set_encrypt_key_internal
1089___ 1089___
1090 1090
1091my ($head,$tail)=($inp,$bits); 1091my ($head,$tail)=($inp,$bits);
@@ -1093,9 +1093,9 @@ my ($tp1,$tp2,$tp4,$tp8,$tp9,$tpb,$tpd,$tpe)=($a4,$a5,$a6,$a7,$s0,$s1,$s2,$s3);
1093my ($m,$x80808080,$x7f7f7f7f,$x1b1b1b1b)=($at,$t0,$t1,$t2); 1093my ($m,$x80808080,$x7f7f7f7f,$x1b1b1b1b)=($at,$t0,$t1,$t2);
1094$code.=<<___; 1094$code.=<<___;
1095.align 5 1095.align 5
1096.globl AES_set_decrypt_key 1096.globl aes_set_decrypt_key_internal
1097.ent AES_set_decrypt_key 1097.ent aes_set_decrypt_key_internal
1098AES_set_decrypt_key: 1098aes_set_decrypt_key_internal:
1099 .frame $sp,$FRAMESIZE,$ra 1099 .frame $sp,$FRAMESIZE,$ra
1100 .mask $SAVED_REGS_MASK,-$SZREG 1100 .mask $SAVED_REGS_MASK,-$SZREG
1101 .set noreorder 1101 .set noreorder
@@ -1117,7 +1117,7 @@ $code.=<<___ if ($flavour =~ /nubi/i); # optimize non-nubi prologue
1117___ 1117___
1118$code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification 1118$code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification
1119 .cplocal $Tbl 1119 .cplocal $Tbl
1120 .cpsetup $pf,$zero,AES_set_decrypt_key 1120 .cpsetup $pf,$zero,aes_set_decrypt_key_internal
1121___ 1121___
1122$code.=<<___; 1122$code.=<<___;
1123 .set reorder 1123 .set reorder
@@ -1228,7 +1228,7 @@ ___
1228$code.=<<___; 1228$code.=<<___;
1229 jr $ra 1229 jr $ra
1230 $PTR_ADD $sp,$FRAMESIZE 1230 $PTR_ADD $sp,$FRAMESIZE
1231.end AES_set_decrypt_key 1231.end aes_set_decrypt_key_internal
1232___ 1232___
1233}}} 1233}}}
1234 1234
diff --git a/src/lib/libcrypto/aes/asm/aes-x86_64.pl b/src/lib/libcrypto/aes/asm/aes-x86_64.pl
index 4c4686d8fb..9b75a6f7a5 100755
--- a/src/lib/libcrypto/aes/asm/aes-x86_64.pl
+++ b/src/lib/libcrypto/aes/asm/aes-x86_64.pl
@@ -1290,13 +1290,13 @@ $code.=<<___;
1290___ 1290___
1291} 1291}
1292 1292
1293# int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 1293# int aes_set_encrypt_key_internal(const unsigned char *userKey, const int bits,
1294# AES_KEY *key) 1294# AES_KEY *key)
1295$code.=<<___; 1295$code.=<<___;
1296.globl AES_set_encrypt_key 1296.globl aes_set_encrypt_key_internal
1297.type AES_set_encrypt_key,\@function,3 1297.type aes_set_encrypt_key_internal,\@function,3
1298.align 16 1298.align 16
1299AES_set_encrypt_key: 1299aes_set_encrypt_key_internal:
1300 _CET_ENDBR 1300 _CET_ENDBR
1301 push %rbx 1301 push %rbx
1302 push %rbp 1302 push %rbp
@@ -1318,7 +1318,7 @@ AES_set_encrypt_key:
1318 add \$56,%rsp 1318 add \$56,%rsp
1319.Lenc_key_epilogue: 1319.Lenc_key_epilogue:
1320 ret 1320 ret
1321.size AES_set_encrypt_key,.-AES_set_encrypt_key 1321.size aes_set_encrypt_key_internal,.-aes_set_encrypt_key_internal
1322 1322
1323.type _x86_64_AES_set_encrypt_key,\@abi-omnipotent 1323.type _x86_64_AES_set_encrypt_key,\@abi-omnipotent
1324.align 16 1324.align 16
@@ -1562,13 +1562,13 @@ $code.=<<___;
1562___ 1562___
1563} 1563}
1564 1564
1565# int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 1565# int aes_set_decrypt_key_internal(const unsigned char *userKey, const int bits,
1566# AES_KEY *key) 1566# AES_KEY *key)
1567$code.=<<___; 1567$code.=<<___;
1568.globl AES_set_decrypt_key 1568.globl aes_set_decrypt_key_internal
1569.type AES_set_decrypt_key,\@function,3 1569.type aes_set_decrypt_key_internal,\@function,3
1570.align 16 1570.align 16
1571AES_set_decrypt_key: 1571aes_set_decrypt_key_internal:
1572 _CET_ENDBR 1572 _CET_ENDBR
1573 push %rbx 1573 push %rbx
1574 push %rbp 1574 push %rbp
@@ -1638,7 +1638,7 @@ $code.=<<___;
1638 add \$56,%rsp 1638 add \$56,%rsp
1639.Ldec_key_epilogue: 1639.Ldec_key_epilogue:
1640 ret 1640 ret
1641.size AES_set_decrypt_key,.-AES_set_decrypt_key 1641.size aes_set_decrypt_key_internal,.-aes_set_decrypt_key_internal
1642___ 1642___
1643 1643
1644# void aes_cbc_encrypt_internal(const void char *inp, unsigned char *out, 1644# void aes_cbc_encrypt_internal(const void char *inp, unsigned char *out,
@@ -2790,13 +2790,13 @@ cbc_se_handler:
2790 .rva .LSEH_end_AES_decrypt 2790 .rva .LSEH_end_AES_decrypt
2791 .rva .LSEH_info_AES_decrypt 2791 .rva .LSEH_info_AES_decrypt
2792 2792
2793 .rva .LSEH_begin_AES_set_encrypt_key 2793 .rva .LSEH_begin_aes_set_encrypt_key_internal
2794 .rva .LSEH_end_AES_set_encrypt_key 2794 .rva .LSEH_end_aes_set_encrypt_key_internal
2795 .rva .LSEH_info_AES_set_encrypt_key 2795 .rva .LSEH_info_aes_set_encrypt_key_internal
2796 2796
2797 .rva .LSEH_begin_AES_set_decrypt_key 2797 .rva .LSEH_begin_aes_set_decrypt_key_internal
2798 .rva .LSEH_end_AES_set_decrypt_key 2798 .rva .LSEH_end_aes_set_decrypt_key_internal
2799 .rva .LSEH_info_AES_set_decrypt_key 2799 .rva .LSEH_info_aes_set_decrypt_key_internal
2800 2800
2801 .rva .LSEH_begin_aes_cbc_encrypt_internal 2801 .rva .LSEH_begin_aes_cbc_encrypt_internal
2802 .rva .LSEH_end_aes_cbc_encrypt_internal 2802 .rva .LSEH_end_aes_cbc_encrypt_internal
@@ -2812,11 +2812,11 @@ cbc_se_handler:
2812 .byte 9,0,0,0 2812 .byte 9,0,0,0
2813 .rva block_se_handler 2813 .rva block_se_handler
2814 .rva .Ldec_prologue,.Ldec_epilogue # HandlerData[] 2814 .rva .Ldec_prologue,.Ldec_epilogue # HandlerData[]
2815.LSEH_info_AES_set_encrypt_key: 2815.LSEH_info_aes_set_encrypt_key_internal:
2816 .byte 9,0,0,0 2816 .byte 9,0,0,0
2817 .rva key_se_handler 2817 .rva key_se_handler
2818 .rva .Lenc_key_prologue,.Lenc_key_epilogue # HandlerData[] 2818 .rva .Lenc_key_prologue,.Lenc_key_epilogue # HandlerData[]
2819.LSEH_info_AES_set_decrypt_key: 2819.LSEH_info_aes_set_decrypt_key_internal:
2820 .byte 9,0,0,0 2820 .byte 9,0,0,0
2821 .rva key_se_handler 2821 .rva key_se_handler
2822 .rva .Ldec_key_prologue,.Ldec_key_epilogue # HandlerData[] 2822 .rva .Ldec_key_prologue,.Ldec_key_epilogue # HandlerData[]
diff --git a/src/lib/libcrypto/arch/amd64/Makefile.inc b/src/lib/libcrypto/arch/amd64/Makefile.inc
index ac5cf874f5..06417c06f3 100644
--- a/src/lib/libcrypto/arch/amd64/Makefile.inc
+++ b/src/lib/libcrypto/arch/amd64/Makefile.inc
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile.inc,v 1.22 2024/03/29 02:33:44 jsing Exp $ 1# $OpenBSD: Makefile.inc,v 1.23 2024/03/29 04:39:54 jsing Exp $
2 2
3# amd64-specific libcrypto build rules 3# amd64-specific libcrypto build rules
4 4
@@ -14,6 +14,9 @@ CFLAGS+= -DVPAES_ASM
14SSLASM+= aes vpaes-x86_64 14SSLASM+= aes vpaes-x86_64
15SSLASM+= aes aesni-x86_64 15SSLASM+= aes aesni-x86_64
16CFLAGS+= -DHAVE_AES_CBC_ENCRYPT_INTERNAL 16CFLAGS+= -DHAVE_AES_CBC_ENCRYPT_INTERNAL
17CFLAGS+= -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL
18CFLAGS+= -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL
19SRCS+= aes_core.c
17# bn 20# bn
18CFLAGS+= -DOPENSSL_IA32_SSE2 21CFLAGS+= -DOPENSSL_IA32_SSE2
19CFLAGS+= -DRSA_ASM 22CFLAGS+= -DRSA_ASM
diff --git a/src/lib/libcrypto/arch/arm/Makefile.inc b/src/lib/libcrypto/arch/arm/Makefile.inc
index 7db36aaa60..bfef312f71 100644
--- a/src/lib/libcrypto/arch/arm/Makefile.inc
+++ b/src/lib/libcrypto/arch/arm/Makefile.inc
@@ -5,6 +5,9 @@
5# aes 5# aes
6CFLAGS+= -DAES_ASM 6CFLAGS+= -DAES_ASM
7SSLASM+= aes aes-armv4 7SSLASM+= aes aes-armv4
8CFLAGS+= -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL
9CFLAGS+= -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL
10SRCS+= aes_core.c
8# bn 11# bn
9CFLAGS+= -DOPENSSL_BN_ASM_MONT 12CFLAGS+= -DOPENSSL_BN_ASM_MONT
10SSLASM+= bn armv4-mont 13SSLASM+= bn armv4-mont
diff --git a/src/lib/libcrypto/arch/i386/Makefile.inc b/src/lib/libcrypto/arch/i386/Makefile.inc
index c8e5a535e5..0722c4e5a0 100644
--- a/src/lib/libcrypto/arch/i386/Makefile.inc
+++ b/src/lib/libcrypto/arch/i386/Makefile.inc
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile.inc,v 1.19 2024/03/29 02:33:44 jsing Exp $ 1# $OpenBSD: Makefile.inc,v 1.20 2024/03/29 04:39:54 jsing Exp $
2 2
3# i386-specific libcrypto build rules 3# i386-specific libcrypto build rules
4 4
@@ -12,6 +12,9 @@ CFLAGS+= -DVPAES_ASM
12SSLASM+= aes vpaes-x86 12SSLASM+= aes vpaes-x86
13SSLASM+= aes aesni-x86 13SSLASM+= aes aesni-x86
14CFLAGS+= -DHAVE_AES_CBC_ENCRYPT_INTERNAL 14CFLAGS+= -DHAVE_AES_CBC_ENCRYPT_INTERNAL
15CFLAGS+= -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL
16CFLAGS+= -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL
17SRCS+= aes_core.c
15# bn 18# bn
16CFLAGS+= -DOPENSSL_IA32_SSE2 19CFLAGS+= -DOPENSSL_IA32_SSE2
17SSLASM+= bn bn-586 20SSLASM+= bn bn-586
diff --git a/src/lib/libcrypto/arch/mips64/Makefile.inc b/src/lib/libcrypto/arch/mips64/Makefile.inc
index 4fde831c9a..c8bcca6878 100644
--- a/src/lib/libcrypto/arch/mips64/Makefile.inc
+++ b/src/lib/libcrypto/arch/mips64/Makefile.inc
@@ -1,10 +1,13 @@
1# $OpenBSD: Makefile.inc,v 1.13 2024/03/29 02:33:44 jsing Exp $ 1# $OpenBSD: Makefile.inc,v 1.14 2024/03/29 04:39:54 jsing Exp $
2 2
3# mips64-specific libcrypto build rules 3# mips64-specific libcrypto build rules
4 4
5# aes 5# aes
6CFLAGS+= -DAES_ASM 6CFLAGS+= -DAES_ASM
7SSLASM+= aes aes-mips aes-mips 7SSLASM+= aes aes-mips aes-mips
8CFLAGS+= -DHAVE_AES_SET_ENCRYPT_KEY_INTERNAL
9CFLAGS+= -DHAVE_AES_SET_DECRYPT_KEY_INTERNAL
10SRCS+= aes_core.c
8# bn 11# bn
9SSLASM+= bn mips bn-mips 12SSLASM+= bn mips bn-mips
10SSLASM+= bn mips-mont mips-mont 13SSLASM+= bn mips-mont mips-mont