/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
CipherRSATest.java | 23 CipherRSAThread rsa = new CipherRSAThread("RSA", new int[] {512}, local 28 rsa.launcher(); 30 assertEquals(rsa.getFailureMessages(), 0, rsa.getTotalFailuresNumber()); 35 CipherRSAThread rsa = new CipherRSAThread("RSA", new int[] {1024}, local 40 rsa.launcher(); 42 assertEquals(rsa.getFailureMessages(), 0, rsa.getTotalFailuresNumber()) 47 CipherRSAThread rsa = new CipherRSAThread("RSA", new int[] {2048}, local 57 CipherRSAThread rsa = new CipherRSAThread("RSA", new int[] {1024}, local [all...] |
/external/boringssl/src/crypto/fipsmodule/rsa/ |
rsa_impl.c | 10 * apply to all code found in this distribution, be it the RC4, RSA, 57 #include <openssl/rsa.h> 75 static int check_modulus_and_exponent_sizes(const RSA *rsa) { 76 unsigned rsa_bits = BN_num_bits(rsa->n); 79 OPENSSL_PUT_ERROR(RSA, RSA_R_MODULUS_TOO_LARGE); 94 if (BN_num_bits(rsa->e) > kMaxExponentBits) { 95 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_E_VALUE); 101 // is much smaller than the minimum RSA key size that any application should 104 OPENSSL_PUT_ERROR(RSA, RSA_R_KEY_SIZE_TOO_SMALL) [all...] |
rsa.c | 10 * apply to all code found in this distribution, be it the RC4, RSA, 57 #include <openssl/rsa.h> 81 RSA *RSA_new(void) { return RSA_new_method(NULL); } 83 RSA *RSA_new_method(const ENGINE *engine) { 84 RSA *rsa = OPENSSL_malloc(sizeof(RSA)); local 85 if (rsa == NULL) { 86 OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE); 90 OPENSSL_memset(rsa, 0, sizeof(RSA)) 107 CRYPTO_free_ex_data(g_rsa_ex_data_class_bss_get(), rsa, &rsa->ex_data); local 133 CRYPTO_free_ex_data(g_rsa_ex_data_class_bss_get(), rsa, &rsa->ex_data); local [all...] |
internal.h | 10 * apply to all code found in this distribution, be it the RC4, RSA, 70 // Default implementations of RSA operations. 74 size_t rsa_default_size(const RSA *rsa); 75 int rsa_default_sign_raw(RSA *rsa, size_t *out_len, uint8_t *out, 78 int rsa_default_decrypt(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, 80 int rsa_default_private_transform(RSA *rsa, uint8_t *out, const uint8_t *in [all...] |
/external/boringssl/src/decrepit/rsa/ |
rsa_decrepit.c | 10 * apply to all code found in this distribution, be it the RC4, RSA, 57 #include <openssl/rsa.h> 64 RSA *RSA_generate_key(int bits, unsigned long e_value, void *callback, 69 RSA *rsa = RSA_new(); local 72 if (rsa == NULL || 75 !RSA_generate_key_ex(rsa, bits, e, NULL)) { 80 return rsa; 84 RSA_free(rsa); 88 int RSA_padding_add_PKCS1_PSS(RSA *rsa, uint8_t *EM, const uint8_t *mHash [all...] |
/external/vboot_reference/tests/ |
vboot_common2_tests.c | 21 RSAPublicKey *rsa; local 34 rsa = PublicKeyToRSA(orig_key); 35 TEST_NEQ((size_t)rsa, 0, "PublicKeyToRSA() ok"); 36 if (rsa) { 37 TEST_EQ((int)rsa->algorithm, (int)key->algorithm, 39 RSAPublicKeyFree(rsa); 49 RSAPublicKey *rsa; local 54 rsa = PublicKeyToRSA(public_key); 55 TEST_PTR_NEQ(rsa, 0, "VerifyData() calculate rsa"); 84 RSAPublicKey *rsa; local 123 RSAPublicKey *rsa; local [all...] |
vboot_common3_tests.c | 172 RSAPublicKey *rsa; local 178 rsa = PublicKeyToRSA(public_key); 181 TEST_NEQ(hdr && rsa, 0, "VerifyFirmwarePreamble() prerequisites"); 187 TEST_EQ(VerifyFirmwarePreamble(hdr, hsize, rsa), 0, 189 TEST_NEQ(VerifyFirmwarePreamble(hdr, 4, rsa), 0, 191 TEST_NEQ(VerifyFirmwarePreamble(hdr, hsize - 1, rsa), 0, 193 TEST_EQ(VerifyFirmwarePreamble(hdr, hsize + 1, rsa), 0, 200 TEST_NEQ(VerifyFirmwarePreamble(h, hsize, rsa), 0, 206 TEST_NEQ(VerifyFirmwarePreamble(h, hsize, rsa), 0, 212 TEST_EQ(VerifyFirmwarePreamble(h, hsize, rsa), 0 [all...] |
/external/boringssl/src/crypto/evp/ |
p_rsa_asn1.c | 63 #include <openssl/rsa.h> 65 #include "../fipsmodule/rsa/internal.h" 79 !RSA_marshal_public_key(&key_bitstring, key->pkey.rsa) || 100 RSA *rsa = RSA_parse_public_key(key); local 101 if (rsa == NULL || CBS_len(key) != 0) { 103 RSA_free(rsa); 107 EVP_PKEY_assign_RSA(out, rsa); 112 return BN_cmp(b->pkey.rsa->n, a->pkey.rsa->n) == 0 & 144 RSA *rsa = RSA_parse_private_key(key); local [all...] |
print.c | 61 #include <openssl/rsa.h> 64 #include "../fipsmodule/rsa/internal.h" 134 // RSA keys. 136 static int do_rsa_print(BIO *out, const RSA *rsa, int off, 143 update_buflen(rsa->n, &buf_len); 144 update_buflen(rsa->e, &buf_len); 147 update_buflen(rsa->d, &buf_len); 148 update_buflen(rsa->p, &buf_len); 149 update_buflen(rsa->q, &buf_len) [all...] |
/system/extras/verity/ |
generate_verity_key.c | 31 #include <openssl/rsa.h> 34 static int write_public_keyfile(RSA *private_key, const char *private_key_path) 66 RSA *rsa = NULL; local 91 rsa = EVP_PKEY_get1_RSA(pkey); 92 if (!rsa) { 93 printf("Failed to get the RSA public key from '%s'\n", pem_file); 97 if (write_public_keyfile(rsa, key_file) < 0) { 114 if (rsa) { 115 RSA_free(rsa); 125 RSA* rsa = RSA_new(); local [all...] |
/external/ipsec-tools/src/racoon/ |
rsalist.h | 38 #include <openssl/rsa.h> 52 RSA *rsa; member in struct:rsa_key 55 int rsa_key_insert(struct genlist *list, struct netaddr *src, struct netaddr *dst, RSA *rsa); 59 RSA *rsa_try_check_rsasign(vchar_t *source, vchar_t *sig, struct genlist *list);
|
/external/boringssl/src/include/openssl/ |
rsa.h | 10 * apply to all code found in this distribution, be it the RC4, RSA, 71 // rsa.h contains functions for handling encryption and signature using RSA. 76 // RSA_new returns a new, empty RSA object or NULL on error. 77 OPENSSL_EXPORT RSA *RSA_new(void); 80 OPENSSL_EXPORT RSA *RSA_new_method(const ENGINE *engine); 82 // RSA_free decrements the reference count of |rsa| and frees it if the 84 OPENSSL_EXPORT void RSA_free(RSA *rsa); 86 // RSA_up_ref increments the reference count of |rsa| and returns one [all...] |
/external/boringssl/src/crypto/rsa_extra/ |
rsa_asn1.c | 56 #include <openssl/rsa.h> 67 #include "../fipsmodule/rsa/internal.h" 83 // An RSA object may be missing some components. 84 OPENSSL_PUT_ERROR(RSA, RSA_R_VALUE_MISSING); 90 RSA *RSA_parse_public_key(CBS *cbs) { 91 RSA *ret = RSA_new(); 100 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_ENCODING); 107 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_RSA_PARAMETERS); 115 RSA *RSA_public_key_from_bytes(const uint8_t *in, size_t in_len) { 118 RSA *ret = RSA_parse_public_key(&cbs) [all...] |
rsa_test.cc | 10 * apply to all code found in this distribution, be it the RC4, RSA, 57 #include <openssl/rsa.h> 71 #include "../fipsmodule/rsa/internal.h" 149 // RSA OAEP. 175 // RSA OAEP. 219 // RSA OAEP. 395 bssl::UniquePtr<RSA> key( 462 bssl::UniquePtr<RSA> rsa( 464 ASSERT_TRUE(rsa); [all...] |
/bootable/recovery/ |
verifier.h | 25 #include <openssl/rsa.h> 29 void operator()(RSA* rsa) const { 30 RSA_free(rsa); 48 std::unique_ptr<RSA, RSADeleter>&& rsa_, 52 rsa(std::move(rsa_)), 58 std::unique_ptr<RSA, RSADeleter> rsa; member in struct:Certificate
|
/system/keymaster/include/keymaster/km_openssl/ |
rsa_key.h | 20 #include <openssl/rsa.h> 39 void operator()(RSA* p) { RSA_free(p); } 42 RSA* key() const { return rsa_key_.get(); } 45 RsaKey(RSA* rsa, AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, 47 : AsymmetricKey(move(hw_enforced), move(sw_enforced), key_factory), rsa_key_(rsa) {} 50 UniquePtr<RSA, RSA_Delete> rsa_key_;
|
/external/boringssl/src/crypto/x509/ |
i2d_pr.c | 11 * apply to all code found in this distribution, be it the RC4, RSA, 62 #include <openssl/rsa.h> 70 return i2d_RSAPrivateKey(a->pkey.rsa, pp);
|
/device/linaro/bootloader/arm-trusted-firmware/drivers/auth/mbedtls/ |
mbedtls_crypto.mk | 12 # defined to `rsa`/`rsa_1_5`, then set the variable to `rsa`. 17 TF_MBEDTLS_KEY_ALG := rsa 51 rsa.c \ 57 else ifeq (${TF_MBEDTLS_KEY_ALG},rsa) 60 else ifeq (${TF_MBEDTLS_KEY_ALG},rsa+ecdsa)
|
/external/boringssl/src/tool/ |
genrsa.cc | 19 #include <openssl/rsa.h> 48 bssl::UniquePtr<RSA> rsa(RSA_new()); 53 !RSA_generate_key_ex(rsa.get(), bits, e.get(), NULL) || 54 !PEM_write_bio_RSAPrivateKey(bio.get(), rsa.get(), NULL /* cipher */,
|
/system/core/libcrypto_utils/include/crypto_utils/ |
android_pubkey.h | 24 #include <openssl/rsa.h> 30 // Size of an RSA modulus such as an encrypted block or a signature. 33 // Size of an encoded RSA key. 37 /* Allocates a new RSA |key| object, decodes a public RSA key stored in 47 bool android_pubkey_decode(const uint8_t* key_buffer, size_t size, RSA** key); 49 /* Encodes |key| in the Android RSA public key binary format and stores the 55 bool android_pubkey_encode(const RSA* key, uint8_t* key_buffer, size_t size);
|
/external/boringssl/src/crypto/pem/ |
pem_all.c | 10 * apply to all code found in this distribution, be it the RC4, RSA, 119 #include <openssl/rsa.h> 122 static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); 132 * We treat RSA or DSA private keys as a special case. For private keys we 137 static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa) 139 RSA *rtmp [all...] |
/device/google/contexthub/util/nanoapp_sign/ |
nanoapp_sign.c | 26 #include <nanohub/rsa.h> 124 static bool validateSignature(uint8_t *sigPack, struct RsaData *rsa, bool verbose, uint32_t *refHash, bool preset) 131 rsa->num[i] = le32toh(le32SigPack[i]); 134 printHashRev(stderr, "RSA cyphertext", rsa->num, RSA_LIMBS); 136 memcpy(rsa->modulus, sigPack + RSA_BYTES, RSA_BYTES); 138 //do rsa op 139 rsaResult = rsaPubOp(&rsa->state, rsa->num, rsa->modulus) 440 struct RsaData rsa; local [all...] |
/external/curl/docs/examples/ |
usercertinmem.c | 23 * Use an in-memory user certificate and RSA key and retrieve an https page. 49 RSA *rsa = NULL; local 95 /*replace the XXX with the actual RSA key*/ 97 "-----BEGIN RSA PRIVATE KEY-----\n"\ 114 "-----END RSA PRIVATE KEY-----\n"; 140 /*create a bio for the RSA key*/ 146 /*read the key bio into an RSA object*/ 147 rsa = PEM_read_bio_RSAPrivateKey(kbio, NULL, 0, NULL); 148 if(rsa == NULL) [all...] |
/external/google-tv-pairing-protocol/cpp/tests/polo/util/ |
certificateutiltest.cc | 56 std::string rsa_string = "-----BEGIN RSA PRIVATE KEY-----\n" 70 "-----END RSA PRIVATE KEY-----\n"; 73 RSA* rsa = PEM_read_bio_RSAPrivateKey(rsa_bio, NULL, NULL, NULL); local 76 EVP_PKEY_assign_RSA(pkey, rsa); 116 std::string pem = "-----BEGIN RSA PRIVATE KEY-----\n" 133 "-----END RSA PRIVATE KEY-----\n"; 139 RSA* rsa = EVP_PKEY_get1_RSA(pkey); local 140 ASSERT_TRUE(rsa); 148 RSA* rsa = RSA_generate_key(1025, RSA_F4, NULL, NULL); local [all...] |
/system/security/keystore-engine/ |
android_engine.cpp | 39 #include <openssl/rsa.h> 54 /* key_id_dup is called when one of the RSA or EC_KEY objects is duplicated. */ 68 /* key_id_free is called when one of the RSA, DSA or EC_KEY object is freed. */ 86 const char* rsa_get_key_id(const RSA* rsa); 89 * d'th power of it, modulo the RSA modulus, and writes the result as a 92 int rsa_private_transform(RSA *rsa, uint8_t *out, const uint8_t *in, size_t len) { 93 ALOGV("rsa_private_transform(%p, %p, %p, %u)", rsa, out, in, (unsigned) len); 97 const char *key_id = rsa_get_key_id(rsa); [all...] |