-# $OpenBSD: Makefile,v 1.148 2023/07/28 10:17:21 tb Exp $
+# $OpenBSD: Makefile,v 1.149 2023/07/28 10:35:14 tb Exp $
LIB= crypto
LIBREBUILD=y
SRCS+= aes_ctr.c
SRCS+= aes_ecb.c
SRCS+= aes_ige.c
-SRCS+= aes_misc.c
SRCS+= aes_ofb.c
SRCS+= aes_wrap.c
AES_encrypt
AES_ige_encrypt
AES_ofb128_encrypt
-AES_options
AES_set_decrypt_key
AES_set_encrypt_key
AES_unwrap_key
BF_ecb_encrypt
BF_encrypt
BF_ofb64_encrypt
-BF_options
BF_set_key
BIGNUM_it
BIO_CONNECT_free
BN_num_bits
BN_num_bits_word
BN_one
-BN_options
BN_print
BN_print_fp
BN_pseudo_rand
DES_ncbc_encrypt
DES_ofb64_encrypt
DES_ofb_encrypt
-DES_options
DES_pcbc_encrypt
DES_quad_cksum
DES_random_key
RC2_ofb64_encrypt
RC2_set_key
RC4
-RC4_options
RC4_set_key
RIPEMD160
RIPEMD160_Final
idea_ecb_encrypt
idea_encrypt
idea_ofb64_encrypt
-idea_options
idea_set_decrypt_key
idea_set_encrypt_key
lh_delete
-/* $OpenBSD: aes_misc.c,v 1.11 2022/11/26 16:08:50 tb Exp $ */
-/* ====================================================================
- * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- */
-
-#include <openssl/opensslv.h>
-#include <openssl/crypto.h>
-#include <openssl/aes.h>
-#include "aes_local.h"
-
-const char *
-AES_options(void)
-{
-#ifdef FULL_UNROLL
- return "aes(full)";
-#else
- return "aes(partial)";
-#endif
-}
-/* $OpenBSD: bf_ecb.c,v 1.9 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: bf_ecb.c,v 1.10 2023/07/28 10:35:14 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
*/
-const char *
-BF_options(void)
-{
-#ifdef BF_PTR
- return("blowfish(ptr)");
-#elif defined(BF_PTR2)
- return("blowfish(ptr2)");
-#else
- return("blowfish(idx)");
-#endif
-}
-
void
BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
const BF_KEY *key, int encrypt)
-/* $OpenBSD: bn_lib.c,v 1.89 2023/07/08 12:21:58 beck Exp $ */
+/* $OpenBSD: bn_lib.c,v 1.90 2023/07/28 10:35:14 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
LCRYPTO_ALIAS(BN_is_negative);
-char *
-BN_options(void)
-{
- static int init = 0;
- static char data[16];
-
- if (!init) {
- init++;
-#ifdef BN_LLONG
- snprintf(data,sizeof data, "bn(%d,%d)",
- (int)sizeof(BN_ULLONG) * 8, (int)sizeof(BN_ULONG) * 8);
-#else
- snprintf(data,sizeof data, "bn(%d,%d)",
- (int)sizeof(BN_ULONG) * 8, (int)sizeof(BN_ULONG) * 8);
-#endif
- }
- return (data);
-}
-LCRYPTO_ALIAS(BN_options);
-
/*
* Bits of security, see SP800-57, section 5.6.11, table 2.
*/
-/* $OpenBSD: i_ecb.c,v 1.6 2023/07/08 10:44:00 beck Exp $ */
+/* $OpenBSD: i_ecb.c,v 1.7 2023/07/28 10:35:14 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include "idea_local.h"
#include <openssl/opensslv.h>
-const char *
-idea_options(void)
-{
- if (sizeof(short) != sizeof(IDEA_INT))
- return ("idea(int)");
- else
- return ("idea(short)");
-}
-LCRYPTO_ALIAS(idea_options);
-
void
idea_ecb_encrypt(const unsigned char *in, unsigned char *out,
IDEA_KEY_SCHEDULE *ks)
&mov (&DWP(-4,$out),"eax"); # key->y=0;
&function_end("RC4_set_key");
-# const char *RC4_options(void);
-&static_label("opts");
-&function_begin_B("RC4_options");
- &picsetup("edx");
- &picsymbol("eax", &label("opts"), "edx");
- &picsymbol("edx", "OPENSSL_ia32cap_P", "edx");;
-
- &mov ("edx",&DWP(0,"edx"));
- &bt ("edx","\$IA32CAP_BIT0_INTELP4");
- &jc (&label("1xchar"));
- &bt ("edx","\$IA32CAP_BIT0_SSE2");
- &jnc (&label("ret"));
- &add ("eax",25);
- &ret ();
-&set_label("1xchar");
- &add ("eax",12);
-&set_label("ret");
- &ret ();
-&function_end_B("RC4_options");
-
- &rodataseg();
-&set_label("opts");
-&asciz ("rc4(4x,int)");
-&asciz ("rc4(1x,char)");
-&asciz ("rc4(8x,mmx)");
- &previous();
-
&asm_finish();
-
mov %eax,-4($dat)
ret
.size RC4_set_key,.-RC4_set_key
-
-.globl RC4_options
-.type RC4_options,\@abi-omnipotent
-.align 16
-RC4_options:
- endbr64
- lea .Lopts(%rip),%rax
- ret
-.align 64
-.Lopts:
-.asciz "rc4(64x,int)"
-.align 64
-.size RC4_options,.-RC4_options
___
}
nop
.PROCEND
- .EXPORT RC4_options,ENTRY
- .ALIGN 8
-RC4_options
- .PROC
- .CALLINFO NO_CALLS
- .ENTRY
-#ifdef __PIC__
- addil LT'L\$opts, %r19
- ldw RT'L\$opts(%r1), %r28
-#else
- ldil L'L\$opts, %t1
- ldo R'L\$opts(%t1), %r28
-#endif
- bv (%r2)
- .EXIT
- nop
- .PROCEND
-
.section .rodata
.ALIGN 8
L\$opts
mov %eax,-4($dat)
ret
.size RC4_set_key,.-RC4_set_key
-
-.globl RC4_options
-.type RC4_options,\@abi-omnipotent
-.align 16
-RC4_options:
- endbr64
- lea .Lopts(%rip),%rax
- mov OPENSSL_ia32cap_P(%rip),%edx
- bt \$IA32CAP_BIT0_INTELP4,%edx
- jc .L8xchar
- bt \$IA32CAP_BIT0_INTEL,%edx
- jnc .Ldone
- add \$25,%rax
- ret
-.L8xchar:
- add \$12,%rax
-.Ldone:
- ret
-.section .rodata
-.align 64
-.Lopts:
-.asciz "rc4(8x,int)"
-.asciz "rc4(8x,char)"
-.asciz "rc4(16x,int)"
-.align 64
-.text
-.size RC4_options,.-RC4_options
___
sub reg_part {
-/* $OpenBSD: rc4.h,v 1.13 2015/10/20 15:50:13 jsing Exp $ */
+/* $OpenBSD: rc4.h,v 1.14 2023/07/28 10:35:14 tb Exp $ */
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
RC4_INT data[256];
} RC4_KEY;
-const char *RC4_options(void);
void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
-/* $OpenBSD: rc4_skey.c,v 1.15 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rc4_skey.c,v 1.16 2023/07/28 10:35:14 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
*/
#include <openssl/rc4.h>
-#include "rc4_local.h"
-#include <openssl/opensslv.h>
-const char *
-RC4_options(void)
-{
-#ifdef RC4_INDEX
- if (sizeof(RC4_INT) == 1)
- return("rc4(idx,char)");
- else
- return("rc4(idx,int)");
-#else
- if (sizeof(RC4_INT) == 1)
- return("rc4(ptr,char)");
- else
- return("rc4(ptr,int)");
-#endif
-}
+#include "rc4_local.h"
/* RC4 as implemented from a posting from
* Newsgroups: sci.crypt