_libre_SHA512_Final
_libre_SHA512
_libre_SHA512_Transform
+_libre_RSA_new
+_libre_RSA_new_method
+_libre_RSA_bits
+_libre_RSA_size
+_libre_RSA_generate_key
+_libre_RSA_generate_key_ex
+_libre_RSA_check_key
+_libre_RSA_public_encrypt
+_libre_RSA_private_encrypt
+_libre_RSA_public_decrypt
+_libre_RSA_private_decrypt
+_libre_RSA_free
+_libre_RSA_up_ref
+_libre_RSA_flags
+_libre_RSA_set_default_method
+_libre_RSA_get_default_method
+_libre_RSA_get_method
+_libre_RSA_set_method
+_libre_RSA_PKCS1_OpenSSL
+_libre_RSA_PKCS1_SSLeay
+_libre_RSA_pkey_ctx_ctrl
+_libre_d2i_RSAPublicKey
+_libre_i2d_RSAPublicKey
+_libre_d2i_RSAPrivateKey
+_libre_i2d_RSAPrivateKey
+_libre_RSA_PSS_PARAMS_new
+_libre_RSA_PSS_PARAMS_free
+_libre_d2i_RSA_PSS_PARAMS
+_libre_i2d_RSA_PSS_PARAMS
+_libre_RSA_OAEP_PARAMS_new
+_libre_RSA_OAEP_PARAMS_free
+_libre_d2i_RSA_OAEP_PARAMS
+_libre_i2d_RSA_OAEP_PARAMS
+_libre_RSA_print_fp
+_libre_RSA_print
+_libre_RSA_sign
+_libre_RSA_verify
+_libre_RSA_sign_ASN1_OCTET_STRING
+_libre_RSA_verify_ASN1_OCTET_STRING
+_libre_RSA_blinding_on
+_libre_RSA_blinding_off
+_libre_RSA_setup_blinding
+_libre_RSA_padding_add_PKCS1_type_1
+_libre_RSA_padding_check_PKCS1_type_1
+_libre_RSA_padding_add_PKCS1_type_2
+_libre_RSA_padding_check_PKCS1_type_2
+_libre_PKCS1_MGF1
+_libre_RSA_padding_add_PKCS1_OAEP
+_libre_RSA_padding_check_PKCS1_OAEP
+_libre_RSA_padding_add_PKCS1_OAEP_mgf1
+_libre_RSA_padding_check_PKCS1_OAEP_mgf1
+_libre_RSA_padding_add_none
+_libre_RSA_padding_check_none
+_libre_RSA_verify_PKCS1_PSS
+_libre_RSA_padding_add_PKCS1_PSS
+_libre_RSA_verify_PKCS1_PSS_mgf1
+_libre_RSA_padding_add_PKCS1_PSS_mgf1
+_libre_RSA_get_ex_new_index
+_libre_RSA_set_ex_data
+_libre_RSA_get_ex_data
+_libre_RSA_security_bits
+_libre_RSA_get0_key
+_libre_RSA_set0_key
+_libre_RSA_get0_crt_params
+_libre_RSA_set0_crt_params
+_libre_RSA_get0_factors
+_libre_RSA_set0_factors
+_libre_RSA_get0_n
+_libre_RSA_get0_e
+_libre_RSA_get0_d
+_libre_RSA_get0_p
+_libre_RSA_get0_q
+_libre_RSA_get0_dmp1
+_libre_RSA_get0_dmq1
+_libre_RSA_get0_iqmp
+_libre_RSA_get0_pss_params
+_libre_RSA_clear_flags
+_libre_RSA_test_flags
+_libre_RSA_set_flags
+_libre_RSAPublicKey_dup
+_libre_RSAPrivateKey_dup
+_libre_RSA_meth_new
+_libre_RSA_meth_free
+_libre_RSA_meth_dup
+_libre_RSA_meth_set1_name
+_libre_RSA_meth_set_priv_enc
+_libre_RSA_meth_set_priv_dec
+_libre_RSA_meth_get_finish
+_libre_RSA_meth_set_finish
+_libre_RSA_meth_set_pub_enc
+_libre_RSA_meth_set_pub_dec
+_libre_RSA_meth_set_mod_exp
+_libre_RSA_meth_set_bn_mod_exp
+_libre_RSA_meth_set_init
+_libre_RSA_meth_set_keygen
+_libre_RSA_meth_set_flags
+_libre_RSA_meth_set0_app_data
+_libre_RSA_meth_get0_name
+_libre_RSA_meth_get_pub_enc
+_libre_RSA_meth_get_pub_dec
+_libre_RSA_meth_get_priv_enc
+_libre_RSA_meth_get_priv_dec
+_libre_RSA_meth_get_mod_exp
+_libre_RSA_meth_get_bn_mod_exp
+_libre_RSA_meth_get_init
+_libre_RSA_meth_get_keygen
+_libre_RSA_meth_get_flags
+_libre_RSA_meth_get0_app_data
+_libre_RSA_meth_get_sign
+_libre_RSA_meth_set_sign
+_libre_RSA_meth_get_verify
+_libre_RSA_meth_set_verify
+_libre_ERR_load_RSA_strings
--- /dev/null
+/* $OpenBSD: rsa.h,v 1.1 2023/07/08 12:26:45 beck Exp $ */
+/*
+ * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBCRYPTO_RSA_H
+#define _LIBCRYPTO_RSA_H
+
+#ifndef _MSC_VER
+#include_next <openssl/rsa.h>
+#else
+#include "../include/openssl/rsa.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(RSA_new);
+LCRYPTO_USED(RSA_new_method);
+LCRYPTO_USED(RSA_bits);
+LCRYPTO_USED(RSA_size);
+LCRYPTO_USED(RSA_generate_key);
+LCRYPTO_USED(RSA_generate_key_ex);
+LCRYPTO_USED(RSA_check_key);
+LCRYPTO_USED(RSA_public_encrypt);
+LCRYPTO_USED(RSA_private_encrypt);
+LCRYPTO_USED(RSA_public_decrypt);
+LCRYPTO_USED(RSA_private_decrypt);
+LCRYPTO_USED(RSA_free);
+LCRYPTO_USED(RSA_up_ref);
+LCRYPTO_USED(RSA_flags);
+LCRYPTO_USED(RSA_set_default_method);
+LCRYPTO_USED(RSA_get_default_method);
+LCRYPTO_USED(RSA_get_method);
+LCRYPTO_USED(RSA_set_method);
+LCRYPTO_USED(RSA_PKCS1_OpenSSL);
+LCRYPTO_USED(RSA_PKCS1_SSLeay);
+LCRYPTO_USED(RSA_pkey_ctx_ctrl);
+LCRYPTO_USED(d2i_RSAPublicKey);
+LCRYPTO_USED(i2d_RSAPublicKey);
+LCRYPTO_USED(d2i_RSAPrivateKey);
+LCRYPTO_USED(i2d_RSAPrivateKey);
+LCRYPTO_USED(RSA_PSS_PARAMS_new);
+LCRYPTO_USED(RSA_PSS_PARAMS_free);
+LCRYPTO_USED(d2i_RSA_PSS_PARAMS);
+LCRYPTO_USED(i2d_RSA_PSS_PARAMS);
+LCRYPTO_USED(RSA_OAEP_PARAMS_new);
+LCRYPTO_USED(RSA_OAEP_PARAMS_free);
+LCRYPTO_USED(d2i_RSA_OAEP_PARAMS);
+LCRYPTO_USED(i2d_RSA_OAEP_PARAMS);
+LCRYPTO_USED(RSA_print_fp);
+LCRYPTO_USED(RSA_print);
+LCRYPTO_USED(RSA_sign);
+LCRYPTO_USED(RSA_verify);
+LCRYPTO_USED(RSA_sign_ASN1_OCTET_STRING);
+LCRYPTO_USED(RSA_verify_ASN1_OCTET_STRING);
+LCRYPTO_USED(RSA_blinding_on);
+LCRYPTO_USED(RSA_blinding_off);
+LCRYPTO_USED(RSA_setup_blinding);
+LCRYPTO_USED(RSA_padding_add_PKCS1_type_1);
+LCRYPTO_USED(RSA_padding_check_PKCS1_type_1);
+LCRYPTO_USED(RSA_padding_add_PKCS1_type_2);
+LCRYPTO_USED(RSA_padding_check_PKCS1_type_2);
+LCRYPTO_USED(PKCS1_MGF1);
+LCRYPTO_USED(RSA_padding_add_PKCS1_OAEP);
+LCRYPTO_USED(RSA_padding_check_PKCS1_OAEP);
+LCRYPTO_USED(RSA_padding_add_PKCS1_OAEP_mgf1);
+LCRYPTO_USED(RSA_padding_check_PKCS1_OAEP_mgf1);
+LCRYPTO_USED(RSA_padding_add_none);
+LCRYPTO_USED(RSA_padding_check_none);
+LCRYPTO_USED(RSA_verify_PKCS1_PSS);
+LCRYPTO_USED(RSA_padding_add_PKCS1_PSS);
+LCRYPTO_USED(RSA_verify_PKCS1_PSS_mgf1);
+LCRYPTO_USED(RSA_padding_add_PKCS1_PSS_mgf1);
+LCRYPTO_USED(RSA_get_ex_new_index);
+LCRYPTO_USED(RSA_set_ex_data);
+LCRYPTO_USED(RSA_get_ex_data);
+LCRYPTO_USED(RSA_security_bits);
+LCRYPTO_USED(RSA_get0_key);
+LCRYPTO_USED(RSA_set0_key);
+LCRYPTO_USED(RSA_get0_crt_params);
+LCRYPTO_USED(RSA_set0_crt_params);
+LCRYPTO_USED(RSA_get0_factors);
+LCRYPTO_USED(RSA_set0_factors);
+LCRYPTO_USED(RSA_get0_n);
+LCRYPTO_USED(RSA_get0_e);
+LCRYPTO_USED(RSA_get0_d);
+LCRYPTO_USED(RSA_get0_p);
+LCRYPTO_USED(RSA_get0_q);
+LCRYPTO_USED(RSA_get0_dmp1);
+LCRYPTO_USED(RSA_get0_dmq1);
+LCRYPTO_USED(RSA_get0_iqmp);
+LCRYPTO_USED(RSA_get0_pss_params);
+LCRYPTO_USED(RSA_clear_flags);
+LCRYPTO_USED(RSA_test_flags);
+LCRYPTO_USED(RSA_set_flags);
+LCRYPTO_USED(RSAPublicKey_dup);
+LCRYPTO_USED(RSAPrivateKey_dup);
+LCRYPTO_USED(RSA_meth_new);
+LCRYPTO_USED(RSA_meth_free);
+LCRYPTO_USED(RSA_meth_dup);
+LCRYPTO_USED(RSA_meth_set1_name);
+LCRYPTO_USED(RSA_meth_set_priv_enc);
+LCRYPTO_USED(RSA_meth_set_priv_dec);
+LCRYPTO_USED(RSA_meth_get_finish);
+LCRYPTO_USED(RSA_meth_set_finish);
+LCRYPTO_USED(RSA_meth_set_pub_enc);
+LCRYPTO_USED(RSA_meth_set_pub_dec);
+LCRYPTO_USED(RSA_meth_set_mod_exp);
+LCRYPTO_USED(RSA_meth_set_bn_mod_exp);
+LCRYPTO_USED(RSA_meth_set_init);
+LCRYPTO_USED(RSA_meth_set_keygen);
+LCRYPTO_USED(RSA_meth_set_flags);
+LCRYPTO_USED(RSA_meth_set0_app_data);
+LCRYPTO_USED(RSA_meth_get0_name);
+LCRYPTO_USED(RSA_meth_get_pub_enc);
+LCRYPTO_USED(RSA_meth_get_pub_dec);
+LCRYPTO_USED(RSA_meth_get_priv_enc);
+LCRYPTO_USED(RSA_meth_get_priv_dec);
+LCRYPTO_USED(RSA_meth_get_mod_exp);
+LCRYPTO_USED(RSA_meth_get_bn_mod_exp);
+LCRYPTO_USED(RSA_meth_get_init);
+LCRYPTO_USED(RSA_meth_get_keygen);
+LCRYPTO_USED(RSA_meth_get_flags);
+LCRYPTO_USED(RSA_meth_get0_app_data);
+LCRYPTO_USED(RSA_meth_get_sign);
+LCRYPTO_USED(RSA_meth_set_sign);
+LCRYPTO_USED(RSA_meth_get_verify);
+LCRYPTO_USED(RSA_meth_set_verify);
+LCRYPTO_USED(ERR_load_RSA_strings);
+
+#endif /* _LIBCRYPTO_RSA_H */
-/* $OpenBSD: rsa_asn1.c,v 1.16 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rsa_asn1.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
return (RSA_PSS_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
&RSA_PSS_PARAMS_it);
}
+LCRYPTO_ALIAS(d2i_RSA_PSS_PARAMS);
int
i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out)
{
return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_PSS_PARAMS_it);
}
+LCRYPTO_ALIAS(i2d_RSA_PSS_PARAMS);
RSA_PSS_PARAMS *
RSA_PSS_PARAMS_new(void)
{
return (RSA_PSS_PARAMS *)ASN1_item_new(&RSA_PSS_PARAMS_it);
}
+LCRYPTO_ALIAS(RSA_PSS_PARAMS_new);
void
RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a)
{
ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it);
}
+LCRYPTO_ALIAS(RSA_PSS_PARAMS_free);
static int
rsa_oaep_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
return (RSA_OAEP_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
&RSA_OAEP_PARAMS_it);
}
+LCRYPTO_ALIAS(d2i_RSA_OAEP_PARAMS);
int
i2d_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS *a, unsigned char **out)
{
return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_OAEP_PARAMS_it);
}
+LCRYPTO_ALIAS(i2d_RSA_OAEP_PARAMS);
RSA_OAEP_PARAMS *
RSA_OAEP_PARAMS_new(void)
{
return (RSA_OAEP_PARAMS *)ASN1_item_new(&RSA_OAEP_PARAMS_it);
}
+LCRYPTO_ALIAS(RSA_OAEP_PARAMS_new);
void
RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a)
{
ASN1_item_free((ASN1_VALUE *)a, &RSA_OAEP_PARAMS_it);
}
+LCRYPTO_ALIAS(RSA_OAEP_PARAMS_free);
RSA *
d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len)
return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
&RSAPrivateKey_it);
}
+LCRYPTO_ALIAS(d2i_RSAPrivateKey);
int
i2d_RSAPrivateKey(const RSA *a, unsigned char **out)
{
return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPrivateKey_it);
}
+LCRYPTO_ALIAS(i2d_RSAPrivateKey);
RSA *
return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
&RSAPublicKey_it);
}
+LCRYPTO_ALIAS(d2i_RSAPublicKey);
int
i2d_RSAPublicKey(const RSA *a, unsigned char **out)
{
return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPublicKey_it);
}
+LCRYPTO_ALIAS(i2d_RSAPublicKey);
RSA *
RSAPublicKey_dup(RSA *rsa)
{
return ASN1_item_dup(&RSAPublicKey_it, rsa);
}
+LCRYPTO_ALIAS(RSAPublicKey_dup);
RSA *
RSAPrivateKey_dup(RSA *rsa)
{
return ASN1_item_dup(&RSAPrivateKey_it, rsa);
}
+LCRYPTO_ALIAS(RSAPrivateKey_dup);
-/* $OpenBSD: rsa_chk.c,v 1.17 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rsa_chk.c,v 1.18 2023/07/08 12:26:45 beck Exp $ */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
*
return (ret);
}
+LCRYPTO_ALIAS(RSA_check_key);
-/* $OpenBSD: rsa_crpt.c,v 1.21 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rsa_crpt.c,v 1.22 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
{
return BN_num_bits(r->n);
}
+LCRYPTO_ALIAS(RSA_bits);
int
RSA_size(const RSA *r)
{
return BN_num_bytes(r->n);
}
+LCRYPTO_ALIAS(RSA_size);
int
RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
{
return rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding);
}
+LCRYPTO_ALIAS(RSA_public_encrypt);
int
RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
{
return rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding);
}
+LCRYPTO_ALIAS(RSA_private_encrypt);
int
RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
{
return rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding);
}
+LCRYPTO_ALIAS(RSA_private_decrypt);
int
RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
{
return rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding);
}
+LCRYPTO_ALIAS(RSA_public_decrypt);
int
RSA_flags(const RSA *r)
{
return r == NULL ? 0 : r->meth->flags;
}
+LCRYPTO_ALIAS(RSA_flags);
void
RSA_blinding_off(RSA *rsa)
rsa->blinding = NULL;
rsa->flags |= RSA_FLAG_NO_BLINDING;
}
+LCRYPTO_ALIAS(RSA_blinding_off);
int
RSA_blinding_on(RSA *rsa, BN_CTX *ctx)
err:
return (ret);
}
+LCRYPTO_ALIAS(RSA_blinding_on);
static BIGNUM *
rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q,
return ret;
}
+LCRYPTO_ALIAS(RSA_setup_blinding);
-/* $OpenBSD: rsa_eay.c,v 1.61 2023/07/07 10:11:23 jsing Exp $ */
+/* $OpenBSD: rsa_eay.c,v 1.62 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
{
return &rsa_pkcs1_meth;
}
+LCRYPTO_ALIAS(RSA_PKCS1_OpenSSL);
const RSA_METHOD *
RSA_PKCS1_SSLeay(void)
{
return RSA_PKCS1_OpenSSL();
}
-
+LCRYPTO_ALIAS(RSA_PKCS1_SSLeay);
-/* $OpenBSD: rsa_err.c,v 1.21 2022/07/12 14:42:50 kn Exp $ */
+/* $OpenBSD: rsa_err.c,v 1.22 2023/07/08 12:26:45 beck Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
}
#endif
}
+LCRYPTO_ALIAS(ERR_load_RSA_strings);
-/* $OpenBSD: rsa_gen.c,v 1.29 2023/04/13 15:18:29 tb Exp $ */
+/* $OpenBSD: rsa_gen.c,v 1.30 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
return rsa_builtin_keygen(rsa, bits, e_value, cb);
}
+LCRYPTO_ALIAS(RSA_generate_key_ex);
static int
rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb)
return 0;
}
+LCRYPTO_ALIAS(RSA_generate_key);
-/* $OpenBSD: rsa_lib.c,v 1.46 2023/03/11 21:14:26 tb Exp $ */
+/* $OpenBSD: rsa_lib.c,v 1.47 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
return r;
}
+LCRYPTO_ALIAS(RSA_new);
void
RSA_set_default_method(const RSA_METHOD *meth)
{
default_RSA_meth = meth;
}
+LCRYPTO_ALIAS(RSA_set_default_method);
const RSA_METHOD *
RSA_get_default_method(void)
return default_RSA_meth;
}
+LCRYPTO_ALIAS(RSA_get_default_method);
const RSA_METHOD *
RSA_get_method(const RSA *rsa)
{
return rsa->meth;
}
+LCRYPTO_ALIAS(RSA_get_method);
int
RSA_set_method(RSA *rsa, const RSA_METHOD *meth)
meth->init(rsa);
return 1;
}
+LCRYPTO_ALIAS(RSA_set_method);
RSA *
RSA_new_method(ENGINE *engine)
return NULL;
}
+LCRYPTO_ALIAS(RSA_new_method);
void
RSA_free(RSA *r)
RSA_PSS_PARAMS_free(r->pss);
free(r);
}
+LCRYPTO_ALIAS(RSA_free);
int
RSA_up_ref(RSA *r)
int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA);
return i > 1 ? 1 : 0;
}
+LCRYPTO_ALIAS(RSA_up_ref);
int
RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, argl, argp,
new_func, dup_func, free_func);
}
+LCRYPTO_ALIAS(RSA_get_ex_new_index);
int
RSA_set_ex_data(RSA *r, int idx, void *arg)
{
return CRYPTO_set_ex_data(&r->ex_data, idx, arg);
}
+LCRYPTO_ALIAS(RSA_set_ex_data);
void *
RSA_get_ex_data(const RSA *r, int idx)
{
return CRYPTO_get_ex_data(&r->ex_data, idx);
}
+LCRYPTO_ALIAS(RSA_get_ex_data);
int
RSA_security_bits(const RSA *rsa)
{
return BN_security_bits(RSA_bits(rsa), -1);
}
+LCRYPTO_ALIAS(RSA_security_bits);
void
RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
if (d != NULL)
*d = r->d;
}
+LCRYPTO_ALIAS(RSA_get0_key);
int
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
return 1;
}
+LCRYPTO_ALIAS(RSA_set0_key);
void
RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1,
if (iqmp != NULL)
*iqmp = r->iqmp;
}
+LCRYPTO_ALIAS(RSA_get0_crt_params);
int
RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
return 1;
}
+LCRYPTO_ALIAS(RSA_set0_crt_params);
void
RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
if (q != NULL)
*q = r->q;
}
+LCRYPTO_ALIAS(RSA_get0_factors);
int
RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
return 1;
}
+LCRYPTO_ALIAS(RSA_set0_factors);
const BIGNUM *
RSA_get0_n(const RSA *r)
{
return r->n;
}
+LCRYPTO_ALIAS(RSA_get0_n);
const BIGNUM *
RSA_get0_e(const RSA *r)
{
return r->e;
}
+LCRYPTO_ALIAS(RSA_get0_e);
const BIGNUM *
RSA_get0_d(const RSA *r)
{
return r->d;
}
+LCRYPTO_ALIAS(RSA_get0_d);
const BIGNUM *
RSA_get0_p(const RSA *r)
{
return r->p;
}
+LCRYPTO_ALIAS(RSA_get0_p);
const BIGNUM *
RSA_get0_q(const RSA *r)
{
return r->q;
}
+LCRYPTO_ALIAS(RSA_get0_q);
const BIGNUM *
RSA_get0_dmp1(const RSA *r)
{
return r->dmp1;
}
+LCRYPTO_ALIAS(RSA_get0_dmp1);
const BIGNUM *
RSA_get0_dmq1(const RSA *r)
{
return r->dmq1;
}
+LCRYPTO_ALIAS(RSA_get0_dmq1);
const BIGNUM *
RSA_get0_iqmp(const RSA *r)
{
return r->iqmp;
}
+LCRYPTO_ALIAS(RSA_get0_iqmp);
const RSA_PSS_PARAMS *
RSA_get0_pss_params(const RSA *r)
{
return r->pss;
}
+LCRYPTO_ALIAS(RSA_get0_pss_params);
void
RSA_clear_flags(RSA *r, int flags)
{
r->flags &= ~flags;
}
+LCRYPTO_ALIAS(RSA_clear_flags);
int
RSA_test_flags(const RSA *r, int flags)
{
return r->flags & flags;
}
+LCRYPTO_ALIAS(RSA_test_flags);
void
RSA_set_flags(RSA *r, int flags)
{
r->flags |= flags;
}
+LCRYPTO_ALIAS(RSA_set_flags);
int
RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2)
return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, p1, p2);
}
+LCRYPTO_ALIAS(RSA_pkey_ctx_ctrl);
-/* $OpenBSD: rsa_meth.c,v 1.6 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rsa_meth.c,v 1.7 2023/07/08 12:26:45 beck Exp $ */
/*
* Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
*
return meth;
}
+LCRYPTO_ALIAS(RSA_meth_new);
void
RSA_meth_free(RSA_METHOD *meth)
free(meth->name);
free(meth);
}
+LCRYPTO_ALIAS(RSA_meth_free);
RSA_METHOD *
RSA_meth_dup(const RSA_METHOD *meth)
return copy;
}
+LCRYPTO_ALIAS(RSA_meth_dup);
int
RSA_meth_set1_name(RSA_METHOD *meth, const char *name)
meth->name = new_name;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set1_name);
int
(*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa)
{
return meth->finish;
}
+LCRYPTO_ALIAS(RSA_meth_get_finish);
int
RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen,
meth->rsa_priv_enc = priv_enc;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_priv_enc);
int
RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen,
meth->rsa_priv_dec = priv_dec;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_priv_dec);
int
RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa))
meth->finish = finish;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_finish);
int
RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen,
meth->rsa_pub_enc = pub_enc;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_pub_enc);
int
RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen,
meth->rsa_pub_dec = pub_dec;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_pub_dec);
int
RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0,
meth->rsa_mod_exp = mod_exp;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_mod_exp);
int
RSA_meth_set_bn_mod_exp(RSA_METHOD *meth, int (*bn_mod_exp)(BIGNUM *r,
meth->bn_mod_exp = bn_mod_exp;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_bn_mod_exp);
int
RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa))
meth->init = init;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_init);
int
RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits,
meth->rsa_keygen = keygen;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_keygen);
int
RSA_meth_set_flags(RSA_METHOD *meth, int flags)
meth->flags = flags;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_flags);
int
RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data)
meth->app_data = app_data;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set0_app_data);
const char *
RSA_meth_get0_name(const RSA_METHOD *meth)
{
return meth->name;
}
+LCRYPTO_ALIAS(RSA_meth_get0_name);
int
(*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen,
{
return meth->rsa_pub_enc;
}
+LCRYPTO_ALIAS(RSA_meth_get_pub_enc);
int
(*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen,
{
return meth->rsa_pub_dec;
}
+LCRYPTO_ALIAS(RSA_meth_get_pub_dec);
int
(*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen,
{
return meth->rsa_priv_enc;
}
+LCRYPTO_ALIAS(RSA_meth_get_priv_enc);
int
(*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen,
{
return meth->rsa_priv_dec;
}
+LCRYPTO_ALIAS(RSA_meth_get_priv_dec);
int
(*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i,
{
return meth->rsa_mod_exp;
}
+LCRYPTO_ALIAS(RSA_meth_get_mod_exp);
int
(*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r,
{
return meth->bn_mod_exp;
}
+LCRYPTO_ALIAS(RSA_meth_get_bn_mod_exp);
int
(*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa)
{
return meth->init;
}
+LCRYPTO_ALIAS(RSA_meth_get_init);
int
(*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e,
{
return meth->rsa_keygen;
}
+LCRYPTO_ALIAS(RSA_meth_get_keygen);
int
RSA_meth_get_flags(const RSA_METHOD *meth)
{
return meth->flags;
}
+LCRYPTO_ALIAS(RSA_meth_get_flags);
void *
RSA_meth_get0_app_data(const RSA_METHOD *meth)
{
return meth->app_data;
}
+LCRYPTO_ALIAS(RSA_meth_get0_app_data);
int
(*RSA_meth_get_sign(const RSA_METHOD *meth))(int type,
{
return meth->rsa_sign;
}
+LCRYPTO_ALIAS(RSA_meth_get_sign);
int
RSA_meth_set_sign(RSA_METHOD *meth, int (*sign)(int type,
meth->rsa_sign = sign;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_sign);
int
(*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype,
{
return meth->rsa_verify;
}
+LCRYPTO_ALIAS(RSA_meth_get_verify);
int
RSA_meth_set_verify(RSA_METHOD *meth, int (*verify)(int dtype,
meth->rsa_verify = verify;
return 1;
}
+LCRYPTO_ALIAS(RSA_meth_set_verify);
-/* $OpenBSD: rsa_none.c,v 1.11 2017/01/29 17:49:23 beck Exp $ */
+/* $OpenBSD: rsa_none.c,v 1.12 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
memcpy(to, from, flen);
return 1;
}
+LCRYPTO_ALIAS(RSA_padding_add_none);
int
RSA_padding_check_none(unsigned char *to, int tlen, const unsigned char *from,
memcpy(to + tlen - flen, from, flen);
return tlen;
}
+LCRYPTO_ALIAS(RSA_padding_check_none);
-/* $OpenBSD: rsa_oaep.c,v 1.36 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rsa_oaep.c,v 1.37 2023/07/08 12:26:45 beck Exp $ */
/*
* Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
*
return RSA_padding_add_PKCS1_OAEP_mgf1(to, tlen, from, flen, param,
plen, NULL, NULL);
}
+LCRYPTO_ALIAS(RSA_padding_add_PKCS1_OAEP);
int
RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
return rv;
}
+LCRYPTO_ALIAS(RSA_padding_add_PKCS1_OAEP_mgf1);
int
RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
return RSA_padding_check_PKCS1_OAEP_mgf1(to, tlen, from, flen, num,
param, plen, NULL, NULL);
}
+LCRYPTO_ALIAS(RSA_padding_check_PKCS1_OAEP);
int
RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
return constant_time_select_int(good, mlen, -1);
}
+LCRYPTO_ALIAS(RSA_padding_check_PKCS1_OAEP_mgf1);
int
PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
EVP_MD_CTX_cleanup(&c);
return rv;
}
+LCRYPTO_ALIAS(PKCS1_MGF1);
-/* $OpenBSD: rsa_pk1.c,v 1.15 2017/01/29 17:49:23 beck Exp $ */
+/* $OpenBSD: rsa_pk1.c,v 1.16 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
return 1;
}
+LCRYPTO_ALIAS(RSA_padding_add_PKCS1_type_1);
int
RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
return j;
}
+LCRYPTO_ALIAS(RSA_padding_check_PKCS1_type_1);
int
RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
memcpy(p, from, flen);
return 1;
}
+LCRYPTO_ALIAS(RSA_padding_add_PKCS1_type_2);
int
RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
return j;
}
+LCRYPTO_ALIAS(RSA_padding_check_PKCS1_type_2);
-/* $OpenBSD: rsa_pmeth.c,v 1.38 2023/05/05 12:21:44 tb Exp $ */
+/* $OpenBSD: rsa_pmeth.c,v 1.39 2023/07/08 12:26:45 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
.ctrl = pkey_rsa_ctrl,
.ctrl_str = pkey_rsa_ctrl_str
};
-
-/* $OpenBSD: rsa_prn.c,v 1.9 2022/11/08 19:19:08 tobhe Exp $ */
+/* $OpenBSD: rsa_prn.c,v 1.10 2023/07/08 12:26:45 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
BIO_free(b);
return ret;
}
+LCRYPTO_ALIAS(RSA_print_fp);
int
RSA_print(BIO *bp, const RSA *x, int off)
EVP_PKEY_free(pk);
return ret;
}
+LCRYPTO_ALIAS(RSA_print);
-/* $OpenBSD: rsa_pss.c,v 1.16 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rsa_pss.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2005.
*/
{
return RSA_verify_PKCS1_PSS_mgf1(rsa, mHash, Hash, NULL, EM, sLen);
}
+LCRYPTO_ALIAS(RSA_verify_PKCS1_PSS);
int
RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
return ret;
}
+LCRYPTO_ALIAS(RSA_verify_PKCS1_PSS_mgf1);
int
RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
{
return RSA_padding_add_PKCS1_PSS_mgf1(rsa, EM, mHash, Hash, NULL, sLen);
}
+LCRYPTO_ALIAS(RSA_padding_add_PKCS1_PSS);
int
RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
return ret;
}
+LCRYPTO_ALIAS(RSA_padding_add_PKCS1_PSS_mgf1);
-/* $OpenBSD: rsa_saos.c,v 1.24 2018/09/05 00:55:33 djm Exp $ */
+/* $OpenBSD: rsa_saos.c,v 1.25 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
freezero(s, (unsigned int)j + 1);
return ret;
}
+LCRYPTO_ALIAS(RSA_sign_ASN1_OCTET_STRING);
int
RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m,
freezero(s, (unsigned int)siglen);
return ret;
}
+LCRYPTO_ALIAS(RSA_verify_ASN1_OCTET_STRING);
-/* $OpenBSD: rsa_sign.c,v 1.35 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: rsa_sign.c,v 1.36 2023/07/08 12:26:45 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
freezero(tmps, (size_t)encoded_len);
return (ret);
}
+LCRYPTO_ALIAS(RSA_sign);
/*
* int_rsa_verify verifies an RSA signature in `sigbuf' using `rsa'. It may be
return int_rsa_verify(dtype, m, m_len, NULL, NULL, sigbuf, siglen, rsa);
}
+LCRYPTO_ALIAS(RSA_verify);