/system/core/libmincrypt/ |
Android.mk | 7 LOCAL_SRC_FILES := dsa_sig.c p256.c p256_ec.c p256_ecdsa.c rsa.c sha.c sha256.c 13 LOCAL_SRC_FILES := dsa_sig.c p256.c p256_ec.c p256_ecdsa.c rsa.c sha.c sha256.c
|
/external/boringssl/src/crypto/pem/ |
pem_all.c | 10 * apply to all code found in this distribution, be it the RC4, RSA, 117 #include <openssl/rsa.h> 121 static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); 134 /* We treat RSA or DSA private keys as a special case. 142 static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa) 144 RSA *rtmp [all...] |
/external/boringssl/src/crypto/rsa/ |
internal.h | 10 * apply to all code found in this distribution, be it the RC4, RSA, 68 /* Default implementations of RSA operations. */ 72 size_t rsa_default_size(const RSA *rsa); 73 int rsa_default_encrypt(RSA *rsa, size_t *out_len, uint8_t *out, size_t max_out, 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 [all...] |
rsa_asn1.c | 56 #include <openssl/rsa.h> 90 /* An RSA object may be missing some components. */ 91 OPENSSL_PUT_ERROR(RSA, RSA_R_VALUE_MISSING); 97 static RSA *parse_public_key(CBS *cbs, int buggy) { 98 RSA *ret = RSA_new(); 107 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_ENCODING); 114 OPENSSL_PUT_ERROR(RSA, RSA_R_BAD_RSA_PARAMETERS); 122 RSA *RSA_parse_public_key(CBS *cbs) { 126 RSA *RSA_parse_public_key_buggy(CBS *cbs) { 134 RSA *RSA_public_key_from_bytes(const uint8_t *in, size_t in_len) [all...] |
blinding.c | 62 * apply to all code found in this distribution, be it the RC4, RSA, 109 #include <openssl/rsa.h> 142 OPENSSL_PUT_ERROR(RSA, ERR_R_MALLOC_FAILURE); 195 OPENSSL_PUT_ERROR(RSA, RSA_R_BN_NOT_INITIALIZED); 235 OPENSSL_PUT_ERROR(RSA, RSA_R_BN_NOT_INITIALIZED); 271 OPENSSL_PUT_ERROR(RSA, RSA_R_BN_NOT_INITIALIZED); 333 /* this should almost never happen for good RSA keys */ 336 OPENSSL_PUT_ERROR(RSA, RSA_R_TOO_MANY_ITERATIONS); 402 BN_BLINDING *rsa_setup_blinding(RSA *rsa, BN_CTX *in_ctx) [all...] |
/system/keymaster/ |
keymaster0_engine.h | 25 #include <openssl/rsa.h> 34 /* Keymaster0Engine is a BoringSSL ENGINE that implements RSA & EC by forwarding the requested 56 RSA* BlobToRsaKey(const KeymasterKeyBlob& blob) const; 59 const keymaster_key_blob_t* RsaKeyToBlob(const RSA* rsa) const; 60 const keymaster_key_blob_t* EcKeyToBlob(const EC_KEY* rsa) const; 74 static int rsa_private_transform(RSA* rsa, uint8_t* out, const uint8_t* in, size_t len); 87 int RsaPrivateTransform(RSA* rsa, uint8_t* out, const uint8_t* in, size_t len) const [all...] |
keymaster1_engine.h | 25 #include <openssl/rsa.h> 71 RSA* BuildRsaKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, 77 KeyData* GetData(const RSA* rsa) const; 78 KeyData* GetData(const EC_KEY* rsa) const; 103 static int rsa_sign_raw(RSA* rsa, size_t* out_len, uint8_t* out, size_t max_out, 105 static int rsa_decrypt(RSA* rsa, size_t* out_len, uint8_t* out, size_t max_out,
|
keymaster0_engine.cpp | 107 ALOGE("Error generating RSA key pair with keymaster0 device"); 180 RSA* Keymaster0Engine::BlobToRsaKey(const KeymasterKeyBlob& blob) const { 181 // Create new RSA key (with engine methods) and insert blob 182 unique_ptr<RSA, RSA_Delete> rsa(RSA_new_method(engine_)); 183 if (!rsa) 187 if (!blob_copy->key_material || !RSA_set_ex_data(rsa.get(), rsa_index_, blob_copy)) 190 // Copy public key into new RSA key 194 unique_ptr<RSA, RSA_Delete> public_rsa(EVP_PKEY_get1_RSA(pkey.get())); 197 rsa->n = BN_dup(public_rsa->n) [all...] |
keymaster1_engine.cpp | 136 RSA* Keymaster1Engine::BuildRsaKey(const KeymasterKeyBlob& blob, 139 // Create new RSA key (with engine methods) and add metadata 140 unique_ptr<RSA, RSA_Delete> rsa(RSA_new_method(engine_.get())); 141 if (!rsa) { 147 if (!RSA_set_ex_data(rsa.get(), rsa_index_, key_data)) { 153 // Copy public key into new RSA key 161 unique_ptr<RSA, RSA_Delete> public_rsa(EVP_PKEY_get1_RSA(pkey.get())); 167 rsa->n = BN_dup(public_rsa->n); 168 rsa->e = BN_dup(public_rsa->e) [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/boringssl/src/crypto/evp/ |
p_rsa.c | 68 #include <openssl/rsa.h> 70 #include "../rsa/internal.h" 78 /* RSA padding mode */ 86 /* tbuf is a buffer which is either NULL, or is the size of the RSA modulus. 87 * It's used to store the output of RSA operations. */ 168 RSA *rsa = ctx->pkey->pkey.rsa; local 196 if (!RSA_sign(EVP_MD_type(rctx->md), tbs, tbslen, sig, &out_len, rsa)) { 204 !RSA_padding_add_PKCS1_PSS_mgf1(rsa, rctx->tbuf, tbs, rctx->md 224 RSA *rsa = ctx->pkey->pkey.rsa; local 262 RSA *rsa = ctx->pkey->pkey.rsa; local 294 RSA *rsa = ctx->pkey->pkey.rsa; local 482 RSA *rsa = NULL; local [all...] |
/external/vboot_reference/tests/ |
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/chromium-trace/catapult/third_party/gsutil/third_party/rsa/tests/ |
test_pkcs1.py | 6 import rsa namespace 7 from rsa import pkcs1 8 from rsa._compat import byte, is_integer, b, is_bytes 13 (self.pub, self.priv) = rsa.newkeys(256) 56 (self.pub, self.priv) = rsa.newkeys(512) 79 (otherpub, _) = rsa.newkeys(512)
|
test_varblock.py | 10 import rsa namespace 11 from rsa._compat import b 12 from rsa import varblock
|
/external/curl/docs/examples/ |
usercertinmem.c | 23 /* Example using an in memory PEM user certificate and RSA key to retrieve an 50 RSA *rsa = NULL; local 96 /*replace the XXX with the actual RSA key*/ 98 "-----BEGIN RSA PRIVATE KEY-----\n"\ 115 "-----END RSA PRIVATE KEY-----\n"; 141 /*create a bio for the RSA key*/ 147 /*read the key bio into an RSA object*/ 148 rsa = PEM_read_bio_RSAPrivateKey(kbio, NULL, 0, NULL); 149 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...] |
/external/chromium-trace/catapult/third_party/gsutil/third_party/rsa/rsa/ |
randnum.py | 23 from rsa import common, transform 24 from rsa._compat import byte
|
util.py | 24 import rsa.key namespace 65 priv_key = rsa.key.PrivateKey.load_pkcs1(in_data, cli.inform) 66 pub_key = rsa.key.PublicKey(priv_key.n, priv_key.e)
|
pkcs1.py | 23 these methods much more secure than the ones in the ``rsa`` module. 34 from rsa._compat import b 35 from rsa import common, transform, core, varblock 149 :param pub_key: the :py:class:`rsa.PublicKey` to encrypt with. 153 >>> from rsa import key, common 181 :param crypto: the crypto text as returned by :py:func:`rsa.encrypt` 182 :param priv_key: the :py:class:`rsa.PrivateKey` to decrypt with. 188 >>> import rsa 189 >>> (pub_key, priv_key) = rsa.newkeys(256) 204 :py:class:`rsa.pkcs1.DecryptionError`. If you want to be *sure*, us [all...] |
/system/core/adb/ |
adb_auth_host.cpp | 32 #include "mincrypt/rsa.h" 43 #include <openssl/rsa.h> 55 RSA *rsa; member in struct:adb_private_key 61 /* Convert OpenSSL RSA private key to android pre-computed RSAPublicKey format */ 62 static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey *pkey) 75 if (RSA_size(rsa) != RSANUMBYTES) { 81 BN_copy(n, rsa->n); 95 pkey->exponent = BN_get_word(rsa->e) 215 RSA* rsa = RSA_new(); local [all...] |
/system/security/keystore-engine/ |
android_engine.cpp | 36 #include <openssl/rsa.h> 50 /* key_id_dup is called when one of the RSA or EC_KEY objects is duplicated. */ 64 /* key_id_free is called when one of the RSA, DSA or EC_KEY object is freed. */ 75 /* KeystoreEngine is a BoringSSL ENGINE that implements RSA and ECDSA by 130 const char* rsa_get_key_id(const RSA* rsa) { 132 RSA_get_ex_data(rsa, g_keystore_engine->rsa_ex_index())); 136 * d'th power of it, modulo the RSA modulus, and writes the result as a 139 int rsa_private_transform(RSA *rsa, uint8_t *out, const uint8_t *in, size_t len) [all...] |
/external/chromium-trace/catapult/third_party/gsutil/third_party/oauth2client/tests/ |
test_service_account.py | 20 Unit tests for service account credentials implemented using RSA. 25 import rsa namespace 58 pub_key = rsa.PublicKey.load_pkcs1_openssl_pem( 61 self.assertTrue(rsa.pkcs1.verify(b'Google', signature, pub_key)) 64 rsa.pkcs1.verify(b'Orest', signature, pub_key) 66 except rsa.pkcs1.VerificationError: 70 rsa.pkcs1.verify(b'Google', b'bad signature', pub_key) 72 except rsa.pkcs1.VerificationError:
|
/external/ipsec-tools/src/racoon/ |
rsalist.c | 46 #include <openssl/rsa.h> 69 struct netaddr *dst, RSA *rsa) 74 rsa_key->rsa = rsa; 100 RSA_print_fp(stdout, key->rsa, 4); 168 plog(LLV_DEBUG, LOCATION, NULL, "Looking up RSA key for %s\n", 200 RSA * 209 if (eay_check_rsasign(source, sig, key->rsa) == 0) { 211 return key->rsa; [all...] |
/external/boringssl/src/ssl/ |
ssl_rsa.c | 10 * apply to all code found in this distribution, be it the RC4, RSA, 103 int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) { 107 if (rsa == NULL) { 118 RSA_up_ref(rsa); 119 EVP_PKEY_assign_RSA(pkey, rsa); 151 RSA *rsa = RSA_private_key_from_bytes(der, der_len); local 152 if (rsa == NULL) { 157 int ret = SSL_use_RSAPrivateKey(ssl, rsa); 284 RSA *rsa = RSA_private_key_from_bytes(der, der_len); local 404 RSA *rsa = EVP_PKEY_get0_RSA(ssl->cert->privatekey); local [all...] |
/external/boringssl/src/crypto/x509/ |
x_all.c | 10 * apply to all code found in this distribution, be it the RC4, RSA, 62 #include <openssl/rsa.h> 202 RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa) 204 return ASN1_d2i_fp_of(RSA, RSA_new, d2i_RSAPrivateKey, fp, rsa); 207 int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa) 209 return ASN1_i2d_fp_of_const(RSA, i2d_RSAPrivateKey, fp, rsa) [all...] |