Lines Matching refs:s

16 TEE_Result crypto_acipher_alloc_dsa_keypair(struct dsa_keypair *s,  in crypto_acipher_alloc_dsa_keypair()  argument
19 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_dsa_keypair()
20 if (!bn_alloc_max(&s->g)) in crypto_acipher_alloc_dsa_keypair()
23 if (!bn_alloc_max(&s->p)) in crypto_acipher_alloc_dsa_keypair()
25 if (!bn_alloc_max(&s->q)) in crypto_acipher_alloc_dsa_keypair()
27 if (!bn_alloc_max(&s->y)) in crypto_acipher_alloc_dsa_keypair()
29 if (!bn_alloc_max(&s->x)) in crypto_acipher_alloc_dsa_keypair()
33 crypto_bignum_free(s->g); in crypto_acipher_alloc_dsa_keypair()
34 crypto_bignum_free(s->p); in crypto_acipher_alloc_dsa_keypair()
35 crypto_bignum_free(s->q); in crypto_acipher_alloc_dsa_keypair()
36 crypto_bignum_free(s->y); in crypto_acipher_alloc_dsa_keypair()
40 TEE_Result crypto_acipher_alloc_dsa_public_key(struct dsa_public_key *s, in crypto_acipher_alloc_dsa_public_key() argument
43 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_dsa_public_key()
44 if (!bn_alloc_max(&s->g)) in crypto_acipher_alloc_dsa_public_key()
47 if (!bn_alloc_max(&s->p)) in crypto_acipher_alloc_dsa_public_key()
49 if (!bn_alloc_max(&s->q)) in crypto_acipher_alloc_dsa_public_key()
51 if (!bn_alloc_max(&s->y)) in crypto_acipher_alloc_dsa_public_key()
55 crypto_bignum_free(s->g); in crypto_acipher_alloc_dsa_public_key()
56 crypto_bignum_free(s->p); in crypto_acipher_alloc_dsa_public_key()
57 crypto_bignum_free(s->q); in crypto_acipher_alloc_dsa_public_key()
102 void *r, *s; in crypto_acipher_dsa_sign() local
137 ltc_res = mp_init_multi(&r, &s, NULL); in crypto_acipher_dsa_sign()
143 ltc_res = dsa_sign_hash_raw(msg, msg_len, r, s, NULL, in crypto_acipher_dsa_sign()
151 mp_to_unsigned_bin(s, (uint8_t *)sig + *sig_len - in crypto_acipher_dsa_sign()
152 mp_unsigned_bin_size(s)); in crypto_acipher_dsa_sign()
158 mp_clear_multi(r, s, NULL); in crypto_acipher_dsa_sign()
170 void *r, *s; in crypto_acipher_dsa_verify() local
187 ltc_res = mp_init_multi(&r, &s, NULL); in crypto_acipher_dsa_verify()
193 mp_read_unsigned_bin(s, (uint8_t *)sig + sig_len/2, sig_len/2); in crypto_acipher_dsa_verify()
194 ltc_res = dsa_verify_hash_raw(r, s, msg, msg_len, &ltc_stat, &ltc_key); in crypto_acipher_dsa_verify()
195 mp_clear_multi(r, s, NULL); in crypto_acipher_dsa_verify()