Home
last modified time | relevance | path

Searched refs:priv_key (Results 1 – 25 of 58) sorted by relevance

123

/external/epid-sdk/epid/member/unittests/
Dprovision_key-test.cc41 PrivKey const* priv_key, in ProvisionBulkAndStart() argument
44 sts = EpidProvisionKey(ctx, pub_key, priv_key, precomp_str); in ProvisionBulkAndStart()
55 PrivKey priv_key = this->kMemberPrivateKey; in TEST_F() local
61 EpidProvisionKey(nullptr, &pub_key, &priv_key, &precomp)); in TEST_F()
63 EpidProvisionKey(member, nullptr, &priv_key, &precomp)); in TEST_F()
67 EpidProvisionKey(nullptr, &pub_key, &priv_key, nullptr)); in TEST_F()
69 EpidProvisionKey(member, nullptr, &priv_key, nullptr)); in TEST_F()
77 PrivKey priv_key = this->kMemberPrivateKey; in TEST_F() local
83 EpidProvisionKey(member, &pub_key, &priv_key, &precomp)); in TEST_F()
84 EXPECT_EQ(kEpidNoErr, EpidProvisionKey(member, &pub_key, &priv_key, nullptr)); in TEST_F()
[all …]
Dprovision_compressed-test.cc55 CompressedPrivKey priv_key = this->kGrpXMember9CompressedKey; in TEST_F() local
65 EpidProvisionCompressed(nullptr, &pub_key, &priv_key, &precomp)); in TEST_F()
67 EpidProvisionCompressed(member, nullptr, &priv_key, &precomp)); in TEST_F()
71 EpidProvisionCompressed(nullptr, &pub_key, &priv_key, nullptr)); in TEST_F()
73 EpidProvisionCompressed(member, nullptr, &priv_key, nullptr)); in TEST_F()
81 CompressedPrivKey priv_key = this->kGrpXMember9CompressedKey; in TEST_F() local
91 EpidProvisionCompressed(member, &pub_key, &priv_key, &precomp)); in TEST_F()
93 EpidProvisionCompressed(member, &pub_key, &priv_key, nullptr)); in TEST_F()
99 CompressedPrivKey priv_key = this->kGrpXMember9CompressedKey; in TEST_F() local
111 ProvisionCompressedAndStart(member, &pub_key, &priv_key, &precomp)); in TEST_F()
[all …]
Diskeyvalid-test.cc44 const PrivKey priv_key = this->kMemberPrivateKey; in TEST_F() local
51 EXPECT_FALSE(EpidMemberIsKeyValid(nullptr, &priv_key.A, &priv_key.x, in TEST_F()
53 EXPECT_FALSE(EpidMemberIsKeyValid(member, nullptr, &priv_key.x, &pub_key.h1, in TEST_F()
55 EXPECT_FALSE(EpidMemberIsKeyValid(member, &priv_key.A, nullptr, &pub_key.h1, in TEST_F()
57 EXPECT_FALSE(EpidMemberIsKeyValid(member, &priv_key.A, &priv_key.x, nullptr, in TEST_F()
59 EXPECT_FALSE(EpidMemberIsKeyValid(member, &priv_key.A, &priv_key.x, in TEST_F()
72 const PrivKey priv_key = this->kMemberPrivateKey; in TEST_F() local
78 EXPECT_TRUE(EpidMemberIsKeyValid(member, &priv_key.A, &priv_key.x, in TEST_F()
91 PrivKey priv_key = this->kMemberPrivateKey; in TEST_F() local
99 EXPECT_TRUE(EpidMemberIsKeyValid(member, &priv_key.A, &priv_key.x, in TEST_F()
[all …]
Ddecompress_privkey-test.cc39 PrivKey priv_key = {}; in TEST_F() local
41 EpidDecompressPrivKey(nullptr, &compressed_privkey, &priv_key)); in TEST_F()
43 EpidDecompressPrivKey(&pub_key, nullptr, &priv_key)); in TEST_F()
52 PrivKey priv_key = {}; in TEST_F() local
54 EpidDecompressPrivKey(&pub_key, &compressed_privkey, &priv_key)); in TEST_F()
55 EXPECT_EQ(expected_decompressed_key, priv_key); in TEST_F()
61 PrivKey priv_key = {}; in TEST_F() local
63 EpidDecompressPrivKey(&pub_key, &compressed_privkey, &priv_key)); in TEST_F()
70 PrivKey priv_key = {}; in TEST_F() local
75 EpidDecompressPrivKey(&pub_key_h1, &compressed_privkey, &priv_key)); in TEST_F()
[all …]
Dprovision_credential-test.cc258 const PrivKey* priv_key = in TEST_F() local
260 FpElemStr f = priv_key->f; in TEST_F()
262 credential.A = priv_key->A; in TEST_F()
263 credential.gid = priv_key->gid; in TEST_F()
264 credential.x = priv_key->x; in TEST_F()
280 const PrivKey* priv_key = in TEST_F() local
282 FpElemStr f = priv_key->f; in TEST_F()
284 credential.A = priv_key->A; in TEST_F()
285 credential.gid = priv_key->gid; in TEST_F()
286 credential.x = priv_key->x; in TEST_F()
/external/epid-sdk/epid/member/tiny/unittests/
Dprovision_key-test.cc39 PrivKey const* priv_key, in ProvisionBulkAndStart() argument
42 sts = EpidProvisionKey(ctx, pub_key, priv_key, precomp_str); in ProvisionBulkAndStart()
53 PrivKey priv_key = this->kMemberPrivateKey; in TEST_F() local
59 EpidProvisionKey(nullptr, &pub_key, &priv_key, &precomp)); in TEST_F()
61 EpidProvisionKey(member, nullptr, &priv_key, &precomp)); in TEST_F()
65 EpidProvisionKey(nullptr, &pub_key, &priv_key, nullptr)); in TEST_F()
67 EpidProvisionKey(member, nullptr, &priv_key, nullptr)); in TEST_F()
75 PrivKey priv_key = this->kMemberPrivateKey; in TEST_F() local
81 EpidProvisionKey(member, &pub_key, &priv_key, &precomp)); in TEST_F()
82 EXPECT_EQ(kEpidNoErr, EpidProvisionKey(member, &pub_key, &priv_key, nullptr)); in TEST_F()
[all …]
Dprovision_compressed-test.cc54 CompressedPrivKey priv_key = this->kGrpXMember9CompressedKey; in TEST_F() local
63 EpidProvisionCompressed(nullptr, &pub_key, &priv_key, &precomp)); in TEST_F()
65 EpidProvisionCompressed(member, nullptr, &priv_key, &precomp)); in TEST_F()
69 EpidProvisionCompressed(nullptr, &pub_key, &priv_key, nullptr)); in TEST_F()
71 EpidProvisionCompressed(member, nullptr, &priv_key, nullptr)); in TEST_F()
80 CompressedPrivKey priv_key = this->kGrpXMember9CompressedKey; in TEST_F() local
89 EpidProvisionCompressed(member, &pub_key, &priv_key, &precomp)); in TEST_F()
91 EpidProvisionCompressed(member, &pub_key, &priv_key, nullptr)); in TEST_F()
97 CompressedPrivKey priv_key = this->kGrpXMember9CompressedKey; in TEST_F() local
109 ProvisionCompressedAndStart(member, &pub_key, &priv_key, &precomp)); in TEST_F()
[all …]
Ddecompress_privkey-test.cc39 PrivKey priv_key = {}; in TEST_F() local
41 EpidDecompressPrivKey(nullptr, &compressed_privkey, &priv_key)); in TEST_F()
43 EpidDecompressPrivKey(&pub_key, nullptr, &priv_key)); in TEST_F()
52 PrivKey priv_key = {}; in TEST_F() local
54 EpidDecompressPrivKey(&pub_key, &compressed_privkey, &priv_key)); in TEST_F()
55 EXPECT_EQ(expected_decompressed_key, priv_key); in TEST_F()
61 PrivKey priv_key = {}; in TEST_F() local
63 EpidDecompressPrivKey(&pub_key, &compressed_privkey, &priv_key)); in TEST_F()
70 PrivKey priv_key = {}; in TEST_F() local
75 EpidDecompressPrivKey(&pub_key_h1, &compressed_privkey, &priv_key)); in TEST_F()
[all …]
Dprovision_credential-test.cc256 const PrivKey* priv_key = in TEST_F() local
258 FpElemStr f = priv_key->f; in TEST_F()
260 credential.A = priv_key->A; in TEST_F()
261 credential.gid = priv_key->gid; in TEST_F()
262 credential.x = priv_key->x; in TEST_F()
278 const PrivKey* priv_key = in TEST_F() local
280 FpElemStr f = priv_key->f; in TEST_F()
282 credential.A = priv_key->A; in TEST_F()
283 credential.gid = priv_key->gid; in TEST_F()
284 credential.x = priv_key->x; in TEST_F()
/external/boringssl/src/crypto/dh/
Ddh.c111 BN_clear_free(dh->priv_key); in DH_free()
123 *out_priv_key = dh->priv_key; in DH_get0_key()
127 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument
133 if (priv_key != NULL) { in DH_set0_key()
134 BN_free(dh->priv_key); in DH_set0_key()
135 dh->priv_key = priv_key; in DH_set0_key()
296 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local
308 if (dh->priv_key == NULL) { in DH_generate_key()
309 priv_key = BN_new(); in DH_generate_key()
310 if (priv_key == NULL) { in DH_generate_key()
[all …]
/external/boringssl/src/crypto/fipsmodule/ec/
Dec_key.c173 ec_wrapped_scalar_free(r->priv_key); in EC_KEY_free()
196 (src->priv_key != NULL && in EC_KEY_dup()
228 assert(key->priv_key == NULL); in EC_KEY_set_group()
237 return key->priv_key != NULL ? &key->priv_key->bignum : NULL; in EC_KEY_get0_private_key()
240 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) { in EC_KEY_set_private_key() argument
250 if (!ec_bignum_to_scalar(key->group, &scalar->scalar, priv_key)) { in EC_KEY_set_private_key()
255 ec_wrapped_scalar_free(key->priv_key); in EC_KEY_set_private_key()
256 key->priv_key = scalar; in EC_KEY_set_private_key()
322 if (eckey->priv_key != NULL) { in EC_KEY_check_key()
326 &eckey->priv_key->scalar, NULL, NULL)) { in EC_KEY_check_key()
[all …]
/external/epid-sdk/epid/member/src/
Dprovision_bulk.c33 PrivKey const* priv_key, in EpidProvisionKey() argument
39 if (!pub_key || !priv_key || !ctx) { in EpidProvisionKey()
45 if (memcmp(&pub_key->gid, &priv_key->gid, sizeof(GroupId))) { in EpidProvisionKey()
49 sts = Tpm2LoadExternal(ctx->tpm2_ctx, &priv_key->f); in EpidProvisionKey()
54 credential.A = priv_key->A; in EpidProvisionKey()
55 credential.x = priv_key->x; in EpidProvisionKey()
56 credential.gid = priv_key->gid; in EpidProvisionKey()
62 sts = Tpm2LoadExternal(ctx->tpm2_ctx, &priv_key->f); in EpidProvisionKey()
Ddecompress_privkey.c56 PrivKey* priv_key) { in EpidDecompressPrivKey() argument
71 if (!pub_key || !compressed_privkey || !priv_key) { in EpidDecompressPrivKey()
144 DeriveXF(&priv_key->x, &priv_key->f, &compressed_privkey->seed, &p_str); in EpidDecompressPrivKey()
155 result = EcSscmExp(G2, g2, (BigNumStr const*)&priv_key->x, t1); in EpidDecompressPrivKey()
164 result = EcSscmExp(G1, h1, (BigNumStr const*)&priv_key->f, t2); in EpidDecompressPrivKey()
196 priv_key->gid = pub_key->gid; in EpidDecompressPrivKey()
197 result = WriteEcPoint(G1, priv_key_.A, &priv_key->A, sizeof(priv_key->A)); in EpidDecompressPrivKey()
Dprovision_compressed.c31 PrivKey priv_key; in EpidProvisionCompressed() local
35 sts = EpidDecompressPrivKey(pub_key, compressed_privkey, &priv_key); in EpidProvisionCompressed()
39 sts = EpidProvisionKey(ctx, pub_key, &priv_key, precomp_str); in EpidProvisionCompressed()
/external/epid-sdk/tools/revokekey/src/
Dmain.c51 char const* cacert_file, PrivKey* priv_key) { in OpenKey() argument
61 if (0 != ReadLoud(privkey_file, priv_key, sizeof(PrivKey))) { in OpenKey()
106 sts = EpidDecompressPrivKey(&pub_key, &cmp_key, priv_key); in OpenKey()
122 int MakeRequest(PrivKey const* priv_key, char const* req_file, bool verbose) { in MakeRequest() argument
149 PrintBuffer(&(priv_key->gid), sizeof(priv_key->gid)); in MakeRequest()
153 PrintBuffer(priv_key, sizeof(PrivKey)); in MakeRequest()
194 priv_key, sizeof(PrivKey))) { in MakeRequest()
210 req_top->privkey = *priv_key; in MakeRequest()
246 PrivKey priv_key; in main() local
332 capubkey_file->filename[0], &priv_key); in main()
[all …]
/external/epid-sdk/epid/member/tiny/src/
Dprovisionkey.c45 PrivKey const* priv_key, in EpidProvisionKey() argument
49 if (!pub_key || !priv_key || !ctx) { in EpidProvisionKey()
52 if (0 != memcmp(&pub_key->gid, &priv_key->gid, sizeof(GroupId))) { in EpidProvisionKey()
60 PrivKeyDeserialize(&native_priv_key, priv_key); in EpidProvisionKey()
71 ctx->credential.gid = priv_key->gid; in EpidProvisionKey()
72 ctx->credential.A = priv_key->A; in EpidProvisionKey()
73 ctx->credential.x = priv_key->x; in EpidProvisionKey()
/external/boringssl/src/crypto/fipsmodule/ecdh/
Decdh.c81 const EC_KEY *priv_key) { in ECDH_compute_key_fips() argument
82 if (priv_key->priv_key == NULL) { in ECDH_compute_key_fips()
86 const EC_SCALAR *const priv = &priv_key->priv_key->scalar; in ECDH_compute_key_fips()
87 const EC_GROUP *const group = EC_KEY_get0_group(priv_key); in ECDH_compute_key_fips()
/external/boringssl/src/crypto/ecdh_extra/
Decdh_extra.c81 const EC_KEY *priv_key, in ECDH_compute_key() argument
84 if (priv_key->priv_key == NULL) { in ECDH_compute_key()
88 const EC_SCALAR *const priv = &priv_key->priv_key->scalar; in ECDH_compute_key()
89 const EC_GROUP *const group = EC_KEY_get0_group(priv_key); in ECDH_compute_key()
/external/epid-sdk/epid/common-testhelper/
Dmember_wrapper-testhelper.cc44 MemberCtxObj::MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, in MemberCtxObj() argument
49 SetMemberParams(rnd_func, rnd_param, &priv_key.f, &params); in MemberCtxObj()
51 sts = EpidProvisionKey(ctx_, &pub_key, &priv_key, nullptr); in MemberCtxObj()
91 MemberCtxObj::MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, in MemberCtxObj() argument
97 SetMemberParams(rnd_func, rnd_param, &priv_key.f, &params); in MemberCtxObj()
106 sts = EpidProvisionKey(ctx_, &pub_key, &priv_key, nullptr); in MemberCtxObj()
133 MemberCtxObj::MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, in MemberCtxObj() argument
139 SetMemberParams(rnd_func, rnd_param, &priv_key.f, &params); in MemberCtxObj()
141 sts = EpidProvisionKey(ctx_, &pub_key, &priv_key, &precomp); in MemberCtxObj()
157 MemberCtxObj::MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, in MemberCtxObj() argument
[all …]
Dmember_wrapper-testhelper.h32 explicit MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key,
35 explicit MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key,
47 MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key,
51 MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key,
/external/boringssl/src/crypto/evp/
Dprint.c223 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local
225 priv_key = NULL; in do_dsa_print()
227 priv_key = x->priv_key; in do_dsa_print()
245 update_buflen(priv_key, &buf_len); in do_dsa_print()
254 if (priv_key) { in do_dsa_print()
261 if (!bn_print(bp, "priv:", priv_key, m, off) || in do_dsa_print()
302 const BIGNUM *priv_key; in do_EC_KEY_print() local
343 priv_key = EC_KEY_get0_private_key(x); in do_EC_KEY_print()
344 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len) { in do_EC_KEY_print()
348 priv_key = NULL; in do_EC_KEY_print()
[all …]
Dp_dsa_asn1.c138 dsa->priv_key = BN_new(); in dsa_priv_decode()
140 if (dsa->priv_key == NULL || dsa->pub_key == NULL) { in dsa_priv_decode()
145 if (!BN_parse_asn1_unsigned(key, dsa->priv_key) || in dsa_priv_decode()
154 !BN_mod_exp_mont_consttime(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, in dsa_priv_decode()
171 if (dsa == NULL || dsa->priv_key == NULL) { in dsa_priv_encode()
185 !BN_marshal_asn1(&private_key, dsa->priv_key) || in dsa_priv_encode()
/external/boringssl/src/crypto/dsa/
Ddsa.c122 BN_clear_free(dsa->priv_key); in DSA_free()
140 *out_priv_key = dsa->priv_key; in DSA_get0_key()
157 int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key) { in DSA_set0_key() argument
166 if (priv_key != NULL) { in DSA_set0_key()
167 BN_free(dsa->priv_key); in DSA_set0_key()
168 dsa->priv_key = priv_key; in DSA_set0_key()
473 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_generate_key() local
480 priv_key = dsa->priv_key; in DSA_generate_key()
481 if (priv_key == NULL) { in DSA_generate_key()
482 priv_key = BN_new(); in DSA_generate_key()
[all …]
/external/python/rsa/rsa/
Dpkcs1.py181 def decrypt(crypto, priv_key): argument
232 blocksize = common.byte_size(priv_key.n)
234 decrypted = priv_key.blinded_decrypt(encrypted)
250 def sign_hash(hash_value, priv_key, hash_method): argument
274 keylength = common.byte_size(priv_key.n)
278 encrypted = priv_key.blinded_encrypt(payload)
284 def sign(message, priv_key, hash_method): argument
303 return sign_hash(msg_hash, priv_key, hash_method)
/external/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa.c192 size_t digest_len, const EC_SCALAR *priv_key) { in ecdsa_sign_setup() argument
219 SHA512_Update(&sha, priv_key->words, order->width * sizeof(BN_ULONG)); in ecdsa_sign_setup()
256 if (group == NULL || eckey->priv_key == NULL) { in ECDSA_do_sign()
261 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ECDSA_do_sign() local
274 priv_key) || in ECDSA_do_sign()
283 ec_scalar_mul_montgomery(group, &s, priv_key, &r_mont); in ECDSA_do_sign()

123