Home
last modified time | relevance | path

Searched refs:pbytes (Results 1 – 5 of 5) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/pk/ecc/
H A Decc_sign_hash.c35 unsigned long pbits, pbytes, i, shift_right; in ecc_sign_hash_ex() local
56 pbytes = (pbits+7) >> 3; in ecc_sign_hash_ex()
61 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, pbytes)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
65 for (i=0, ch=0; i<pbytes; i++) { in ecc_sign_hash_ex()
70 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
127 if (*outlen < 2*pbytes) { err = CRYPT_MEM; goto errnokey; } in ecc_sign_hash_ex()
128 zeromem(out, 2*pbytes); in ecc_sign_hash_ex()
130 if ((err = mp_to_unsigned_bin(r, out + (pbytes - i))) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
132 if ((err = mp_to_unsigned_bin(s, out + (2*pbytes - i))) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
133 *outlen = 2*pbytes; in ecc_sign_hash_ex()
H A Decc_verify_hash.c33 unsigned long pbits, pbytes, i, shift_right; in ecc_verify_hash_ex() local
131 pbytes = (pbits+7) >> 3; in ecc_verify_hash_ex()
136 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, pbytes)) != CRYPT_OK) … in ecc_verify_hash_ex()
140 for (i=0, ch=0; i<pbytes; i++) { in ecc_verify_hash_ex()
145 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) … in ecc_verify_hash_ex()
H A Decc_recover_key.c36 unsigned long pbits, pbytes, i, shift_right; in ecc_recover_key() local
151 pbytes = (pbits+7) >> 3; in ecc_recover_key()
156 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, pbytes)) != CRYPT_OK) … in ecc_recover_key()
160 for (i=0, ch=0; i<pbytes; i++) { in ecc_recover_key()
165 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) … in ecc_recover_key()
/optee_os/core/drivers/crypto/hisilicon/
H A Dhpre_dh.c215 msg->out_bytes = msg->pbytes; in hpre_dh_params_bn2bin()
224 if (msg->gbytes != msg->pbytes) in hpre_dh_params_bn2bin()
235 ret = hpre_bin_from_crypto_bin(p, p, msg->key_bytes, msg->pbytes); in hpre_dh_params_bn2bin()
256 msg->key_bytes = round_key_size_to_hw_size(msg->pbytes); in hpre_dh_request_init()
296 msg.pbytes = BITS_TO_BYTES(p_bits); in hpre_dh_gen_keypair()
347 msg.pbytes = crypto_bignum_num_bytes(key->p); in hpre_dh_do_shared_secret()
H A Dhpre_dh.h26 uint32_t pbytes; member