/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ed25519/ |
A D | ed25519_verify.c | 16 const curve25519_key *public_key) in s_ed25519_verify() argument 25 LTC_ARGCHK(public_key != NULL); in s_ed25519_verify() 30 if (public_key->algo != LTC_OID_ED25519) return CRYPT_PK_INVALID_TYPE; in s_ed25519_verify() 45 public_key->pub); in s_ed25519_verify() 71 const curve25519_key *public_key) in ed25519ctx_verify() argument 81 return s_ed25519_verify(msg, msglen, sig, siglen, ctx_prefix, ctx_prefix_size, stat, public_key); in ed25519ctx_verify() 100 const curve25519_key *public_key) in ed25519ph_verify() argument 113 …519_verify(msg_hash, sizeof(msg_hash), sig, siglen, ctx_prefix, ctx_prefix_size, stat, public_key); in ed25519ph_verify() 129 const curve25519_key *public_key) in ed25519_verify() argument 131 return s_ed25519_verify(msg, msglen, sig, siglen, NULL, 0, stat, public_key); in ed25519_verify()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dh/ |
A D | dh_shared_secret.c | 16 int dh_shared_secret(const dh_key *private_key, const dh_key *public_key, in dh_shared_secret() argument 24 LTC_ARGCHK(public_key != NULL); in dh_shared_secret() 34 … if (mp_cmp(private_key->prime, public_key->prime) != LTC_MP_EQ) { return CRYPT_PK_TYPE_MISMATCH; } in dh_shared_secret() 35 … if (mp_cmp(private_key->base, public_key->base) != LTC_MP_EQ) { return CRYPT_PK_TYPE_MISMATCH; } in dh_shared_secret() 43 if ((err = dh_check_pubkey(public_key)) != CRYPT_OK) { in dh_shared_secret() 48 if ((err = mp_exptmod(public_key->y, private_key->x, private_key->prime, tmp)) != CRYPT_OK) { in dh_shared_secret()
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | ed25519.c | 132 curve25519_key public_key = { in crypto_acipher_ed25519_verify() local 140 memcpy(public_key.pub, key->pub, sizeof(public_key.pub)); in crypto_acipher_ed25519_verify() 143 &public_key) != CRYPT_OK) in crypto_acipher_ed25519_verify() 159 curve25519_key public_key = { in crypto_acipher_ed25519ctx_verify() local 167 memcpy(public_key.pub, key->pub, sizeof(public_key.pub)); in crypto_acipher_ed25519ctx_verify() 171 &stat, &public_key) != CRYPT_OK) in crypto_acipher_ed25519ctx_verify() 175 &stat, &public_key) != CRYPT_OK) in crypto_acipher_ed25519ctx_verify()
|
A D | dh.c | 70 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 D | x25519.c | 70 void *public_key, in crypto_acipher_x25519_shared_secret() argument 83 if (!private_key || !public_key || !secret || !secret_len) in crypto_acipher_x25519_shared_secret() 89 memcpy(ltc_public_key.pub, public_key, X25519_KEY_SIZE_BYTES); in crypto_acipher_x25519_shared_secret()
|
A D | ecc.c | 321 struct ecc_public_key *public_key, in _ltc_ecc_shared_secret() argument 332 if (private_key->curve != public_key->curve) in _ltc_ecc_shared_secret() 339 res = ecc_populate_ltc_public_key(<c_public_key, public_key, in _ltc_ecc_shared_secret()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/x25519/ |
A D | x25519_shared_secret.c | 21 const curve25519_key *public_key, in x25519_shared_secret() argument 25 LTC_ARGCHK(public_key != NULL); in x25519_shared_secret() 36 tweetnacl_crypto_scalarmult(out, private_key->priv, public_key->pub); in x25519_shared_secret()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_shared_secret.c | 22 const dsa_key *public_key, in dsa_shared_secret() argument 30 LTC_ARGCHK(public_key != NULL); in dsa_shared_secret() 39 if ((err = mp_exptmod(base, private_key, public_key->p, res)) != CRYPT_OK) { in dsa_shared_secret()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ecc_shared_secret.c | 21 int ecc_shared_secret(const ecc_key *private_key, const ecc_key *public_key, in ecc_shared_secret() argument 30 LTC_ARGCHK(public_key != NULL); in ecc_shared_secret() 48 …if ((err = ltc_mp.ecc_ptmul(private_key->k, &public_key->pubkey, result, a, prime, 1)) != CRYPT_OK… in ecc_shared_secret()
|
/optee_os-3.20.0/core/drivers/crypto/crypto_api/acipher/ |
A D | dh.c | 58 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 D | ecc.c | 285 struct ecc_public_key *public_key, in ecc_shared_secret() argument 294 if (!private_key || !public_key || !secret_len) { in ecc_shared_secret() 299 if (private_key->curve != public_key->curve) { in ecc_shared_secret() 301 private_key->curve, public_key->curve); in ecc_shared_secret() 305 size_bytes = get_ecc_key_size_bytes(public_key->curve); in ecc_shared_secret() 325 sdata.key_pub = public_key; in ecc_shared_secret()
|
/optee_os-3.20.0/scripts/ |
A D | sign_helper_kms.py | 35 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 D | pem_to_pub_c.py | 36 key = key.public_key()
|
A D | sign_encrypt.py | 431 subkey_pkey = subkey_key.public_key() 562 self.subkey_key = rsa.RSAPublicNumbers(e, n).public_key() 771 pkey = self.key.public_key()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/x509/ |
A D | x509_encode_subject_public_key_info.c | 35 unsigned int algorithm, const void* public_key, unsigned long public_key_len, in x509_encode_subject_public_key_info() argument 60 LTC_ASN1_RAW_BIT_STRING, public_key_len*8U, public_key, in x509_encode_subject_public_key_info()
|
A D | x509_decode_subject_public_key_info.c | 35 unsigned int algorithm, void* public_key, unsigned long* public_key_len, in x509_decode_subject_public_key_info() argument 102 XMEMCPY(public_key, subject_pubkey[1].data, len); in x509_decode_subject_public_key_info()
|
/optee_os-3.20.0/lib/libmbedtls/core/ |
A D | dh.c | 97 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 D | ecc.c | 353 struct ecc_public_key *public_key, in ecc_shared_secret() argument 374 ecdh.Qp.X = *(mbedtls_mpi *)public_key->x; in ecc_shared_secret() 375 ecdh.Qp.Y = *(mbedtls_mpi *)public_key->y; in ecc_shared_secret()
|
/optee_os-3.20.0/core/drivers/crypto/se050/core/ |
A D | ecc.c | 400 struct ecc_public_key *public_key, in shared_secret_fallback() argument 416 return ops->shared_secret(private_key, public_key, in shared_secret_fallback() 446 struct ecc_public_key *public_key, in shared_secret() argument 457 if (private_key->curve != public_key->curve) in shared_secret() 465 return shared_secret_fallback(private_key, public_key, in shared_secret() 482 ret = set_binary_data(public_key->x, key_bytes, &key.x, &key.x_len); in shared_secret() 488 ret = set_binary_data(public_key->y, key_bytes, &key.y, &key.y_len); in shared_secret()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_pk.h | 149 int dh_shared_secret(const dh_key *private_key, const dh_key *public_key, 284 int ecc_shared_secret(const ecc_key *private_key, const ecc_key *public_key, 372 const curve25519_key *public_key); 377 const curve25519_key *public_key); 382 const curve25519_key *public_key); 399 const curve25519_key *public_key, 482 const dsa_key *public_key,
|
A D | tomcrypt_private.h | 435 unsigned int algorithm, const void* public_key, unsigned long public_key_len, 439 unsigned int algorithm, void* public_key, unsigned long* public_key_len,
|
/optee_os-3.20.0/core/include/crypto/ |
A D | crypto.h | 241 struct bignum *public_key, 282 struct ecc_public_key *public_key, 293 void *public_key, void *secret,
|
A D | crypto_impl.h | 357 struct ecc_public_key *public_key,
|
/optee_os-3.20.0/core/crypto/ |
A D | crypto.c | 672 struct bignum *public_key __unused, in crypto_acipher_dh_shared_secret() 755 struct ecc_public_key *public_key, in crypto_acipher_ecc_shared_secret() argument 764 return private_key->ops->shared_secret(private_key, public_key, secret, in crypto_acipher_ecc_shared_secret() 822 void *public_key __unused, in crypto_acipher_x25519_shared_secret()
|
/optee_os-3.20.0/core/drivers/crypto/versal/ |
A D | ecc.c | 333 struct ecc_public_key *public_key, in shared_secret() argument 336 return keypair_ops->shared_secret(private_key, public_key, in shared_secret()
|