summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/arch/aarch64/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/alpha/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/amd64/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/arm/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/hppa/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/i386/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/m88k/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/mips64/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/powerpc/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/powerpc64/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/riscv64/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/sh/opensslconf.h5
-rw-r--r--src/lib/libcrypto/arch/sparc64/opensslconf.h5
-rw-r--r--src/lib/libcrypto/bf/bf_local.h47
14 files changed, 3 insertions, 109 deletions
diff --git a/src/lib/libcrypto/arch/aarch64/opensslconf.h b/src/lib/libcrypto/arch/aarch64/opensslconf.h
index 3aaa6bd0b8..49cdf69a38 100644
--- a/src/lib/libcrypto/arch/aarch64/opensslconf.h
+++ b/src/lib/libcrypto/arch/aarch64/opensslconf.h
@@ -27,11 +27,6 @@
27#undef BN_LLONG 27#undef BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/alpha/opensslconf.h b/src/lib/libcrypto/arch/alpha/opensslconf.h
index 47756e45ef..4df543da45 100644
--- a/src/lib/libcrypto/arch/alpha/opensslconf.h
+++ b/src/lib/libcrypto/arch/alpha/opensslconf.h
@@ -27,11 +27,6 @@
27#undef BN_LLONG 27#undef BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#define BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/amd64/opensslconf.h b/src/lib/libcrypto/arch/amd64/opensslconf.h
index 3aaa6bd0b8..49cdf69a38 100644
--- a/src/lib/libcrypto/arch/amd64/opensslconf.h
+++ b/src/lib/libcrypto/arch/amd64/opensslconf.h
@@ -27,11 +27,6 @@
27#undef BN_LLONG 27#undef BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/arm/opensslconf.h b/src/lib/libcrypto/arch/arm/opensslconf.h
index ee2111390a..639b15e8f4 100644
--- a/src/lib/libcrypto/arch/arm/opensslconf.h
+++ b/src/lib/libcrypto/arch/arm/opensslconf.h
@@ -27,11 +27,6 @@
27#define BN_LLONG 27#define BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/hppa/opensslconf.h b/src/lib/libcrypto/arch/hppa/opensslconf.h
index ee2111390a..639b15e8f4 100644
--- a/src/lib/libcrypto/arch/hppa/opensslconf.h
+++ b/src/lib/libcrypto/arch/hppa/opensslconf.h
@@ -27,11 +27,6 @@
27#define BN_LLONG 27#define BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/i386/opensslconf.h b/src/lib/libcrypto/arch/i386/opensslconf.h
index ee2111390a..639b15e8f4 100644
--- a/src/lib/libcrypto/arch/i386/opensslconf.h
+++ b/src/lib/libcrypto/arch/i386/opensslconf.h
@@ -27,11 +27,6 @@
27#define BN_LLONG 27#define BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/m88k/opensslconf.h b/src/lib/libcrypto/arch/m88k/opensslconf.h
index ee2111390a..639b15e8f4 100644
--- a/src/lib/libcrypto/arch/m88k/opensslconf.h
+++ b/src/lib/libcrypto/arch/m88k/opensslconf.h
@@ -27,11 +27,6 @@
27#define BN_LLONG 27#define BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/mips64/opensslconf.h b/src/lib/libcrypto/arch/mips64/opensslconf.h
index 47756e45ef..4df543da45 100644
--- a/src/lib/libcrypto/arch/mips64/opensslconf.h
+++ b/src/lib/libcrypto/arch/mips64/opensslconf.h
@@ -27,11 +27,6 @@
27#undef BN_LLONG 27#undef BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#define BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/powerpc/opensslconf.h b/src/lib/libcrypto/arch/powerpc/opensslconf.h
index ee2111390a..639b15e8f4 100644
--- a/src/lib/libcrypto/arch/powerpc/opensslconf.h
+++ b/src/lib/libcrypto/arch/powerpc/opensslconf.h
@@ -27,11 +27,6 @@
27#define BN_LLONG 27#define BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/powerpc64/opensslconf.h b/src/lib/libcrypto/arch/powerpc64/opensslconf.h
index 3aaa6bd0b8..49cdf69a38 100644
--- a/src/lib/libcrypto/arch/powerpc64/opensslconf.h
+++ b/src/lib/libcrypto/arch/powerpc64/opensslconf.h
@@ -27,11 +27,6 @@
27#undef BN_LLONG 27#undef BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/riscv64/opensslconf.h b/src/lib/libcrypto/arch/riscv64/opensslconf.h
index 3aaa6bd0b8..49cdf69a38 100644
--- a/src/lib/libcrypto/arch/riscv64/opensslconf.h
+++ b/src/lib/libcrypto/arch/riscv64/opensslconf.h
@@ -27,11 +27,6 @@
27#undef BN_LLONG 27#undef BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/sh/opensslconf.h b/src/lib/libcrypto/arch/sh/opensslconf.h
index ee2111390a..639b15e8f4 100644
--- a/src/lib/libcrypto/arch/sh/opensslconf.h
+++ b/src/lib/libcrypto/arch/sh/opensslconf.h
@@ -27,11 +27,6 @@
27#define BN_LLONG 27#define BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#undef BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/arch/sparc64/opensslconf.h b/src/lib/libcrypto/arch/sparc64/opensslconf.h
index 47756e45ef..4df543da45 100644
--- a/src/lib/libcrypto/arch/sparc64/opensslconf.h
+++ b/src/lib/libcrypto/arch/sparc64/opensslconf.h
@@ -27,11 +27,6 @@
27#undef BN_LLONG 27#undef BN_LLONG
28#endif 28#endif
29 29
30#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
31#define CONFIG_HEADER_BF_LOCL_H
32#define BF_PTR
33#endif /* HEADER_BF_LOCL_H */
34
35#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 30#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
36#define CONFIG_HEADER_DES_LOCL_H 31#define CONFIG_HEADER_DES_LOCL_H
37#ifndef DES_DEFAULT_OPTIONS 32#ifndef DES_DEFAULT_OPTIONS
diff --git a/src/lib/libcrypto/bf/bf_local.h b/src/lib/libcrypto/bf/bf_local.h
index 8fc5a5dbd8..2fe65eb85c 100644
--- a/src/lib/libcrypto/bf/bf_local.h
+++ b/src/lib/libcrypto/bf/bf_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_local.h,v 1.3 2024/03/27 11:54:29 jsing Exp $ */ 1/* $OpenBSD: bf_local.h,v 1.4 2025/06/11 04:08:16 tb Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -56,11 +56,11 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> /* BF_PTR */
60
61#ifndef HEADER_BF_LOCL_H 59#ifndef HEADER_BF_LOCL_H
62#define HEADER_BF_LOCL_H 60#define HEADER_BF_LOCL_H
63 61
62#include <openssl/opensslconf.h>
63
64/* NOTE - c is not incremented as per n2l */ 64/* NOTE - c is not incremented as per n2l */
65#define n2ln(c,l1,l2,n) { \ 65#define n2ln(c,l1,l2,n) { \
66 c+=n; \ 66 c+=n; \
@@ -104,46 +104,6 @@
104 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ 104 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
105 *((c)++)=(unsigned char)(((l) )&0xff)) 105 *((c)++)=(unsigned char)(((l) )&0xff))
106 106
107/* This is actually a big endian algorithm, the most significant byte
108 * is used to lookup array 0 */
109
110#if defined(BF_PTR)
111
112#ifndef BF_LONG_LOG2
113#define BF_LONG_LOG2 2 /* default to BF_LONG being 32 bits */
114#endif
115#define BF_M (0xFF<<BF_LONG_LOG2)
116#define BF_0 (24-BF_LONG_LOG2)
117#define BF_1 (16-BF_LONG_LOG2)
118#define BF_2 ( 8-BF_LONG_LOG2)
119#define BF_3 BF_LONG_LOG2 /* left shift */
120
121/*
122 * This is normally very good on RISC platforms where normally you
123 * have to explicitly "multiply" array index by sizeof(BF_LONG)
124 * in order to calculate the effective address. This implementation
125 * excuses CPU from this extra work. Power[PC] uses should have most
126 * fun as (R>>BF_i)&BF_M gets folded into a single instruction, namely
127 * rlwinm. So let'em double-check if their compiler does it.
128 */
129
130#define BF_ENC(LL,R,S,P) ( \
131 LL^=P, \
132 LL^= (((*(BF_LONG *)((unsigned char *)&(S[ 0])+((R>>BF_0)&BF_M))+ \
133 *(BF_LONG *)((unsigned char *)&(S[256])+((R>>BF_1)&BF_M)))^ \
134 *(BF_LONG *)((unsigned char *)&(S[512])+((R>>BF_2)&BF_M)))+ \
135 *(BF_LONG *)((unsigned char *)&(S[768])+((R<<BF_3)&BF_M))) \
136 )
137#else
138
139/*
140 * This is a *generic* version. Seem to perform best on platforms that
141 * offer explicit support for extraction of 8-bit nibbles preferably
142 * complemented with "multiplying" of array index by sizeof(BF_LONG).
143 * For the moment of this writing the list comprises Alpha CPU featuring
144 * extbl and s[48]addq instructions.
145 */
146
147#define BF_ENC(LL,R,S,P) ( \ 107#define BF_ENC(LL,R,S,P) ( \
148 LL^=P, \ 108 LL^=P, \
149 LL^=((( S[ ((int)(R>>24)&0xff)] + \ 109 LL^=((( S[ ((int)(R>>24)&0xff)] + \
@@ -151,6 +111,5 @@
151 S[0x0200+((int)(R>> 8)&0xff)])+ \ 111 S[0x0200+((int)(R>> 8)&0xff)])+ \
152 S[0x0300+((int)(R )&0xff)])&0xffffffffL \ 112 S[0x0300+((int)(R )&0xff)])&0xffffffffL \
153 ) 113 )
154#endif
155 114
156#endif 115#endif