Home
last modified time | relevance | path

Searched refs:public_key (Results 1 – 22 of 22) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/pk/dh/
A Ddh_shared_secret.c23 int dh_shared_secret(const dh_key *private_key, const dh_key *public_key, in dh_shared_secret() argument
31 LTC_ARGCHK(public_key != NULL); in dh_shared_secret()
41 … if (mp_cmp(private_key->prime, public_key->prime) != LTC_MP_EQ) { return CRYPT_PK_TYPE_MISMATCH; } in dh_shared_secret()
42 … if (mp_cmp(private_key->base, public_key->base) != LTC_MP_EQ) { return CRYPT_PK_TYPE_MISMATCH; } in dh_shared_secret()
50 if ((err = dh_check_pubkey(public_key)) != CRYPT_OK) { in dh_shared_secret()
55 if ((err = mp_exptmod(public_key->y, private_key->x, private_key->prime, tmp)) != CRYPT_OK) { in dh_shared_secret()
/optee_os/core/lib/libtomcrypt/src/pk/ed25519/
A Ded25519_verify.c30 int *stat, const curve25519_key *public_key) in ed25519_verify() argument
39 LTC_ARGCHK(public_key != NULL); in ed25519_verify()
44 if (public_key->algo != PKA_ED25519) return CRYPT_PK_INVALID_TYPE; in ed25519_verify()
58 public_key->pub); in ed25519_verify()
/optee_os/core/lib/libtomcrypt/src/pk/x25519/
A Dx25519_shared_secret.c28 const curve25519_key *public_key, in x25519_shared_secret() argument
32 LTC_ARGCHK(public_key != NULL); in x25519_shared_secret()
43 tweetnacl_crypto_scalarmult(out, private_key->priv, public_key->pub); in x25519_shared_secret()
/optee_os/core/drivers/crypto/crypto_api/acipher/
A Ddh.c58 struct bignum *public_key, in crypto_acipher_dh_shared_secret() argument
66 if (!private_key || !public_key || !secret) { in crypto_acipher_dh_shared_secret()
74 sdata.secret.length = crypto_bignum_num_bytes(public_key); in crypto_acipher_dh_shared_secret()
81 sdata.key_pub = public_key; in crypto_acipher_dh_shared_secret()
A Decc.c262 struct ecc_public_key *public_key, in ecc_shared_secret() argument
271 if (!private_key || !public_key || !secret_len) { in ecc_shared_secret()
276 if (private_key->curve != public_key->curve) { in ecc_shared_secret()
278 private_key->curve, public_key->curve); in ecc_shared_secret()
282 size_bytes = get_ecc_key_size_bytes(public_key->curve); in ecc_shared_secret()
302 sdata.key_pub = public_key; in ecc_shared_secret()
/optee_os/core/lib/libtomcrypt/src/pk/dsa/
A Ddsa_shared_secret.c29 const dsa_key *public_key, in dsa_shared_secret() argument
37 LTC_ARGCHK(public_key != NULL); in dsa_shared_secret()
46 if ((err = mp_exptmod(base, private_key, public_key->p, res)) != CRYPT_OK) { in dsa_shared_secret()
/optee_os/scripts/
A Dsign_helper_kms.py35 self.public_key = serialization.load_der_public_key(
40 return self.public_key.key_size
42 def public_key(self) -> RSAPublicKey: member in _RSAPrivateKeyInKMS
43 return self.public_key
A Dpem_to_pub_c.py36 key = key.public_key()
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Decc_shared_secret.c28 int ecc_shared_secret(const ecc_key *private_key, const ecc_key *public_key, in ecc_shared_secret() argument
37 LTC_ARGCHK(public_key != NULL); in ecc_shared_secret()
55 …if ((err = ltc_mp.ecc_ptmul(private_key->k, &public_key->pubkey, result, a, prime, 1)) != CRYPT_OK… in ecc_shared_secret()
/optee_os/core/lib/libtomcrypt/
A Ddh.c70 struct bignum *public_key, in crypto_acipher_dh_shared_secret() argument
75 if (!private_key || !public_key || !secret) in crypto_acipher_dh_shared_secret()
78 err = mp_exptmod(public_key, private_key->x, private_key->p, secret); in crypto_acipher_dh_shared_secret()
A Decc.c316 struct ecc_public_key *public_key, in _ltc_ecc_shared_secret() argument
327 if (private_key->curve != public_key->curve) in _ltc_ecc_shared_secret()
334 res = ecc_populate_ltc_public_key(&ltc_public_key, public_key, in _ltc_ecc_shared_secret()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/x509/
A Dx509_encode_subject_public_key_info.c42 unsigned int algorithm, const void* public_key, unsigned long public_key_len, in x509_encode_subject_public_key_info() argument
67 LTC_ASN1_RAW_BIT_STRING, public_key_len*8U, public_key, in x509_encode_subject_public_key_info()
A Dx509_decode_subject_public_key_info.c42 unsigned int algorithm, void* public_key, unsigned long* public_key_len, in x509_decode_subject_public_key_info() argument
109 XMEMCPY(public_key, subject_pubkey[1].data, len); in x509_decode_subject_public_key_info()
/optee_os/lib/libmbedtls/core/
A Ddh.c97 struct bignum *public_key, in crypto_acipher_dh_shared_secret() argument
113 dhm.GY = *(mbedtls_mpi *)public_key; in crypto_acipher_dh_shared_secret()
A Decc.c310 struct ecc_public_key *public_key, in ecc_shared_secret() argument
328 ecdh.Qp.X = *(mbedtls_mpi *)public_key->x; in ecc_shared_secret()
329 ecdh.Qp.Y = *(mbedtls_mpi *)public_key->y; in ecc_shared_secret()
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_pk.h156 int dh_shared_secret(const dh_key *private_key, const dh_key *public_key,
291 int ecc_shared_secret(const ecc_key *private_key, const ecc_key *public_key,
374 int *stat, const curve25519_key *public_key);
394 const curve25519_key *public_key,
474 const dsa_key *public_key,
A Dtomcrypt_private.h400 unsigned int algorithm, const void* public_key, unsigned long public_key_len,
404 unsigned int algorithm, void* public_key, unsigned long* public_key_len,
/optee_os/core/drivers/crypto/se050/core/
A Decc.c349 struct ecc_public_key *public_key, in shared_secret() argument
360 if (private_key->curve != public_key->curve) in shared_secret()
380 ret = set_binary_data(public_key->x, key_bytes, &key.x, &key.x_len); in shared_secret()
386 ret = set_binary_data(public_key->y, key_bytes, &key.y, &key.y_len); in shared_secret()
/optee_os/core/include/crypto/
A Dcrypto.h205 struct bignum *public_key,
246 struct ecc_public_key *public_key,
A Dcrypto_impl.h351 struct ecc_public_key *public_key,
/optee_os/core/crypto/
A Dcrypto.c669 struct bignum *public_key __unused, in crypto_acipher_dh_shared_secret()
752 struct ecc_public_key *public_key, in crypto_acipher_ecc_shared_secret() argument
761 return private_key->ops->shared_secret(private_key, public_key, secret, in crypto_acipher_ecc_shared_secret()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dssl_srv.c3861 mbedtls_pk_context *public_key = &mbedtls_ssl_own_cert( ssl )->pk; in ssl_decrypt_encrypted_pms() local
3862 size_t len = mbedtls_pk_get_len( public_key ); in ssl_decrypt_encrypted_pms()

Completed in 59 milliseconds