Home
last modified time | relevance | path

Searched full:rsa (Results 1 – 25 of 302) sorted by relevance

12345678910>>...13

/openbmc/qemu/crypto/
H A Dakcipher-nettle.c.inc22 #include <nettle/rsa.h>
42 QCryptoNettleRSA *rsa = (QCryptoNettleRSA *)akcipher;
43 if (!rsa) {
47 rsa_public_key_clear(&rsa->pub);
48 rsa_private_key_clear(&rsa->priv);
49 g_free(rsa);
65 return qcrypto_nettle_rsa_new(&opts->u.rsa, type, key, keylen, errp);
84 static int qcrypt_nettle_parse_rsa_private_key(QCryptoNettleRSA *rsa,
96 nettle_mpz_init_set_str_256_u(rsa->pub.n, rsa_key->n.len, rsa_key->n.data);
97 nettle_mpz_init_set_str_256_u(rsa->pub.e, rsa_key->e.len, rsa_key->e.data);
[all …]
H A Dakcipher-gcrypt.c.inc41 QCryptoGcryptRSA *rsa = (QCryptoGcryptRSA *)akcipher;
42 if (!rsa) {
46 gcry_sexp_release(rsa->key);
47 g_free(rsa);
64 &opts->u.rsa, type, key, keylen, errp);
84 QCryptoGcryptRSA *rsa,
101 error_setg(errp, "Failed to parse RSA parameter n: %s/%s",
109 error_setg(errp, "Failed to parse RSA parameter e: %s/%s",
117 error_setg(errp, "Failed to parse RSA parameter d: %s/%s",
125 error_setg(errp, "Failed to parse RSA parameter p: %s/%s",
[all …]
H A Drsakey-nettle.c.inc61 QCryptoAkCipherRSAKey *rsa = g_new0(QCryptoAkCipherRSAKey, 1);
73 !GetMPI(&i, &rsa->n) ||
74 !GetMPI(&i, &rsa->e) ||
75 !GetMPI(&i, &rsa->d) ||
76 !GetMPI(&i, &rsa->p) ||
77 !GetMPI(&i, &rsa->q) ||
78 !GetMPI(&i, &rsa->dp) ||
79 !GetMPI(&i, &rsa->dq) ||
80 !GetMPI(&i, &rsa->u)) {
93 return rsa;
[all …]
H A Drsakey-builtin.c.inc72 QCryptoAkCipherRSAKey *rsa = g_new0(QCryptoAkCipherRSAKey, 1);
85 &rsa->n, errp) < 0 ||
87 &rsa->e, errp) < 0) {
91 error_setg(errp, "Invalid RSA public key");
95 return rsa;
98 qcrypto_akcipher_rsakey_free(rsa);
119 QCryptoAkCipherRSAKey *rsa = g_new0(QCryptoAkCipherRSAKey, 1);
136 &rsa->n, errp) < 0 ||
138 &rsa->e, errp) < 0 ||
140 &rsa->d, errp) < 0 ||
[all …]
/openbmc/linux/drivers/crypto/ccp/
H A Dccp-crypto-rsa.c3 * AMD Cryptographic Coprocessor (CCP) RSA crypto API support
15 #include <crypto/internal/rsa.h>
52 req->dst_len = rctx->cmd.u.rsa.key_size >> 3; in ccp_rsa_complete()
61 return ctx->u.rsa.n_len; in ccp_rsa_maxsize()
75 rctx->cmd.u.rsa.key_size = ctx->u.rsa.key_len; /* in bits */ in ccp_rsa_crypt()
77 rctx->cmd.u.rsa.exp = &ctx->u.rsa.e_sg; in ccp_rsa_crypt()
78 rctx->cmd.u.rsa.exp_len = ctx->u.rsa.e_len; in ccp_rsa_crypt()
80 rctx->cmd.u.rsa.exp = &ctx->u.rsa.d_sg; in ccp_rsa_crypt()
81 rctx->cmd.u.rsa.exp_len = ctx->u.rsa.d_len; in ccp_rsa_crypt()
83 rctx->cmd.u.rsa.mod = &ctx->u.rsa.n_sg; in ccp_rsa_crypt()
[all …]
/openbmc/linux/drivers/crypto/caam/
H A Dcaampkc.h17 * caam_priv_key_form - CAAM RSA private key representation
18 * CAAM RSA private key may have either of three forms.
22 * n the RSA modulus
23 * d the RSA private exponent
27 * p the first prime factor of the RSA modulus n
28 * q the second prime factor of the RSA modulus n
29 * d the RSA private exponent
33 * p the first prime factor of the RSA modulus n
34 * q the second prime factor of the RSA modulus n
49 * caam_rsa_key - CAAM RSA key structure. Keys are allocated in DMA zone.
[all …]
H A Dpdb.h481 /* RSA Protocol Data Block */
500 * RSA Encrypt Protocol Data Block
504 * @n_dma: dma address of RSA modulus
505 * @e_dma: dma address of RSA public exponent
520 * RSA Decrypt PDB - Private Key Form #1
524 * @n_dma: dma address of RSA modulus
525 * @d_dma: dma address of RSA private exponent
538 * RSA Decrypt PDB - Private Key Form #2
542 * @d_dma : dma address of RSA private exponent
543 * @p_dma : dma address of RSA prime factor p of RSA modulus n
[all …]
/openbmc/u-boot/lib/rsa/
H A DKconfig1 config RSA config
2 bool "Use RSA Library"
7 RSA support. This enables the RSA algorithm used for FIT image
10 The Modular Exponentiation algorithm in RSA is implemented using
17 if RSA
20 bool "Use RSA Library within SPL"
23 bool "Enable driver for RSA Modular Exponentiation in software"
26 Enables driver for modular exponentiation in software. This is a RSA
27 algorithm used in FIT image verification. It required RSA Key as
32 bool "Enable RSA Modular Exponentiation with FSL crypto accelerator"
[all …]
H A Drsa-sign.c12 #include <openssl/rsa.h>
25 static void RSA_get0_key(const RSA *r, in RSA_get0_key()
53 * @rsap Returns RSA object, or NULL on failure
56 static int rsa_pem_get_pub_key(const char *keydir, const char *name, RSA **rsap) in rsa_pem_get_pub_key()
61 RSA *rsa; in rsa_pem_get_pub_key() local
69 fprintf(stderr, "Couldn't open RSA certificate: '%s': %s\n", in rsa_pem_get_pub_key()
91 rsa = EVP_PKEY_get1_RSA(key); in rsa_pem_get_pub_key()
92 if (!rsa) { in rsa_pem_get_pub_key()
93 rsa_err("Couldn't convert to a RSA style key"); in rsa_pem_get_pub_key()
100 *rsap = rsa; in rsa_pem_get_pub_key()
[all …]
H A Drsa-verify.c20 #include <u-boot/rsa-mod-exp.h>
21 #include <u-boot/rsa.h>
27 * rsa_verify_padding() - Verify RSA message padding is valid
29 * Verify a RSA message's padding is consistent with PKCS1.5
30 * padding as described in the RSA PKCS#1 v2.1 standard.
95 * Generate an octet string used to check rsa signature.
274 * rsa_verify_key() - Verify a signature against some data using RSA Key
276 * Verify a RSA PKCS1.5 signature against an expected hash using
277 * the RSA Key properties in prop structure.
284 * @key_len: Number of bytes in rsa key
[all …]
H A Drsa-mod-exp.c19 #include <u-boot/rsa.h>
20 #include <u-boot/rsa-mod-exp.h>
75 * @key: RSA key
110 * @key: RSA key
129 * @key: RSA key
159 * @key: RSA key
171 * @key: RSA key
182 debug("RSA key words %u exceeds maximum %d\n", key->len, in pow_mod()
205 debug("LSB of RSA public exponent must be set.\n"); in pow_mod()
269 debug("%s: Missing RSA key info", __func__); in rsa_mod_exp_sw()
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-extended/pam/pam-ssh-agent-auth/
H A D0001-Adapt-to-OpenSSL-1.1.1.patch19 ssh-rsa.c | 22 +++++++--
31 pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->e);
32 pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->n);
37 BN_num_bits(key->rsa->n), bits);
39 + pamsshagentauth_buffer_get_bignum(&auth->identities, RSA_get0_e(key->rsa));
40 + pamsshagentauth_buffer_get_bignum(&auth->identities, RSA_get0_n(key->rsa));
42 + keybits = BN_num_bits(RSA_get0_n(key->rsa));
45 + BN_num_bits(RSA_get0_n(key->rsa)), bits);
55 pamsshagentauth_buffer_put_int(&buffer, BN_num_bits(key->rsa->n));
56 pamsshagentauth_buffer_put_bignum(&buffer, key->rsa->e);
[all …]
H A D0002-Check-against-the-correct-OPENSSL_VERSION_NUMBER.patch17 ssh-rsa.c | 4 ++--
30 pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->e);
31 pamsshagentauth_buffer_get_bignum(&auth->identities, key->rsa->n);
39 pamsshagentauth_buffer_put_int(&buffer, BN_num_bits(key->rsa->n));
40 pamsshagentauth_buffer_put_bignum(&buffer, key->rsa->e);
41 pamsshagentauth_buffer_put_bignum(&buffer, key->rsa->n);
44 ssh_encode_identity_rsa1(Buffer *b, RSA *key, const char *comment)
57 pamsshagentauth_buffer_put_bignum2(b, key->rsa->n);
58 pamsshagentauth_buffer_put_bignum2(b, key->rsa->e);
59 pamsshagentauth_buffer_put_bignum2(b, key->rsa->d);
[all …]
/openbmc/linux/include/crypto/internal/
H A Drsa.h3 * RSA internal helpers
13 * rsa_key - RSA key structure
14 * @n : RSA modulus raw byte stream
15 * @e : RSA public exponent raw byte stream
16 * @d : RSA private exponent raw byte stream
17 * @p : RSA prime factor p of n raw byte stream
18 * @q : RSA prime factor q of n raw byte stream
19 * @dp : RSA exponent d mod (p - 1) raw byte stream
20 * @dq : RSA exponent d mod (q - 1) raw byte stream
21 * @qinv : RSA CRT coefficient q^(-1) mod p raw byte stream
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-devtools/android-tools/android-tools/core/
H A Dadb_libssl_11.diff3 fix that by accessing rsa->n (and e) directly, using RSA_get0_key instead.
18 @@ -75,6 +75,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
25 if (RSA_size(rsa) != RSANUMBYTES) {
27 @@ -82,7 +83,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
31 - BN_copy(n, rsa->n);
32 + RSA_get0_key(rsa, &n, &e, NULL);
36 @@ -96,11 +97,10 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
40 - pkey->exponent = BN_get_word(rsa->e);
/openbmc/u-boot/lib/libavb/
H A Davb_crypto.h19 /* Size of a RSA-2048 signature. */
22 /* Size of a RSA-4096 signature. */
25 /* Size of a RSA-8192 signature. */
51 * For signatures with RSA keys, PKCS v1.5 padding is used. The public
63 * signed with a 2048-bit RSA key. The field |hash_size| must be 32,
68 * a 4096-bit RSA key and |signature_size| set to 512.
71 * a 8192-bit RSA key and |signature_size| set to 1024.
75 * signed with a 2048-bit RSA key. The field |hash_size| must be 64,
80 * a 4096-bit RSA key and |signature_size| set to 512.
83 * a 8192-bit RSA key and |signature_size| set to 1024.
[all …]
/openbmc/qemu/tests/bench/
H A Dbenchmark-crypto-akcipher.c29 opt.u.rsa.padding_alg = padding; in create_rsa_akcipher()
30 opt.u.rsa.hash_alg = hash; in create_rsa_akcipher()
45 g_autoptr(QCryptoAkCipher) rsa = in test_rsa_speed()
55 g_test_message("benchmark rsa%zu (%s-%s) sign...", key_size, in test_rsa_speed()
60 g_assert(qcrypto_akcipher_sign(rsa, dgst, SHA1_DGST_LEN, in test_rsa_speed()
65 g_test_message("rsa%zu (%s-%s) sign %zu times in %.2f seconds," in test_rsa_speed()
72 g_test_message("benchmark rsa%zu (%s-%s) verification...", key_size, in test_rsa_speed()
77 g_assert(qcrypto_akcipher_verify(rsa, signature, key_size / BYTE, in test_rsa_speed()
82 g_test_message("rsa%zu (%s-%s) verify %zu times in %.2f seconds," in test_rsa_speed()
130 ADD_TEST(rsa, 1024); in main()
[all …]
/openbmc/linux/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_ipsec.c396 struct rx_sa *rsa; in ixgbe_ipsec_find_rx_state() local
400 hash_for_each_possible_rcu(ipsec->rx_sa_list, rsa, hlist, in ixgbe_ipsec_find_rx_state()
402 if (rsa->mode & IXGBE_RXTXMOD_VF) in ixgbe_ipsec_find_rx_state()
404 if (spi == rsa->xs->id.spi && in ixgbe_ipsec_find_rx_state()
405 ((ip4 && *daddr == rsa->xs->id.daddr.a4) || in ixgbe_ipsec_find_rx_state()
406 (!ip4 && !memcmp(daddr, &rsa->xs->id.daddr.a6, in ixgbe_ipsec_find_rx_state()
407 sizeof(rsa->xs->id.daddr.a6)))) && in ixgbe_ipsec_find_rx_state()
408 proto == rsa->xs->id.proto) { in ixgbe_ipsec_find_rx_state()
409 ret = rsa->xs; in ixgbe_ipsec_find_rx_state()
595 struct rx_sa rsa; in ixgbe_ipsec_add_sa() local
[all …]
/openbmc/linux/drivers/crypto/intel/qat/qat_common/
H A Dqat_asym_algs.c4 #include <crypto/internal/rsa.h>
117 struct qat_rsa_input_params rsa; member
121 struct qat_rsa_output_params rsa; member
130 struct qat_rsa_ctx *rsa; member
134 struct akcipher_request *rsa; member
516 struct akcipher_request *areq = req->areq.rsa; in qat_rsa_cb()
517 struct device *dev = &GET_DEV(req->ctx.rsa->inst->accel_dev); in qat_rsa_cb()
523 dma_unmap_single(dev, req->in.rsa.enc.m, req->ctx.rsa->key_sz, in qat_rsa_cb()
528 areq->dst_len = req->ctx.rsa->key_sz; in qat_rsa_cb()
529 dma_unmap_single(dev, req->out.rsa.enc.c, req->ctx.rsa->key_sz, in qat_rsa_cb()
[all …]
/openbmc/linux/drivers/net/ethernet/intel/ixgbevf/
H A Dipsec.c183 struct rx_sa *rsa; in ixgbevf_ipsec_find_rx_state() local
186 hash_for_each_possible_rcu(ipsec->rx_sa_list, rsa, hlist, in ixgbevf_ipsec_find_rx_state()
188 if (spi == rsa->xs->id.spi && in ixgbevf_ipsec_find_rx_state()
189 ((ip4 && *daddr == rsa->xs->id.daddr.a4) || in ixgbevf_ipsec_find_rx_state()
190 (!ip4 && !memcmp(daddr, &rsa->xs->id.daddr.a6, in ixgbevf_ipsec_find_rx_state()
191 sizeof(rsa->xs->id.daddr.a6)))) && in ixgbevf_ipsec_find_rx_state()
192 proto == rsa->xs->id.proto) { in ixgbevf_ipsec_find_rx_state()
193 ret = rsa->xs; in ixgbevf_ipsec_find_rx_state()
290 struct rx_sa rsa; in ixgbevf_ipsec_add_sa() local
305 memset(&rsa, 0, sizeof(rsa)); in ixgbevf_ipsec_add_sa()
[all …]
/openbmc/u-boot/include/u-boot/
H A Drsa-mod-exp.h18 * as per requirement of RSA implementation.
30 * rsa_mod_exp_sw() - Perform RSA Modular Exponentiation in sw
34 * @sig: RSA PKCS1.5 signature
36 * @node: Node with RSA key elements like modulus, exponent, R^2, n0inv
50 * struct struct mod_exp_ops - Driver model for RSA Modular Exponentiation
62 * @dev: RSA Device
63 * @sig: RSA PKCS1.5 signature
65 * @node: Node with RSA key elements like modulus, exponent,
/openbmc/google-misc/subprojects/libcr51sign/src/
H A Dlibcr51sign_support.c21 #include <openssl/rsa.h>
116 // verify_signature expects RSA public key file path in ctx->key_ring
135 RSA *rsa = NULL, *pub_rsa = NULL; in verify_signature() local
151 rsa = EVP_PKEY_get1_RSA(pkey); in verify_signature()
152 if (!rsa) in verify_signature()
156 pub_rsa = RSAPublicKey_dup(rsa); in verify_signature()
159 CPRINTS(ctx, "RSA print failed\n"); in verify_signature()
163 CPRINTS(ctx, "no pub RSA\n"); in verify_signature()
166 CPRINTS(ctx, "public RSA\n"); in verify_signature()
219 CPRINTS(ctx, "rsa size %d sig_len %d\n", rsa_size, (uint32_t)sig_len); in verify_signature()
[all …]
/openbmc/linux/drivers/crypto/hisilicon/hpre/
H A Dhpre_crypto.c11 #include <crypto/internal/rsa.h>
124 struct hpre_rsa_ctx rsa; member
139 struct akcipher_request *rsa; member
467 areq = req->areq.rsa; in hpre_rsa_cb()
532 h_req->areq.rsa = akreq; in hpre_msg_request_set()
805 akcipher_request_set_tfm(req, ctx->rsa.soft_tfm); in hpre_rsa_enc()
811 if (unlikely(!ctx->rsa.pubkey)) in hpre_rsa_enc()
819 msg->key = cpu_to_le64(ctx->rsa.dma_pubkey); in hpre_rsa_enc()
853 akcipher_request_set_tfm(req, ctx->rsa.soft_tfm); in hpre_rsa_dec()
859 if (unlikely(!ctx->rsa.prikey)) in hpre_rsa_dec()
[all …]
/openbmc/openbmc/poky/meta/files/common-licenses/
H A DRSA-MD1 Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.
3 License to copy and use this software is granted provided that it is identified as the "RSA Data Se…
5 …ivative works provided that such works are identified as "derived from the RSA Data Security, Inc.…
7 RSA Data Security, Inc. makes no representations concerning either the merchantability of this soft…
/openbmc/openbmc/meta-openembedded/meta-perl/recipes-perl/libcrypt/
H A Dlibcrypt-openssl-rsa-perl_0.33.bb1 SUMMARY = "Crypt Openssl RSA cpan module"
3 HOMEPAGE = "https://metacpan.org/pod/Crypt::OpenSSL::RSA"
7 SRC_URI = "${CPAN_MIRROR}/authors/id/T/TO/TODDR/Crypt-OpenSSL-RSA-${PV}.tar.gz \
25 S = "${WORKDIR}/Crypt-OpenSSL-RSA-${PV}"

12345678910>>...13