Home
last modified time | relevance | path

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

12

/optee_os/core/lib/libtomcrypt/src/pk/dsa/
A Ddsa_generate_pqg.c121 if ((err = mp_2expt(t2L1, L-1)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
123 if ((err = mp_2expt(t2N1, N-1)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
125 if ((err = mp_2expt(t2seedlen, seedbytes*8)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
133 if ((err = hash_memory(hash, sbuf, seedbytes, digest, &i)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
134 if ((err = mp_read_unsigned_bin(U, digest, outbytes)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
135 if ((err = mp_mod(U, t2N1, U)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
136 if ((err = mp_add(t2N1, U, q)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
138 if ((err = mp_prime_is_prime(q, mr_tests_q, &res)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
196 cleanup: in _dsa_make_params()
229 goto cleanup; in dsa_generate_pqg()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_import_point.c31 …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_read_unsigned_bin(y, (unsigned char *)in+1+size, size)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
38 …f ((err = mp_read_unsigned_bin(x, (unsigned char *)in+1, size)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
40 …f ((err = mp_sqr(x, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
41 …f ((err = mp_mulmod(t1, x, prime, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
43 …f ((err = mp_mulmod(a, x, prime, t2)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
44 …f ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
46 …f ((err = mp_add(t1, b, t1)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
48 …f ((err = mp_sqrtmod_prime(t1, prime, t2)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
59 goto cleanup; in ltc_ecc_import_point()
[all …]
A Dltc_ecc_is_point.c34 if ((err = mp_sqr(y, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
37 if ((err = mp_sqr(x, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
38 if ((err = mp_mod(t2, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
39 if ((err = mp_mul(x, t2, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
42 if ((err = mp_sub(t1, t2, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
45 if ((err = mp_submod(prime, a, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
46 if ((err = mp_mulmod(t2, x, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
47 if ((err = mp_addmod(t1, t2, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
51 if ((err = mp_add(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
54 if ((err = mp_sub(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
[all …]
A Dltc_ecc_is_point_at_infinity.c40 if ((err = mp_mulmod(P->y, P->y, modulus, y2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity()
43 if ((err = mp_mulmod(P->x, P->x, modulus, x3)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity()
44 if ((err = mp_mulmod(P->x, x3, modulus, x3)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity()
54 cleanup: in ltc_ecc_is_point_at_infinity()
A Decc_make_key.c72 goto cleanup; in ecc_generate_key()
76 cleanup: in ecc_generate_key()
/optee_os/lib/libmbedtls/mbedtls/library/
A Drsa_internal.c114 goto cleanup; in mbedtls_rsa_deduce_primes()
186 cleanup: in mbedtls_rsa_deduce_primes()
232 cleanup: in mbedtls_rsa_deduce_private_exponent()
259 goto cleanup; in mbedtls_rsa_validate_crt()
269 goto cleanup; in mbedtls_rsa_validate_crt()
279 goto cleanup; in mbedtls_rsa_validate_crt()
312 cleanup: in mbedtls_rsa_validate_crt()
357 goto cleanup; in mbedtls_rsa_validate_params()
364 goto cleanup; in mbedtls_rsa_validate_params()
438 cleanup: in mbedtls_rsa_validate_params()
[all …]
A Dentropy.c213 goto cleanup; in entropy_update()
217 goto cleanup; in entropy_update()
222 goto cleanup; in entropy_update()
226 goto cleanup; in entropy_update()
230 cleanup: in entropy_update()
300 cleanup: in entropy_gather_internal()
625 goto cleanup; in mbedtls_entropy_source_self_test()
627 goto cleanup; in mbedtls_entropy_source_self_test()
631 goto cleanup; in mbedtls_entropy_source_self_test()
639 cleanup: in mbedtls_entropy_source_self_test()
[all …]
A Dssl_ticket.c229 goto cleanup; in mbedtls_ssl_ticket_write()
238 goto cleanup; in mbedtls_ssl_ticket_write()
260 goto cleanup; in mbedtls_ssl_ticket_write()
265 goto cleanup; in mbedtls_ssl_ticket_write()
270 cleanup: in mbedtls_ssl_ticket_write()
324 goto cleanup; in mbedtls_ssl_ticket_parse()
331 goto cleanup; in mbedtls_ssl_ticket_parse()
340 goto cleanup; in mbedtls_ssl_ticket_parse()
355 goto cleanup; in mbedtls_ssl_ticket_parse()
360 goto cleanup; in mbedtls_ssl_ticket_parse()
[all …]
A Dpkcs11.c56 goto cleanup; in mbedtls_pkcs11_x509_cert_bind()
63 goto cleanup; in mbedtls_pkcs11_x509_cert_bind()
70 goto cleanup; in mbedtls_pkcs11_x509_cert_bind()
77 goto cleanup; in mbedtls_pkcs11_x509_cert_bind()
83 goto cleanup; in mbedtls_pkcs11_x509_cert_bind()
88 cleanup: in mbedtls_pkcs11_x509_cert_bind()
105 goto cleanup; in mbedtls_pkcs11_priv_key_bind()
108 goto cleanup; in mbedtls_pkcs11_priv_key_bind()
115 cleanup: in mbedtls_pkcs11_priv_key_bind()
A Decjpake.c124 cleanup: in mbedtls_ecjpake_setup()
231 cleanup: in ecjpake_hash()
298 cleanup: in ecjpake_zkp_read()
359 cleanup: in ecjpake_zkp_write()
400 cleanup: in ecjpake_kkp_read()
437 cleanup: in ecjpake_kkp_write()
470 cleanup: in ecjpake_kkpp_read()
504 cleanup: in ecjpake_kkpp_write()
560 cleanup: in ecjpake_ecp_add3()
620 cleanup: in mbedtls_ecjpake_read_round_two()
[all …]
A Dnist_kw.c263 goto cleanup; in mbedtls_nist_kw_wrap()
276 goto cleanup; in mbedtls_nist_kw_wrap()
288 goto cleanup; in mbedtls_nist_kw_wrap()
302 cleanup: in mbedtls_nist_kw_wrap()
356 goto cleanup; in unwrap()
371 cleanup: in unwrap()
418 goto cleanup; in mbedtls_nist_kw_unwrap()
426 goto cleanup; in mbedtls_nist_kw_unwrap()
507 goto cleanup; in mbedtls_nist_kw_unwrap()
515 goto cleanup; in mbedtls_nist_kw_unwrap()
[all …]
A Dmd.c679 goto cleanup; in mbedtls_md_file()
682 goto cleanup; in mbedtls_md_file()
693 cleanup: in mbedtls_md_file()
738 goto cleanup; in mbedtls_md_hmac_starts()
741 goto cleanup; in mbedtls_md_hmac_starts()
743 cleanup: in mbedtls_md_hmac_starts()
810 goto cleanup; in mbedtls_md_hmac()
813 goto cleanup; in mbedtls_md_hmac()
815 goto cleanup; in mbedtls_md_hmac()
817 goto cleanup; in mbedtls_md_hmac()
[all …]
A Dpkcs5.c249 goto cleanup; in mbedtls_pkcs5_pbkdf2_hmac()
252 goto cleanup; in mbedtls_pkcs5_pbkdf2_hmac()
255 goto cleanup; in mbedtls_pkcs5_pbkdf2_hmac()
258 goto cleanup; in mbedtls_pkcs5_pbkdf2_hmac()
267 goto cleanup; in mbedtls_pkcs5_pbkdf2_hmac()
270 goto cleanup; in mbedtls_pkcs5_pbkdf2_hmac()
273 goto cleanup; in mbedtls_pkcs5_pbkdf2_hmac()
292 cleanup: in mbedtls_pkcs5_pbkdf2_hmac()
A Decp.c192 cleanup: in ecp_drbg_seed()
255 cleanup: in ecp_drbg_seed()
791 cleanup: in mbedtls_ecp_copy()
818 cleanup: in mbedtls_ecp_set_zero()
866 cleanup: in mbedtls_ecp_point_read_string()
941 cleanup: in mbedtls_ecp_point_write_binary()
1003 cleanup: in mbedtls_ecp_point_read_binary()
1203 cleanup: in ecp_modp()
1241 cleanup: in mbedtls_mpi_mul_mod()
1268 cleanup: in mbedtls_mpi_sub_mod()
[all …]
A Decdsa.c242 cleanup: in derive_mpi()
377 cleanup: in ecdsa_sign_restartable()
543 cleanup: in ecdsa_sign_det_restartable()
639 goto cleanup; in ecdsa_verify_restartable()
675 goto cleanup; in ecdsa_verify_restartable()
690 goto cleanup; in ecdsa_verify_restartable()
693 cleanup: in ecdsa_verify_restartable()
789 cleanup: in mbedtls_ecdsa_write_signature_restartable()
868 goto cleanup; in mbedtls_ecdsa_read_signature_restartable()
875 goto cleanup; in mbedtls_ecdsa_read_signature_restartable()
[all …]
A Drsa.c142 cleanup: in mbedtls_rsa_import_raw()
390 cleanup: in mbedtls_rsa_export_raw()
629 cleanup: in mbedtls_rsa_gen_key()
764 cleanup: in mbedtls_rsa_public()
837 cleanup: in rsa_prepare_blinding()
1059 cleanup: in mbedtls_rsa_private()
1493 cleanup: in mbedtls_rsa_rsaes_oaep_decrypt()
1758 cleanup: in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
2183 cleanup: in mbedtls_rsa_rsassa_pkcs1_v15_sign()
2480 cleanup: in mbedtls_rsa_rsassa_pkcs1_v15_verify()
[all …]
A Dbignum.c299 cleanup: in mbedtls_mpi_copy()
417 cleanup: in mbedtls_mpi_safe_cond_assign()
470 cleanup: in mbedtls_mpi_safe_cond_swap()
488 cleanup: in mbedtls_mpi_lset()
534 cleanup: in mbedtls_mpi_set_bit()
680 cleanup: in mbedtls_mpi_read_string()
721 cleanup: in mpi_write_hlp()
806 cleanup: in mbedtls_mpi_write_string()
890 cleanup: in mbedtls_mpi_write_file()
1003 cleanup: in mbedtls_mpi_read_binary_le()
[all …]
A Dchachapoly.c141 goto cleanup; in mbedtls_chachapoly_starts()
152 goto cleanup; in mbedtls_chachapoly_starts()
164 cleanup: in mbedtls_chachapoly_starts()
306 goto cleanup; in chachapoly_crypt_and_tag()
310 goto cleanup; in chachapoly_crypt_and_tag()
314 goto cleanup; in chachapoly_crypt_and_tag()
318 cleanup: in chachapoly_crypt_and_tag()
A Ddhm.c116 cleanup: in dhm_check_range()
163 cleanup: in dhm_random_below()
201 cleanup: in dhm_make_common()
223 goto cleanup; in mbedtls_dhm_make_params()
252 cleanup: in mbedtls_dhm_make_params()
319 goto cleanup; in mbedtls_dhm_make_public()
323 cleanup: in mbedtls_dhm_make_public()
391 cleanup: in dhm_update_blinding()
445 cleanup: in mbedtls_dhm_calc_secret()
A Dpkparse.c414 cleanup: in pk_group_id_from_group()
437 goto cleanup; in pk_group_id_from_specified()
441 cleanup: in pk_group_id_from_specified()
756 goto cleanup; in pk_parse_key_pkcs1_der()
762 goto cleanup; in pk_parse_key_pkcs1_der()
768 goto cleanup; in pk_parse_key_pkcs1_der()
797 goto cleanup; in pk_parse_key_pkcs1_der()
802 goto cleanup; in pk_parse_key_pkcs1_der()
807 goto cleanup; in pk_parse_key_pkcs1_der()
814 goto cleanup; in pk_parse_key_pkcs1_der()
[all …]
A Dssl_tls13_keys.c317 goto cleanup; in mbedtls_ssl_tls1_3_evolve_secret()
338 goto cleanup; in mbedtls_ssl_tls1_3_evolve_secret()
342 cleanup: in mbedtls_ssl_tls1_3_evolve_secret()
A Dpk_wrap.c353 cleanup: in eckey_verify_rs_wrap()
378 cleanup: in eckey_sign_rs_wrap()
583 goto cleanup; in ecdsa_verify_wrap()
591 goto cleanup; in ecdsa_verify_wrap()
598 goto cleanup; in ecdsa_verify_wrap()
607 goto cleanup; in ecdsa_verify_wrap()
613 goto cleanup; in ecdsa_verify_wrap()
617 cleanup: in ecdsa_verify_wrap()
A Decp_curves.c728 cleanup: in ecp_use_curve25519()
782 cleanup: in ecp_use_curve448()
962 cleanup: in ecp_mod_p192()
1115 cleanup: in ecp_mod_p224()
1152 cleanup: in ecp_mod_p256()
1201 cleanup: in ecp_mod_p384()
1264 cleanup: in ecp_mod_p521()
1313 cleanup: in ecp_mod_p255()
1384 cleanup: in ecp_mod_p448()
1463 cleanup: in ecp_mod_koblitz()
/optee_os/core/lib/libtomcrypt/src/pk/rsa/
A Drsa_make_key.c40 if ((err = rand_prime( p, size/2, prng, wprng)) != CRYPT_OK) { goto cleanup; } in s_rsa_make_key()
41 … if ((err = mp_sub_d( p, 1, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = p-1 */ in s_rsa_make_key()
42 …if ((err = mp_gcd( tmp1, e, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(p-1… in s_rsa_make_key()
47 if ((err = rand_prime( q, size/2, prng, wprng)) != CRYPT_OK) { goto cleanup; } in s_rsa_make_key()
48 … if ((err = mp_sub_d( q, 1, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = q-1 */ in s_rsa_make_key()
49 …if ((err = mp_gcd( tmp1, e, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(q-1, e)… in s_rsa_make_key()
53 …if ((err = mp_sub_d( p, 1, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = p-1 … in s_rsa_make_key()
55 …if ((err = mp_lcm( tmp1, tmp2, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = lcm(… in s_rsa_make_key()
82 goto cleanup; in s_rsa_make_key()
85 cleanup: in s_rsa_make_key()
/optee_os/core/lib/libtomcrypt/src/math/
A Drand_bn.c37 goto cleanup; in rand_bn_bits()
42 if ((res = mp_read_unsigned_bin(N, buf, bytes)) != CRYPT_OK) goto cleanup; in rand_bn_bits()
46 cleanup: in rand_bn_bits()

Completed in 49 milliseconds

12