Home
last modified time | relevance | path

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

12

/optee_os/core/lib/libtomcrypt/src/pk/ed25519/
H A Ded25519_verify.c16 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/core/lib/libtomcrypt/src/pk/dh/
H A Ddh_shared_secret.c16 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/core/lib/libtomcrypt/
H A Ded25519.c159 curve25519_key public_key = { in crypto_acipher_ed25519_verify() local
167 memcpy(public_key.pub, key->pub, sizeof(public_key.pub)); in crypto_acipher_ed25519_verify()
170 &public_key) != CRYPT_OK) in crypto_acipher_ed25519_verify()
186 curve25519_key public_key = { in crypto_acipher_ed25519ctx_verify() local
194 memcpy(public_key.pub, key->pub, sizeof(public_key.pub)); in crypto_acipher_ed25519ctx_verify()
198 &stat, &public_key) != CRYPT_OK) in crypto_acipher_ed25519ctx_verify()
202 &stat, &public_key) != CRYPT_OK) in crypto_acipher_ed25519ctx_verify()
H 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()
H A Dx25519.c70 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()
H 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/x25519/
H A Dx25519_shared_secret.c21 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/core/lib/libtomcrypt/src/pk/dsa/
H A Ddsa_shared_secret.c22 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/core/lib/libtomcrypt/src/pk/ecc/
H A Decc_shared_secret.c21 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/scripts/
H 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
H A Dpem_to_pub_c.py36 key = key.public_key()
/optee_os/core/drivers/crypto/crypto_api/acipher/
H 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()
81 sdata.key_pub = public_key; in crypto_acipher_dh_shared_secret()
H A Decc.c292 struct ecc_public_key *public_key, in ecc_shared_secret() argument
301 if (!private_key || !public_key || !secret_len) { in ecc_shared_secret()
306 if (private_key->curve != public_key->curve) { in ecc_shared_secret()
308 private_key->curve, public_key->curve); in ecc_shared_secret()
312 size_bytes = get_ecc_key_size_bytes(public_key->curve); in ecc_shared_secret()
332 sdata.key_pub = public_key; in ecc_shared_secret()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/x509/
H A Dx509_encode_subject_public_key_info.c35 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()
H A Dx509_decode_subject_public_key_info.c35 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/core/drivers/crypto/stm32/
H A Decc.c387 struct ecc_public_key *public_key, in shared_secret() argument
397 if (!private_key || !public_key || !secret || !secret_len) in shared_secret()
400 if (private_key->curve != public_key->curve || in shared_secret()
401 curve_to_pka_cid(public_key->curve, &cid)) in shared_secret()
409 pk.x.size = crypto_bignum_num_bytes(public_key->x); in shared_secret()
414 crypto_bignum_bn2bin(public_key->x, pk.x.val); in shared_secret()
416 pk.y.size = crypto_bignum_num_bytes(public_key->y); in shared_secret()
423 crypto_bignum_bn2bin(public_key->y, pk.y.val); in shared_secret()
/optee_os/core/drivers/crypto/se050/core/
H A Decc.c379 struct ecc_public_key *public_key, in shared_secret_fallback() argument
395 return ops->shared_secret(private_key, public_key, in shared_secret_fallback()
425 struct ecc_public_key *public_key, in shared_secret() argument
436 if (private_key->curve != public_key->curve) in shared_secret()
444 return shared_secret_fallback(private_key, public_key, in shared_secret()
461 ret = set_binary_data(public_key->x, key_bytes, &key.x, &key.x_len); in shared_secret()
467 ret = set_binary_data(public_key->y, key_bytes, &key.y, &key.y_len); in shared_secret()
/optee_os/lib/libmbedtls/core/
H A Ddh.c98 struct bignum *public_key, in crypto_acipher_dh_shared_secret() argument
115 dhm.GY = *(mbedtls_mpi *)public_key; in crypto_acipher_dh_shared_secret()
H A Decc.c313 struct ecc_public_key *public_key, in ecc_shared_secret() argument
335 ecdh.ctx.mbed_ecdh.Qp.X = *(mbedtls_mpi *)public_key->x; in ecc_shared_secret()
336 ecdh.ctx.mbed_ecdh.Qp.Y = *(mbedtls_mpi *)public_key->y; in ecc_shared_secret()
/optee_os/core/lib/libtomcrypt/src/headers/
H A Dtomcrypt_pk.h151 int dh_shared_secret(const dh_key *private_key, const dh_key *public_key,
286 int ecc_shared_secret(const ecc_key *private_key, const ecc_key *public_key,
374 const curve25519_key *public_key);
379 const curve25519_key *public_key);
384 const curve25519_key *public_key);
401 const curve25519_key *public_key,
484 const dsa_key *public_key,
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dlmots.c422 memcpy(ctx->public_key, in mbedtls_lmots_import_public_key()
453 memcpy(key + PUBLIC_KEY_KEY_HASH_OFFSET, ctx->public_key, in mbedtls_lmots_export_public_key()
549 if (memcmp(&Kc_public_key_candidate, ctx->public_key, in mbedtls_lmots_verify()
550 sizeof(ctx->public_key))) { in mbedtls_lmots_verify()
681 ctx->public_key); in mbedtls_lmots_calculate_public_key()
/optee_os/core/include/crypto/
H A Dcrypto.h253 struct bignum *public_key,
296 struct ecc_public_key *public_key,
307 void *public_key, void *secret,
311 void *public_key, void *secret,
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Dlms.h123 unsigned char MBEDTLS_PRIVATE(public_key)[MBEDTLS_LMOTS_N_HASH_LEN_MAX];
/optee_os/core/crypto/
H A Dcrypto.c703 struct bignum *public_key __unused, in crypto_acipher_dh_shared_secret()
786 struct ecc_public_key *public_key, in crypto_acipher_ecc_shared_secret() argument
795 return private_key->ops->shared_secret(private_key, public_key, secret, in crypto_acipher_ecc_shared_secret()
854 void *public_key __unused, in crypto_acipher_x25519_shared_secret()
879 void *public_key __unused, in crypto_acipher_x448_shared_secret()
/optee_os/core/drivers/crypto/versal/
H A Decc.c324 struct ecc_public_key *public_key, in shared_secret() argument
327 return pair_ops->shared_secret(private_key, public_key, in shared_secret()

12