Home
last modified time | relevance | path

Searched refs:cleanup (Results 1 – 25 of 58) sorted by relevance

123

/optee_os/core/lib/libtomcrypt/src/pk/dsa/
H A Ddsa_generate_pqg.c114 if ((err = mp_2expt(t2L1, L-1)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
116 if ((err = mp_2expt(t2N1, N-1)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
118 if ((err = mp_2expt(t2seedlen, seedbytes*8)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
124 …rng]->read(sbuf, seedbytes, prng) != seedbytes) { err = CRYPT_ERROR_READPRNG; goto cleanup; } in s_dsa_make_params()
126 if ((err = hash_memory(hash, sbuf, seedbytes, digest, &i)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
127 if ((err = mp_read_unsigned_bin(U, digest, outbytes)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
128 if ((err = mp_mod(U, t2N1, U)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
129 if ((err = mp_add(t2N1, U, q)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
131 if ((err = mp_prime_is_prime(q, mr_tests_q, &res)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
136 if ((err = mp_read_unsigned_bin(seedinc, sbuf, seedbytes)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
H A Dltc_ecc_import_point.c24 …f ((err = mp_read_unsigned_bin(x, (unsigned char *)in+1, size)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
26 …f ((err = mp_read_unsigned_bin(y, (unsigned char *)in+1+size, size)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
31 …f ((err = mp_read_unsigned_bin(x, (unsigned char *)in+1, size)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
33 …f ((err = mp_sqr(x, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
34 …f ((err = mp_mulmod(t1, x, prime, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
36 …f ((err = mp_mulmod(a, x, prime, t2)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
37 …f ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
39 …f ((err = mp_add(t1, b, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
41 …f ((err = mp_sqrtmod_prime(t1, prime, t2)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
44 … if ((err = mp_mod(t2, prime, y)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
[all …]
H A Dltc_ecc_is_point.c27 if ((err = mp_sqr(y, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
30 if ((err = mp_sqr(x, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
31 if ((err = mp_mod(t2, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
32 if ((err = mp_mul(x, t2, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
35 if ((err = mp_sub(t1, t2, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
38 if ((err = mp_submod(prime, a, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
39 if ((err = mp_mulmod(t2, x, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
40 if ((err = mp_addmod(t1, t2, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
44 if ((err = mp_add(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
47 if ((err = mp_sub(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
[all …]
H A Dltc_ecc_is_point_at_infinity.c33 if ((err = mp_mulmod(P->y, P->y, modulus, y2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity()
36 if ((err = mp_mulmod(P->x, P->x, modulus, x3)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity()
37 if ((err = mp_mulmod(P->x, x3, modulus, x3)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity()
47 cleanup: in ltc_ecc_is_point_at_infinity()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Drsa_alt_helpers.c100 goto cleanup; in mbedtls_rsa_deduce_primes()
149 goto cleanup; in mbedtls_rsa_deduce_primes()
171 cleanup: in mbedtls_rsa_deduce_primes()
217 cleanup: in mbedtls_rsa_deduce_private_exponent()
250 cleanup: in mbedtls_rsa_deduce_crt()
284 goto cleanup; in mbedtls_rsa_validate_params()
290 goto cleanup; in mbedtls_rsa_validate_params()
306 goto cleanup; in mbedtls_rsa_validate_params()
320 goto cleanup; in mbedtls_rsa_validate_params()
332 goto cleanup; in mbedtls_rsa_validate_params()
[all …]
H A Dentropy.c136 goto cleanup; in entropy_update()
154 goto cleanup; in entropy_update()
158 goto cleanup; in entropy_update()
163 goto cleanup; in entropy_update()
167 cleanup: in entropy_update()
221 goto cleanup; in entropy_gather_internal()
240 cleanup: in entropy_gather_internal()
564 goto cleanup; in mbedtls_entropy_source_self_test()
567 goto cleanup; in mbedtls_entropy_source_self_test()
572 goto cleanup; in mbedtls_entropy_source_self_test()
[all …]
H A Dssl_ticket.c336 goto cleanup; in mbedtls_ssl_ticket_write()
346 goto cleanup; in mbedtls_ssl_ticket_write()
354 goto cleanup; in mbedtls_ssl_ticket_write()
366 goto cleanup; in mbedtls_ssl_ticket_write()
376 goto cleanup; in mbedtls_ssl_ticket_write()
382 goto cleanup; in mbedtls_ssl_ticket_write()
387 cleanup: in mbedtls_ssl_ticket_write()
451 goto cleanup; in mbedtls_ssl_ticket_parse()
458 goto cleanup; in mbedtls_ssl_ticket_parse()
466 goto cleanup; in mbedtls_ssl_ticket_parse()
[all …]
H A Decjpake.c118 cleanup: in mbedtls_ecjpake_setup()
236 cleanup: in ecjpake_hash()
276 goto cleanup; in ecjpake_zkp_read()
283 goto cleanup; in ecjpake_zkp_read()
298 goto cleanup; in ecjpake_zkp_read()
301 cleanup: in ecjpake_zkp_read()
355 goto cleanup; in ecjpake_zkp_write()
362 cleanup: in ecjpake_zkp_write()
398 goto cleanup; in ecjpake_kkp_read()
403 cleanup: in ecjpake_kkp_read()
[all …]
H A Dssl_tls13_keys.c184 goto cleanup; in mbedtls_ssl_tls13_hkdf_expand_label()
193 goto cleanup; in mbedtls_ssl_tls13_hkdf_expand_label()
202 goto cleanup; in mbedtls_ssl_tls13_hkdf_expand_label()
210 goto cleanup; in mbedtls_ssl_tls13_hkdf_expand_label()
213 cleanup: in mbedtls_ssl_tls13_hkdf_expand_label()
369 goto cleanup; in mbedtls_ssl_tls13_evolve_secret()
387 goto cleanup; in mbedtls_ssl_tls13_evolve_secret()
396 goto cleanup; in mbedtls_ssl_tls13_evolve_secret()
404 goto cleanup; in mbedtls_ssl_tls13_evolve_secret()
412 goto cleanup; in mbedtls_ssl_tls13_evolve_secret()
[all …]
H A Dnist_kw.c203 goto cleanup; in mbedtls_nist_kw_wrap()
214 goto cleanup; in mbedtls_nist_kw_wrap()
225 goto cleanup; in mbedtls_nist_kw_wrap()
241 cleanup: in mbedtls_nist_kw_wrap()
292 goto cleanup; in unwrap()
309 cleanup: in unwrap()
354 goto cleanup; in mbedtls_nist_kw_unwrap()
362 goto cleanup; in mbedtls_nist_kw_unwrap()
385 goto cleanup; in mbedtls_nist_kw_unwrap()
397 goto cleanup; in mbedtls_nist_kw_unwrap()
[all …]
H A Dbignum_mod.c103 goto cleanup; in set_mont_const_square()
107 goto cleanup; in set_mont_const_square()
119 cleanup: in set_mont_const_square()
244 cleanup: in mbedtls_mpi_mod_inv_non_mont()
327 goto cleanup; in mbedtls_mpi_mod_read()
330 goto cleanup; in mbedtls_mpi_mod_read()
335 goto cleanup; in mbedtls_mpi_mod_read()
342 cleanup: in mbedtls_mpi_mod_read()
370 goto cleanup; in mbedtls_mpi_mod_write()
377 goto cleanup; in mbedtls_mpi_mod_write()
[all …]
H A Dpsa_crypto_ffdh.c129 cleanup: in mbedtls_psa_ffdh_set_prime_generator()
175 goto cleanup; in mbedtls_psa_ffdh_export_public_key()
187 cleanup: in mbedtls_psa_ffdh_export_public_key()
214 goto cleanup; in mbedtls_psa_ffdh_generate_key()
226 cleanup: in mbedtls_psa_ffdh_generate_key()
289 goto cleanup; in mbedtls_psa_ffdh_key_agreement()
308 cleanup: in mbedtls_psa_ffdh_key_agreement()
H A Decp.c628 cleanup: in mbedtls_ecp_copy()
650 cleanup: in mbedtls_ecp_set_zero()
688 cleanup: in mbedtls_ecp_point_read_string()
759 cleanup: in mbedtls_ecp_point_write_binary()
838 cleanup: in mbedtls_ecp_point_read_binary()
1029 cleanup: in ecp_modp()
1067 cleanup: in mbedtls_mpi_mul_mod()
1090 cleanup: in mbedtls_mpi_sub_mod()
1111 cleanup: in mbedtls_mpi_add_mod()
1125 cleanup: in mbedtls_mpi_mul_int_mod()
[all …]
H A Drsa.c130 goto cleanup; in mbedtls_rsa_parse_key()
137 goto cleanup; in mbedtls_rsa_parse_key()
144 goto cleanup; in mbedtls_rsa_parse_key()
151 goto cleanup; in mbedtls_rsa_parse_key()
158 goto cleanup; in mbedtls_rsa_parse_key()
176 goto cleanup; in mbedtls_rsa_parse_key()
182 goto cleanup; in mbedtls_rsa_parse_key()
188 goto cleanup; in mbedtls_rsa_parse_key()
196 goto cleanup; in mbedtls_rsa_parse_key()
211 goto cleanup; in mbedtls_rsa_parse_key()
[all …]
H A Decdsa.c220 cleanup: in derive_mpi()
294 goto cleanup; in mbedtls_ecdsa_sign_restartable()
305 goto cleanup; in mbedtls_ecdsa_sign_restartable()
368 cleanup: in mbedtls_ecdsa_sign_restartable()
458 cleanup: in mbedtls_ecdsa_sign_det_restartable()
530 goto cleanup; in mbedtls_ecdsa_verify_restartable()
566 goto cleanup; in mbedtls_ecdsa_verify_restartable()
580 goto cleanup; in mbedtls_ecdsa_verify_restartable()
583 cleanup: in mbedtls_ecdsa_verify_restartable()
678 cleanup: in mbedtls_ecdsa_write_signature_restartable()
[all …]
H A Dpkcs5.c299 goto cleanup; in pkcs5_pbkdf2_hmac()
303 goto cleanup; in pkcs5_pbkdf2_hmac()
307 goto cleanup; in pkcs5_pbkdf2_hmac()
311 goto cleanup; in pkcs5_pbkdf2_hmac()
320 goto cleanup; in pkcs5_pbkdf2_hmac()
324 goto cleanup; in pkcs5_pbkdf2_hmac()
328 goto cleanup; in pkcs5_pbkdf2_hmac()
349 cleanup: in pkcs5_pbkdf2_hmac()
H A Dchachapoly.c114 goto cleanup; in mbedtls_chachapoly_starts()
126 goto cleanup; in mbedtls_chachapoly_starts()
138 cleanup: in mbedtls_chachapoly_starts()
258 goto cleanup; in chachapoly_crypt_and_tag()
263 goto cleanup; in chachapoly_crypt_and_tag()
268 goto cleanup; in chachapoly_crypt_and_tag()
273 cleanup: in chachapoly_crypt_and_tag()
H A Dmd.c944 goto cleanup; in mbedtls_md_file()
948 goto cleanup; in mbedtls_md_file()
953 goto cleanup; in mbedtls_md_file()
963 cleanup: in mbedtls_md_file()
984 goto cleanup; in mbedtls_md_hmac_starts()
987 goto cleanup; in mbedtls_md_hmac_starts()
990 goto cleanup; in mbedtls_md_hmac_starts()
1007 goto cleanup; in mbedtls_md_hmac_starts()
1011 goto cleanup; in mbedtls_md_hmac_starts()
1014 cleanup: in mbedtls_md_hmac_starts()
[all …]
H A Dbignum.c142 cleanup: in mbedtls_mpi_safe_cond_assign()
174 cleanup: in mbedtls_mpi_safe_cond_swap()
392 cleanup: in mbedtls_mpi_copy()
438 cleanup: in mbedtls_mpi_lset()
479 cleanup: in mbedtls_mpi_set_bit()
618 cleanup: in mbedtls_mpi_read_string()
658 cleanup: in mpi_write_hlp()
740 cleanup: in mbedtls_mpi_write_string()
832 cleanup: in mbedtls_mpi_write_file()
855 cleanup: in mbedtls_mpi_read_binary_le()
[all …]
H A Dpk_wrap.c110 goto cleanup; in rsa_verify_wrap()
117 goto cleanup; in rsa_verify_wrap()
121 cleanup: in rsa_verify_wrap()
208 goto cleanup; in mbedtls_pk_psa_rsa_sign_ext()
214 goto cleanup; in mbedtls_pk_psa_rsa_sign_ext()
219 cleanup: in mbedtls_pk_psa_rsa_sign_ext()
321 goto cleanup; in rsa_decrypt_wrap()
330 goto cleanup; in rsa_decrypt_wrap()
335 cleanup: in rsa_decrypt_wrap()
404 goto cleanup; in rsa_encrypt_wrap()
[all …]
H A Dpsa_crypto_ecp.c390 goto cleanup; in mbedtls_psa_ecdsa_sign_hash()
405 goto cleanup; in mbedtls_psa_ecdsa_sign_hash()
421 cleanup: in mbedtls_psa_ecdsa_sign_hash()
477 goto cleanup; in mbedtls_psa_ecdsa_verify_hash()
484 goto cleanup; in mbedtls_psa_ecdsa_verify_hash()
491 goto cleanup; in mbedtls_psa_ecdsa_verify_hash()
496 goto cleanup; in mbedtls_psa_ecdsa_verify_hash()
502 cleanup: in mbedtls_psa_ecdsa_verify_hash()
H A Dx509write.c141 goto cleanup; in mbedtls_x509_write_set_san_common()
147 goto cleanup; in mbedtls_x509_write_set_san_common()
169 cleanup: in mbedtls_x509_write_set_san_common()
/optee_os/core/lib/libtomcrypt/src/pk/rsa/
H A Drsa_make_key.c33 if ((err = rand_prime( p, size/2, prng, wprng)) != CRYPT_OK) { goto cleanup; } in s_rsa_make_key()
34 … if ((err = mp_sub_d( p, 1, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = p-1 */ in s_rsa_make_key()
35 …if ((err = mp_gcd( tmp1, e, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(p-1… in s_rsa_make_key()
40 if ((err = rand_prime( q, size/2, prng, wprng)) != CRYPT_OK) { goto cleanup; } in s_rsa_make_key()
41 … if ((err = mp_sub_d( q, 1, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = q-1 */ in s_rsa_make_key()
42 …if ((err = mp_gcd( tmp1, e, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(q-1, e)… in s_rsa_make_key()
46 …if ((err = mp_sub_d( p, 1, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = p-1 … in s_rsa_make_key()
48 …if ((err = mp_lcm( tmp1, tmp2, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = lcm(… in s_rsa_make_key()
75 goto cleanup; in s_rsa_make_key()
78 cleanup: in s_rsa_make_key()
/optee_os/core/drivers/
H A Dzynqmp_huk.c127 goto cleanup; in tee_otp_get_hw_unique_key()
141 goto cleanup; in tee_otp_get_hw_unique_key()
156 goto cleanup; in tee_otp_get_hw_unique_key()
172 goto cleanup; in tee_otp_get_hw_unique_key()
183 goto cleanup; in tee_otp_get_hw_unique_key()
191 goto cleanup; in tee_otp_get_hw_unique_key()
202 goto cleanup; in tee_otp_get_hw_unique_key()
208 goto cleanup; in tee_otp_get_hw_unique_key()
224 cleanup: in tee_otp_get_hw_unique_key()
/optee_os/core/lib/libtomcrypt/src/math/
H A Drand_bn.c30 goto cleanup; in rand_bn_bits()
35 if ((res = mp_read_unsigned_bin(N, buf, bytes)) != CRYPT_OK) goto cleanup; in rand_bn_bits()
39 cleanup: in rand_bn_bits()

123