Home
last modified time | relevance | path

Searched full:pub (Results 1 – 25 of 36) sorted by relevance

12

/optee_os/core/lib/libtomcrypt/
H A Ded25519.c28 key->pub = calloc(1, key_size >> 3); in crypto_acipher_alloc_ed25519_keypair()
30 if (!key->priv || !key->pub) { in crypto_acipher_alloc_ed25519_keypair()
32 free(key->pub); in crypto_acipher_alloc_ed25519_keypair()
48 key->pub = calloc(1, key_size >> 3); in crypto_acipher_alloc_ed25519_public_key()
50 if (!key->pub) in crypto_acipher_alloc_ed25519_public_key()
68 assert(key_size >= sizeof(ltc_tmp_key.pub) && in crypto_acipher_gen_ed25519_key()
71 memcpy(key->pub, ltc_tmp_key.pub, sizeof(ltc_tmp_key.pub)); in crypto_acipher_gen_ed25519_key()
100 memcpy(private_key.pub, key->pub, sizeof(private_key.pub)); in crypto_acipher_ed25519_sign()
136 memcpy(private_key.pub, key->pub, sizeof(private_key.pub)); in crypto_acipher_ed25519ctx_sign()
167 memcpy(public_key.pub, key->pub, sizeof(public_key.pub)); in crypto_acipher_ed25519_verify()
[all …]
H A Dx25519.c33 key->pub = calloc(1, key_size_bytes); in crypto_acipher_alloc_x25519_keypair()
35 if (!key->priv || !key->pub) { in crypto_acipher_alloc_x25519_keypair()
37 free(key->pub); in crypto_acipher_alloc_x25519_keypair()
57 if (key_size_bytes < sizeof(ltc_tmp_key.pub) || in crypto_acipher_gen_x25519_key()
61 memcpy(key->pub, ltc_tmp_key.pub, sizeof(ltc_tmp_key.pub)); in crypto_acipher_gen_x25519_key()
86 static_assert(sizeof(ltc_public_key.pub) == X25519_KEY_SIZE_BYTES && in crypto_acipher_x25519_shared_secret()
89 memcpy(ltc_public_key.pub, public_key, X25519_KEY_SIZE_BYTES); in crypto_acipher_x25519_shared_secret()
104 !consttime_memcmp(secret, ltc_private_key.pub, in crypto_acipher_x25519_shared_secret()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dpk_ecc.c121 unsigned char pub[MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH]; in mbedtls_pk_ecc_set_pubkey_from_prv()
123 status = psa_export_public_key(key_id, pub, sizeof(pub), &pub_len); in mbedtls_pk_ecc_set_pubkey_from_prv()
132 return mbedtls_ecp_point_read_binary(&eck->grp, &eck->Q, pub, pub_len); in mbedtls_pk_ecc_set_pubkey_from_prv()
157 * [in] pub, pub_len: the public key as an ECPoint,
167 const unsigned char *pub, in pk_ecc_set_pubkey_psa_ecp_fallback() argument
172 (void) pub; in pk_ecc_set_pubkey_psa_ecp_fallback()
188 pub, pub_len); in pk_ecc_set_pubkey_psa_ecp_fallback()
204 int mbedtls_pk_ecc_set_pubkey(mbedtls_pk_context *pk, const unsigned char *pub, size_t pub_len) in mbedtls_pk_ecc_set_pubkey() argument
209 if (!PSA_ECC_FAMILY_IS_WEIERSTRASS(pk->ec_family) || *pub == 0x04) { in mbedtls_pk_ecc_set_pubkey()
216 memcpy(pk->pub_raw, pub, pub_len); in mbedtls_pk_ecc_set_pubkey()
[all …]
H A Dpk_wrap.c444 static int rsa_check_pair_wrap(mbedtls_pk_context *pub, mbedtls_pk_context *prv, in rsa_check_pair_wrap() argument
450 return mbedtls_rsa_check_pub_priv((const mbedtls_rsa_context *) pub->pk_ctx, in rsa_check_pair_wrap()
932 static int eckey_check_pair_psa(mbedtls_pk_context *pub, mbedtls_pk_context *prv) in eckey_check_pair_psa() argument
947 if (memcmp(prv_key_buf, pub->pub_raw, pub->pub_raw_len) != 0) { in eckey_check_pair_psa()
954 static int eckey_check_pair_psa(mbedtls_pk_context *pub, mbedtls_pk_context *prv) in eckey_check_pair_psa() argument
1002 ret = mbedtls_ecp_point_write_binary(&mbedtls_pk_ec_rw(*pub)->grp, in eckey_check_pair_psa()
1003 &mbedtls_pk_ec_rw(*pub)->Q, in eckey_check_pair_psa()
1019 static int eckey_check_pair_wrap(mbedtls_pk_context *pub, mbedtls_pk_context *prv, in eckey_check_pair_wrap() argument
1025 return eckey_check_pair_psa(pub, prv); in eckey_check_pair_wrap()
1028 static int eckey_check_pair_wrap(mbedtls_pk_context *pub, mbedtls_pk_context *prv, in eckey_check_pair_wrap() argument
[all …]
H A Dpk_internal.h154 * [in] pub, pub_len: the raw public key (an ECPoint).
162 int mbedtls_pk_ecc_set_pubkey(mbedtls_pk_context *pk, const unsigned char *pub, size_t pub_len);
H A Dpk_wrap.h75 int (*check_pair_func)(mbedtls_pk_context *pub, mbedtls_pk_context *prv,
H A Dpk.c1414 int mbedtls_pk_check_pair(const mbedtls_pk_context *pub, in mbedtls_pk_check_pair() argument
1419 if (pub->pk_info == NULL || in mbedtls_pk_check_pair()
1433 if (pub->pk_info->type != MBEDTLS_PK_RSA) { in mbedtls_pk_check_pair()
1438 (pub->pk_info != prv->pk_info)) { in mbedtls_pk_check_pair()
1443 return prv->pk_info->check_pair_func((mbedtls_pk_context *) pub, in mbedtls_pk_check_pair()
/optee_os/core/lib/libtomcrypt/src/pk/ec25519/
H A Dec25519_export.c75 …err = x509_encode_subject_public_key_info(out, outlen, key->algo, key->pub, 32uL, LTC_ASN1_EOL, NU… in ec25519_export()
77 if (*outlen < sizeof(key->pub)) { in ec25519_export()
80 XMEMCPY(out, key->pub, sizeof(key->pub)); in ec25519_export()
83 *outlen = sizeof(key->pub); in ec25519_export()
H A Dec25519_import_pkcs8.c70 fp(key->pub, key->priv); in ec25519_import_pkcs8()
/optee_os/core/lib/libtomcrypt/src/pk/ed25519/
H A Ded25519_import_raw.c29 tweetnacl_crypto_sk_to_pk(key->pub, key->priv); in ed25519_import_raw()
31 XMEMCPY(key->pub, in, sizeof(key->pub)); in ed25519_import_raw()
H A Ded25519_import_x509.c14 if (inlen != sizeof(key->pub)) return CRYPT_PK_INVALID_SIZE; in s_ed25519_decode()
15 XMEMCPY(key->pub, in, sizeof(key->pub)); in s_ed25519_decode()
H A Ded25519_import.c27 key_len = sizeof(key->pub); in ed25519_import()
28 …if ((err = x509_decode_subject_public_key_info(in, inlen, LTC_OID_ED25519, key->pub, &key_len, LTC… in ed25519_import()
H A Ded25519_make_key.c25 if ((err = tweetnacl_crypto_sign_keypair(prng, wprng, key->pub, key->priv)) != CRYPT_OK) { in ed25519_make_key()
H A Ded25519_sign.c40 private_key->priv, private_key->pub, in s_ed25519_sign()
H A Ded25519_verify.c45 public_key->pub); in s_ed25519_verify()
/optee_os/core/lib/libtomcrypt/src/pk/x25519/
H A Dx25519_import_raw.c29 tweetnacl_crypto_scalarmult_base(key->pub, key->priv); in x25519_import_raw()
31 XMEMCPY(key->pub, in, sizeof(key->pub)); in x25519_import_raw()
H A Dx25519_import_x509.c14 if (inlen != sizeof(key->pub)) return CRYPT_PK_INVALID_SIZE; in s_x25519_decode()
15 XMEMCPY(key->pub, in, sizeof(key->pub)); in s_x25519_decode()
H A Dx25519_import.c27 key_len = sizeof(key->pub); in x25519_import()
28 …if ((err = x509_decode_subject_public_key_info(in, inlen, LTC_OID_X25519, key->pub, &key_len, LTC_… in x25519_import()
H A Dx25519_make_key.c33 tweetnacl_crypto_scalarmult_base(key->pub, key->priv); in x25519_make_key()
H A Dx25519_shared_secret.c36 tweetnacl_crypto_scalarmult(out, private_key->priv, public_key->pub); in x25519_shared_secret()
/optee_os/core/drivers/crypto/se050/adaptors/include/
H A Dse050_apdu_apis.h66 struct se050_ecc_keypub pub; member
74 struct se050_ecc_keypub *pub);
81 struct se050_ecc_keypub *pub,
/optee_os/core/drivers/crypto/se050/core/
H A Decc.c341 &key_bin.pub.x, &key_bin.pub.x_len); in se050_inject_keypair()
348 &key_bin.pub.y, &key_bin.pub.y_len); in se050_inject_keypair()
351 free(key_bin.pub.x); in se050_inject_keypair()
355 key_bin.pub.curve = curve_tee2se050(key->curve); in se050_inject_keypair()
359 free(key_bin.pub.x); in se050_inject_keypair()
360 free(key_bin.pub.y); in se050_inject_keypair()
/optee_os/core/drivers/crypto/se050/adaptors/apis/
H A Dapdu.c611 k_object->curve_id = keypair->pub.curve; in set_ecc_private()
614 keypair->pub.curve, in set_ecc_private()
637 buf = alloc_pubkey_buf(&keypair->pub, &pubkey_len); in set_ecc_pair()
641 k_object->curve_id = keypair->pub.curve; in set_ecc_pair()
644 keypair->pub.curve, in set_ecc_pair()
/optee_os/core/drivers/crypto/hisilicon/
H A Dhpre_montgomery.c109 key->pub = calloc(1, key_size); in hpre_montgomery_alloc_keypair()
110 if (!key->pub) in hpre_montgomery_alloc_keypair()
397 if (!key || !key->priv || !key->pub) { in hpre_montgomery_gen_keypair()
426 memcpy(key->pub, msg.out, msg.curve_bytes); in hpre_montgomery_gen_keypair()
/optee_os/core/include/crypto/
H A Dcrypto.h173 uint8_t *pub; /* Public value */ member
178 uint8_t *pub; member
183 uint8_t *pub; member

12