Searched refs:rsa (Results 1 - 25 of 154) sorted by relevance

1234567

/openbsd-current/lib/libcrypto/rsa/
H A Drsa_gen.c64 #include <openssl/rsa.h>
69 static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb);
72 RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) argument
74 if (rsa->meth->rsa_keygen)
75 return rsa->meth->rsa_keygen(rsa, bits, e_value, cb);
76 return rsa_builtin_keygen(rsa, bits, e_value, cb);
81 rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) argument
105 if (!rsa->n && ((rsa
231 RSA *rsa = RSA_new(); local
[all...]
H A Drsa_eay.c119 #include <openssl/rsa.h>
126 RSA *rsa, int padding)
133 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) {
138 if (BN_ucmp(rsa->n, rsa->e) <= 0) {
144 if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) {
145 if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) {
157 num = BN_num_bytes(rsa->n);
187 if (BN_ucmp(f, rsa->n) >= 0) {
193 if (rsa
125 rsa_public_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
221 rsa_get_blinding(RSA *rsa, int *local, BN_CTX *ctx) argument
305 rsa_private_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
433 rsa_private_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
558 rsa_public_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
658 rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) argument
809 rsa_init(RSA *rsa) argument
816 rsa_finish(RSA *rsa) argument
866 RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
874 RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
882 RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
890 RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) argument
[all...]
H A Drsa_local.h66 unsigned char *to, RSA *rsa, int padding);
68 unsigned char *to, RSA *rsa, int padding);
70 unsigned char *to, RSA *rsa, int padding);
72 unsigned char *to, RSA *rsa, int padding);
73 int (*rsa_mod_exp)(BIGNUM *r0, const BIGNUM *I, RSA *rsa,
77 int (*init)(RSA *rsa); /* called at new */
78 int (*finish)(RSA *rsa); /* called at free */
89 unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
92 unsigned int siglen, const RSA *rsa);
97 int (*rsa_keygen)(RSA *rsa, in
[all...]
H A Drsa_sign.c65 #include <openssl/rsa.h>
127 unsigned char *sigret, unsigned int *siglen, RSA *rsa)
133 if ((rsa->flags & RSA_FLAG_SIGN_VER) && rsa->meth->rsa_sign != NULL)
134 return rsa->meth->rsa_sign(type, m, m_len, sigret, siglen, rsa);
154 if (encoded_len > RSA_size(rsa) - RSA_PKCS1_PADDING_SIZE) {
159 rsa, RSA_PKCS1_PADDING)) <= 0)
172 * int_rsa_verify verifies an RSA signature in `sigbuf' using `rsa'. It may be
182 size_t siglen, RSA *rsa)
126 RSA_sign(int type, const unsigned char *m, unsigned int m_len, unsigned char *sigret, unsigned int *siglen, RSA *rsa) argument
180 int_rsa_verify(int type, const unsigned char *m, unsigned int m_len, unsigned char *rm, size_t *prm_len, const unsigned char *sigbuf, size_t siglen, RSA *rsa) argument
271 RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, const unsigned char *sigbuf, unsigned int siglen, RSA *rsa) argument
[all...]
H A Drsa_saos.c65 #include <openssl/rsa.h>
70 unsigned char *sigret, unsigned int *siglen, RSA *rsa)
81 j = RSA_size(rsa);
93 i = RSA_private_encrypt(i, s, sigret, rsa, RSA_PKCS1_PADDING);
106 unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, RSA *rsa)
113 if (siglen != (unsigned int)RSA_size(rsa)) {
123 i = RSA_public_decrypt((int)siglen, sigbuf, s, rsa, RSA_PKCS1_PADDING);
69 RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, unsigned char *sigret, unsigned int *siglen, RSA *rsa) argument
105 RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, RSA *rsa) argument
H A Drsa_meth.c22 #include <openssl/rsa.h>
85 (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa)
93 const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
102 const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
110 RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)) argument
119 const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
128 const unsigned char *from, unsigned char *to, RSA *rsa, int padding))
137 const BIGNUM *i, RSA *rsa, BN_CTX *ctx))
155 RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa)) argument
163 RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, in argument
92 RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) argument
101 RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) argument
118 RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) argument
127 RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) argument
136 RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx)) argument
283 RSA_meth_set_sign(RSA_METHOD *meth, int (*sign)(int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa)) argument
302 RSA_meth_set_verify(RSA_METHOD *meth, int (*verify)(int dtype, const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)) argument
[all...]
H A Drsa_blinding.c118 #include <openssl/rsa.h>
295 RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx) argument
309 if ((e = rsa->e) == NULL)
310 e = rsa_get_public_exp(rsa->d, rsa->p, rsa->q, ctx);
317 BN_with_flags(&n, rsa->n, BN_FLG_CONSTTIME);
319 if ((ret = BN_BLINDING_new(e, &n, ctx, rsa->meth->bn_mod_exp,
320 rsa->_method_mod_n)) == NULL) {
329 if (e != rsa
336 RSA_blinding_off(RSA *rsa) argument
345 RSA_blinding_on(RSA *rsa, BN_CTX *ctx) argument
[all...]
H A Drsa.h1 /* $OpenBSD: rsa.h,v 1.66 2024/05/19 07:12:50 jsg Exp $ */
240 int RSA_bits(const RSA *rsa);
241 int RSA_size(const RSA *rsa);
251 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
256 unsigned char *to, RSA *rsa, int padding);
258 unsigned char *to, RSA *rsa, int padding);
260 unsigned char *to, RSA *rsa, int padding);
262 unsigned char *to, RSA *rsa, int padding);
271 const RSA_METHOD *RSA_get_method(const RSA *rsa);
272 int RSA_set_method(RSA *rsa, cons
[all...]
H A Drsa_pmeth.c69 #include <openssl/rsa.h>
192 RSA *rsa = ctx->pkey->pkey.rsa; local
213 rsa, RSA_X931_PADDING);
218 &sltmp, rsa);
225 if (!RSA_padding_add_PKCS1_PSS_mgf1(rsa, rctx->tbuf,
228 ret = RSA_private_encrypt(RSA_size(rsa), rctx->tbuf,
229 sig, rsa, RSA_NO_PADDING);
234 ret = RSA_private_encrypt(tbslen, tbs, sig, ctx->pkey->pkey.rsa,
255 ctx->pkey->pkey.rsa, RSA_X931_PADDIN
296 RSA *rsa = ctx->pkey->pkey.rsa; local
734 rsa_set_pss_param(RSA *rsa, EVP_PKEY_CTX *ctx) argument
757 RSA *rsa = NULL; local
824 RSA *rsa; local
[all...]
/openbsd-current/regress/lib/libssl/ssl/
H A DMakefile14 ${.CURDIR}/../certs/server1-rsa.pem ${.CURDIR}/../certs/server1-rsa-chain.pem \
15 ${.CURDIR}/../certs/ca-root-rsa.pem
/openbsd-current/regress/lib/libssl/dtls/
H A DMakefile17 ${.CURDIR}/../../libssl/certs/server1-rsa.pem \
18 ${.CURDIR}/../../libssl/certs/server1-rsa.pem \
19 ${.CURDIR}/../../libssl/certs/ca-int-rsa.pem
/openbsd-current/regress/lib/libtls/tls/
H A DMakefile15 ${.CURDIR}/../../libssl/certs/ca-root-rsa.pem \
16 ${.CURDIR}/../../libssl/certs/server1-rsa-chain.pem \
17 ${.CURDIR}/../../libssl/certs/server1-rsa.pem
/openbsd-current/regress/lib/libssl/tls/
H A DMakefile14 ${.CURDIR}/../../libssl/certs/server1-rsa.pem \
15 ${.CURDIR}/../../libssl/certs/server1-rsa-chain.pem \
16 ${.CURDIR}/../../libssl/certs/ca-root-rsa.pem
/openbsd-current/regress/lib/libssl/quic/
H A DMakefile15 ${.CURDIR}/../../libssl/certs/server1-rsa.pem \
16 ${.CURDIR}/../../libssl/certs/server1-rsa-chain.pem \
17 ${.CURDIR}/../../libssl/certs/ca-root-rsa.pem
/openbsd-current/regress/lib/libssl/server/
H A DMakefile14 ${.CURDIR}/../../libssl/certs/server1-rsa.pem \
15 ${.CURDIR}/../../libssl/certs/server1-rsa-chain.pem \
16 ${.CURDIR}/../../libssl/certs/ca-root-rsa.pem
/openbsd-current/regress/lib/libssl/shutdown/
H A DMakefile14 ${.CURDIR}/../../libssl/certs/server1-rsa.pem \
15 ${.CURDIR}/../../libssl/certs/server1-rsa-chain.pem \
16 ${.CURDIR}/../../libssl/certs/ca-root-rsa.pem
/openbsd-current/regress/lib/libtls/keypair/
H A DMakefile16 ${.CURDIR}/../../libssl/certs/ca-root-rsa.pem \
17 ${.CURDIR}/../../libssl/certs/server1-rsa.pem \
18 ${.CURDIR}/../../libssl/certs/server1-rsa.pem
/openbsd-current/regress/usr.bin/ssh/
H A Dssh2putty.sh24 $OPENSSL_BIN rsa -noout -text -in $KEYFILE | grep ^publicExponent |
30 $OPENSSL_BIN rsa -noout -modulus -in $KEYFILE | grep ^Modulus= |
H A Dsshfp-connect.sh27 if ! $SSH -Q key-plain | grep ssh-rsa >/dev/null; then
34 $SUDO cp $SRC/rsa_openssh.prv $OBJ/host.ssh-rsa
35 $SUDO chmod 600 $OBJ/host.ssh-rsa
36 sed -e "s|$OBJ/ssh-rsa|$OBJ/host.ssh-rsa|" \
50 opts="$opts -o HostKeyAlgorithms=rsa-sha2-512,rsa-sha2-256"
H A Ddropbear-kex.sh
/openbsd-current/sbin/isakmpd/
H A Dlibcrypto.h42 #include <openssl/rsa.h>
/openbsd-current/lib/libfido2/src/fido/
H A Drs256.h10 #include <openssl/rsa.h>
/openbsd-current/lib/libfido2/src/
H A Drs256.c8 #include <openssl/rsa.h>
119 RSA *rsa = NULL; local
134 if ((rsa = RSA_new()) == NULL || RSA_set0_key(rsa, n, e, NULL) == 0) {
139 /* at this point, n and e belong to rsa */
143 if (RSA_bits(rsa) != 2048) {
149 EVP_PKEY_assign_RSA(pkey, rsa) == 0) {
154 rsa = NULL; /* at this point, rsa belongs to evp */
162 if (rsa !
173 rs256_pk_from_RSA(rs256_pk_t *pk, const RSA *rsa) argument
210 const RSA *rsa; local
[all...]
/openbsd-current/usr.bin/ssh/
H A Dssh-rsa.c1 /* $OpenBSD: ssh-rsa.c,v 1.79 2023/03/05 05:34:09 dtucker Exp $ */
39 if (key->rsa == NULL)
41 RSA_get0_key(key->rsa, &rsa_n, NULL, NULL);
48 if ((k->rsa = RSA_new()) == NULL)
56 RSA_free(k->rsa);
57 k->rsa = NULL;
66 if (a->rsa == NULL || b->rsa == NULL)
68 RSA_get0_key(a->rsa, &rsa_n_a, &rsa_e_a, NULL);
69 RSA_get0_key(b->rsa,
626 openssh_RSA_verify(int hash_alg, u_char *hash, size_t hashlen, u_char *sigbuf, size_t siglen, RSA *rsa) argument
[all...]
/openbsd-current/regress/usr.bin/ssh/unittests/sshkey/
H A Dcommon.c19 #include <openssl/rsa.h>
81 ASSERT_PTR_NE(k->rsa, NULL);
82 RSA_get0_key(k->rsa, &n, NULL, NULL);
92 ASSERT_PTR_NE(k->rsa, NULL);
93 RSA_get0_key(k->rsa, NULL, &e, NULL);
103 ASSERT_PTR_NE(k->rsa, NULL);
104 RSA_get0_factors(k->rsa, &p, NULL);
114 ASSERT_PTR_NE(k->rsa, NULL);
115 RSA_get0_factors(k->rsa, NULL, &q);

Completed in 366 milliseconds

1234567