Home
last modified time | relevance | path

Searched refs:err (Results 1 – 25 of 402) sorted by relevance

12345678910>>...17

/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/
A Dchacha20poly1305_test.c41 int err; in chacha20poly1305_test()
44 if ((err = chacha20poly1305_init(&st1, k, sizeof(k))) != CRYPT_OK) return err; in chacha20poly1305_test()
55 if ((err = chacha20poly1305_done(&st1, emac, &len)) != CRYPT_OK) return err; in chacha20poly1305_test()
61 if ((err = chacha20poly1305_init(&st2, k, sizeof(k))) != CRYPT_OK) return err; in chacha20poly1305_test()
67 if ((err = chacha20poly1305_done(&st2, dmac, &len)) != CRYPT_OK) return err; in chacha20poly1305_test()
87 if ((err = chacha20poly1305_init(&st1, k, sizeof(k))) != CRYPT_OK) return err; in chacha20poly1305_test()
92 if ((err = chacha20poly1305_done(&st1, emac, &len)) != CRYPT_OK) return err; in chacha20poly1305_test()
98 if ((err = chacha20poly1305_init(&st1, k, sizeof(k))) != CRYPT_OK) return err; in chacha20poly1305_test()
103 if ((err = chacha20poly1305_done(&st1, dmac, &len)) != CRYPT_OK) return err; in chacha20poly1305_test()
114 if ((err = chacha20poly1305_done(&st1, emac, &len)) != CRYPT_OK) return err; in chacha20poly1305_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_projective_add_point.c33 int err, inf; in ltc_ecc_projective_add_point() local
41 if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, NULL)) != CRYPT_OK) { in ltc_ecc_projective_add_point()
42 return err; in ltc_ecc_projective_add_point()
45 if ((err = ltc_ecc_is_point_at_infinity(P, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_projective_add_point()
48 err = ltc_ecc_copy_point(Q, R); in ltc_ecc_projective_add_point()
52 if ((err = ltc_ecc_is_point_at_infinity(Q, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_projective_add_point()
55 err = ltc_ecc_copy_point(P, R); in ltc_ecc_projective_add_point()
65 if ((err = mp_sub(modulus, Q->y, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
68 err = ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_projective_add_point()
198 err = CRYPT_OK; in ltc_ecc_projective_add_point()
[all …]
A Dltc_ecc_projective_dbl_point.c50 int err, inf; in ltc_ecc_projective_dbl_point() local
57 if ((err = mp_init_multi(&t1, &t2, NULL)) != CRYPT_OK) { in ltc_ecc_projective_dbl_point()
58 return err; in ltc_ecc_projective_dbl_point()
62 if ((err = ltc_ecc_copy_point(P, R)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
65 if ((err = ltc_ecc_is_point_at_infinity(P, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_projective_dbl_point()
68 err = ltc_ecc_set_point_xyz(1, 1, 0, R); in ltc_ecc_projective_dbl_point()
73 if ((err = mp_sqr(R->z, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
74 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
76 if ((err = mp_mul(R->z, R->y, R->z)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
184 err = CRYPT_OK; in ltc_ecc_projective_dbl_point()
[all …]
A Decc_recover_key.c42 int err; in ecc_recover_key() local
57 return err; in ecc_recover_key()
73 err = CRYPT_MEM; in ecc_recover_key()
88 err = CRYPT_INVALID_PACKET; in ecc_recover_key()
131 err = CRYPT_INVALID_ARG; in ecc_recover_key()
138 err = CRYPT_ERROR; in ecc_recover_key()
144 err = CRYPT_INVALID_ARG; in ecc_recover_key()
151 err = CRYPT_INVALID_PACKET; in ecc_recover_key()
247 err = CRYPT_OK; in ecc_recover_key()
251 err = CRYPT_INVALID_ARG; in ecc_recover_key()
[all …]
A Decc_verify_hash.c39 int err; in ecc_verify_hash_ex() local
53 return err; in ecc_verify_hash_ex()
67 err = CRYPT_MEM; in ecc_verify_hash_ex()
82 err = CRYPT_INVALID_PACKET; in ecc_verify_hash_ex()
92 err = CRYPT_ERROR; goto error; in ecc_verify_hash_ex()
95 err = CRYPT_INVALID_PACKET; in ecc_verify_hash_ex()
117 err = CRYPT_INVALID_ARG; in ecc_verify_hash_ex()
124 err = CRYPT_ERROR; in ecc_verify_hash_ex()
131 err = CRYPT_INVALID_PACKET; in ecc_verify_hash_ex()
201 err = CRYPT_OK; in ecc_verify_hash_ex()
[all …]
A Decc_set_curve.c17 int err; in ecc_set_curve() local
26 return err; in ecc_set_curve()
48 return err; in ecc_set_curve()
54 int err = CRYPT_ERROR; in ecc_set_curve_by_size() local
58 err = ecc_find_curve("SECP112R1", &cu); in ecc_set_curve_by_size()
61 err = ecc_find_curve("SECP128R1", &cu); in ecc_set_curve_by_size()
64 err = ecc_find_curve("SECP160R1", &cu); in ecc_set_curve_by_size()
67 err = ecc_find_curve("SECP192R1", &cu); in ecc_set_curve_by_size()
70 err = ecc_find_curve("SECP224R1", &cu); in ecc_set_curve_by_size()
73 err = ecc_find_curve("SECP256R1", &cu); in ecc_set_curve_by_size()
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/chacha/
A Dchacha_test.c41 int err; in chacha_test()
46 …if ((err = chacha_setup(&st, k, sizeof(k), 20)) != CRYPT_OK) return err; in chacha_test()
47 …if ((err = chacha_ivctr32(&st, n, sizeof(n), 1)) != CRYPT_OK) return err; in chacha_test()
48 …if ((err = chacha_crypt(&st, (unsigned char*)pt, 35, out )) != CRYPT_OK) return err; in chacha_test()
49 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 35, 35, out + 35)) != CRYPT_OK) return err; in chacha_test()
50 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 70, 5, out + 70)) != CRYPT_OK) return err; in chacha_test()
51 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 75, 5, out + 75)) != CRYPT_OK) return err; in chacha_test()
52 …if ((err = chacha_crypt(&st, (unsigned char*)pt + 80, len - 80, out + 80)) != CRYPT_OK) return err; in chacha_test()
56 …if ((err = chacha_setup(&st, k, sizeof(k), 20)) != CRYPT_OK) return err; in chacha_test()
57 …if ((err = chacha_ivctr32(&st, n, sizeof(n), 1)) != CRYPT_OK) return err; in chacha_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/rsa/
A Drsa_make_key.c22 int err; in s_rsa_make_key() local
29 return err; in s_rsa_make_key()
33 return err; in s_rsa_make_key()
87 return err; in s_rsa_make_key()
102 int err; in rsa_make_key() local
109 return err; in rsa_make_key()
117 return err; in rsa_make_key()
133 int err; in rsa_make_key_ubin_e() local
145 return err; in rsa_make_key_ubin_e()
159 int err; in rsa_make_key_bn_e() local
[all …]
A Drsa_exptmod.c62 { return err; } in rsa_exptmod()
69 err = CRYPT_PK_INVALID_SIZE; in rsa_exptmod()
78 if (err != CRYPT_OK) { in rsa_exptmod()
84 if (err != CRYPT_OK) { in rsa_exptmod()
90 if (err != CRYPT_OK) { in rsa_exptmod()
96 if (err != CRYPT_OK) { in rsa_exptmod()
132 if (err != CRYPT_OK) { in rsa_exptmod()
153 err = CRYPT_BUFFER_OVERFLOW; in rsa_exptmod()
159 err = CRYPT_ERROR; in rsa_exptmod()
169 err = CRYPT_OK; in rsa_exptmod()
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/sosemanuk/
A Dsosemanuk_test.c20 int err; in sosemanuk_test()
34 …if ((err = sosemanuk_setup(&st, k, sizeof(k))) != CRYPT_OK) return in sosemanuk_test()
35 …if ((err = sosemanuk_setiv(&st, n, sizeof(n))) != CRYPT_OK) return in sosemanuk_test()
36 …if ((err = sosemanuk_crypt(&st, (unsigned char*)pt, 5, out)) != CRYPT_OK) return in sosemanuk_test()
43 if ((err = sosemanuk_setup(&st, k, sizeof(k))) != CRYPT_OK) return err; in sosemanuk_test()
44 if ((err = sosemanuk_setiv(&st, n, sizeof(n))) != CRYPT_OK) return err; in sosemanuk_test()
45 if ((err = sosemanuk_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in sosemanuk_test()
75 if ((err = sosemanuk_setup(&st, k3, sizeof(k3))) != CRYPT_OK) return err; in sosemanuk_test()
76 if ((err = sosemanuk_setiv(&st, n3, sizeof(n3))) != CRYPT_OK) return err; in sosemanuk_test()
77 if ((err = sosemanuk_keystream(&st, out, 64)) != CRYPT_OK) return err; in sosemanuk_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
A Dsalsa20_test.c41 int err; in salsa20_test()
47 …if ((err = salsa20_setup(&st, k, sizeof(k), rounds)) != CRYPT_OK) return er… in salsa20_test()
48 …if ((err = salsa20_ivctr64(&st, n, sizeof(n), counter)) != CRYPT_OK) return er… in salsa20_test()
49 …if ((err = salsa20_crypt(&st, (unsigned char*)pt, 5, out)) != CRYPT_OK) return er… in salsa20_test()
58 if ((err = salsa20_setup(&st, k, sizeof(k), rounds)) != CRYPT_OK) return err; in salsa20_test()
59 if ((err = salsa20_ivctr64(&st, n, sizeof(n), counter)) != CRYPT_OK) return err; in salsa20_test()
60 if ((err = salsa20_crypt(&st, (unsigned char*)pt, len, out)) != CRYPT_OK) return err; in salsa20_test()
82 if ((err = salsa20_setup(&st, k3, sizeof(k3), rounds3)) != CRYPT_OK) return err; in salsa20_test()
83 if ((err = salsa20_ivctr64(&st, n3, sizeof(n3), counter3)) != CRYPT_OK) return err; in salsa20_test()
84 if ((err = salsa20_keystream(&st, out, 64)) != CRYPT_OK) return err; in salsa20_test()
[all …]
A Dxsalsa20_test.c50 int err; in xsalsa20_test()
52 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
53 if ((err = salsa20_crypt(&st, msg, msglen, ciphertext)) != CRYPT_OK) return err; in xsalsa20_test()
54 if ((err = salsa20_done(&st)) != CRYPT_OK) return err; in xsalsa20_test()
56 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
57 if ((err = salsa20_crypt(&st, ciphertext, msglen, msg2)) != CRYPT_OK) return err; in xsalsa20_test()
58 if ((err = salsa20_done(&st)) != CRYPT_OK) return err; in xsalsa20_test()
82 int err; in xsalsa20_test()
84 if ((err = xsalsa20_setup(&st, key, 32, nonce, 24, rounds)) != CRYPT_OK) return err; in xsalsa20_test()
85 if ((err = salsa20_keystream(&st, keystream, keystreamlen)) != CRYPT_OK) return err; in xsalsa20_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/mac/poly1305/
A Dpoly1305_test.c32 int err; in poly1305_test()
35 if ((err = poly1305_init(&st, k, 32)) != CRYPT_OK) return err; in poly1305_test()
36 if ((err = poly1305_process(&st, (unsigned char*)m, 5)) != CRYPT_OK) return err; in poly1305_test()
37 if ((err = poly1305_process(&st, (unsigned char*)m + 5, 4)) != CRYPT_OK) return err; in poly1305_test()
38 if ((err = poly1305_process(&st, (unsigned char*)m + 9, 3)) != CRYPT_OK) return err; in poly1305_test()
39 if ((err = poly1305_process(&st, (unsigned char*)m + 12, 2)) != CRYPT_OK) return err; in poly1305_test()
40 if ((err = poly1305_process(&st, (unsigned char*)m + 14, 1)) != CRYPT_OK) return err; in poly1305_test()
41 if ((err = poly1305_process(&st, (unsigned char*)m + 15, mlen - 15)) != CRYPT_OK) return err; in poly1305_test()
42 if ((err = poly1305_done(&st, out, &len)) != CRYPT_OK) return err; in poly1305_test()
45 if ((err = poly1305_init(&st, k, 32)) != CRYPT_OK) return err; in poly1305_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/dsa/
A Ddsa_verify_key.c32 int err; in dsa_verify_key() local
35 if (err != CRYPT_OK || *stat == 0) return err; in dsa_verify_key()
38 if (err != CRYPT_OK || *stat == 0) return err; in dsa_verify_key()
54 int err; in dsa_int_validate_pqg() local
95 return err; in dsa_int_validate_pqg()
107 int err, res; in dsa_int_validate_primes() local
115 return err; in dsa_int_validate_primes()
123 return err; in dsa_int_validate_primes()
143 int err; in dsa_int_validate_xy() local
151 return err; in dsa_int_validate_xy()
[all …]
A Ddsa_generate_pqg.c33 int err, res, mr_tests_q, mr_tests_p, found_p, found_q, hash; in _dsa_make_params() local
110 if ((err = hash_is_valid(hash)) != CRYPT_OK) { return err; } in _dsa_make_params()
118 err = mp_init_multi(&t2L1, &t2N1, &t2q, &t2seedlen, &U, &W, &X, &c, &h, &e, &seedinc, NULL); in _dsa_make_params()
154 err = hash_memory(hash, sbuf, seedbytes, wbuf+(n-j)*outbytes, &i); in _dsa_make_params()
195 err = CRYPT_OK; in _dsa_make_params()
203 return err; in _dsa_make_params()
217 int err; in dsa_generate_pqg() local
224 return err; in dsa_generate_pqg()
227 err = _dsa_make_params(prng, wprng, group_size, modulus_size, key->p, key->q, key->g); in dsa_generate_pqg()
228 if (err != CRYPT_OK) { in dsa_generate_pqg()
[all …]
A Ddsa_verify_hash.c35 int err; in dsa_verify_hash_raw() local
47 return err; in dsa_verify_hash_raw()
52 err = CRYPT_INVALID_PACKET; in dsa_verify_hash_raw()
80 err = CRYPT_OK; in dsa_verify_hash_raw()
83 return err; in dsa_verify_hash_raw()
100 int err; in dsa_verify_hash() local
109 return err; in dsa_verify_hash()
116 if (err != CRYPT_OK) { in dsa_verify_hash()
120 err = der_length_sequence(sig_seq, 2, &reallen); in dsa_verify_hash()
121 if (err != CRYPT_OK || reallen != siglen) { in dsa_verify_hash()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/
A Dder_decode_sequence_flexi.c183 err = CRYPT_MEM; in der_decode_sequence_flexi()
206 err = CRYPT_MEM; in der_decode_sequence_flexi()
248 err = CRYPT_MEM; in der_decode_sequence_flexi()
278 err = CRYPT_MEM; in der_decode_sequence_flexi()
301 err = CRYPT_MEM; in der_decode_sequence_flexi()
324 err = CRYPT_MEM; in der_decode_sequence_flexi()
347 err = CRYPT_MEM; in der_decode_sequence_flexi()
370 err = CRYPT_MEM; in der_decode_sequence_flexi()
394 err = CRYPT_MEM; in der_decode_sequence_flexi()
433 err = CRYPT_MEM; in der_decode_sequence_flexi()
[all …]
/optee_os/core/lib/libtomcrypt/src/prngs/
A Dsober128.c61 int err; in sober128_add_entropy() local
83 err = CRYPT_OK; in sober128_add_entropy()
86 return err; in sober128_add_entropy()
96 int err; in sober128_ready() local
111 return err; in sober128_ready()
139 int err; in sober128_done() local
146 return err; in sober128_done()
167 int err; in _LTC_PRNG_EXPORT() local
173 if ((err = sober128_start(prng)) != CRYPT_OK) return err; in _LTC_PRNG_EXPORT()
174 if ((err = sober128_add_entropy(in, inlen, prng)) != CRYPT_OK) return err; in _LTC_PRNG_EXPORT()
[all …]
A Dchacha20.c59 int err; in chacha20_prng_add_entropy() local
81 err = CRYPT_OK; in chacha20_prng_add_entropy()
84 return err; in chacha20_prng_add_entropy()
94 int err; in chacha20_prng_ready() local
109 return err; in chacha20_prng_ready()
137 int err; in chacha20_prng_done() local
144 return err; in chacha20_prng_done()
165 int err; in _LTC_PRNG_EXPORT() local
171 if ((err = chacha20_prng_start(prng)) != CRYPT_OK) return err; in _LTC_PRNG_EXPORT()
172 if ((err = chacha20_prng_add_entropy(in, inlen, prng)) != CRYPT_OK) return err; in _LTC_PRNG_EXPORT()
[all …]
A Drc4.c61 int err; in rc4_add_entropy() local
82 err = CRYPT_OK; in rc4_add_entropy()
85 return err; in rc4_add_entropy()
97 int err, i; in rc4_ready() local
112 return err; in rc4_ready()
140 int err; in rc4_done() local
147 return err; in rc4_done()
168 int err; in _LTC_PRNG_EXPORT() local
174 if ((err = rc4_start(prng)) != CRYPT_OK) return err; in _LTC_PRNG_EXPORT()
175 if ((err = rc4_add_entropy(in, inlen, prng)) != CRYPT_OK) return err; in _LTC_PRNG_EXPORT()
[all …]
A Dfortuna.c125 return err; in _fortuna_reseed()
216 return err; in fortuna_update_seed()
262 int err; in _fortuna_add() local
310 return err; in fortuna_add_random_event()
322 int err; in fortuna_add_entropy() local
339 return err; in fortuna_add_entropy()
349 int err; in fortuna_ready() local
364 return err; in fortuna_ready()
467 return err; in fortuna_done()
505 return err; in _LTC_PRNG_EXPORT()
[all …]
/optee_os/core/lib/libfdt/
A Dfdt_empty_tree.c15 int err; in fdt_create_empty_tree() local
18 if (err) in fdt_create_empty_tree()
19 return err; in fdt_create_empty_tree()
22 if (err) in fdt_create_empty_tree()
23 return err; in fdt_create_empty_tree()
26 if (err) in fdt_create_empty_tree()
27 return err; in fdt_create_empty_tree()
30 if (err) in fdt_create_empty_tree()
31 return err; in fdt_create_empty_tree()
34 if (err) in fdt_create_empty_tree()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/custom_type/
A Dder_decode_custom_type.c100 err = CRYPT_INVALID_PACKET; in der_decode_custom_type_ex()
112 err = CRYPT_INVALID_PACKET; in der_decode_custom_type_ex()
134 err = CRYPT_INVALID_PACKET; in der_decode_custom_type_ex()
160 err = CRYPT_PK_ASN1_ERROR; in der_decode_custom_type_ex()
343 err = CRYPT_OK; in der_decode_custom_type_ex()
359 err = CRYPT_OK; in der_decode_custom_type_ex()
401 err = CRYPT_OK; in der_decode_custom_type_ex()
404 err = CRYPT_OK; in der_decode_custom_type_ex()
406 err = CRYPT_INVALID_PACKET; in der_decode_custom_type_ex()
408 err = CRYPT_INPUT_TOO_LONG; in der_decode_custom_type_ex()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/
A Docb3_test.c206 int err, x, idx, res; in ocb3_test()
227 return err; in ocb3_test()
241 return err; in ocb3_test()
260 return err; in ocb3_test()
274 return err; in ocb3_test()
285 if ((err = ocb3_init(&ocb, idx, K, sizeof(K), N, sizeof(N), 12)) != CRYPT_OK) return err; in ocb3_test()
286 if ((err = ocb3_add_aad(&ocb, A, sizeof(A))) != CRYPT_OK) return err; in ocb3_test()
287 if ((err = ocb3_encrypt(&ocb, P, 32, outct)) != CRYPT_OK) return err; in ocb3_test()
288 if ((err = ocb3_encrypt_last(&ocb, P+32, sizeof(P)-32, outct+32)) != CRYPT_OK) return err; in ocb3_test()
290 if ((err = ocb3_done(&ocb, outtag, &len)) != CRYPT_OK) return err; in ocb3_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/
A Dccm_test.c117 int err, idx; in ccm_test()
136 return err; in ccm_test()
147 return err; in ccm_test()
158 return err; in ccm_test()
162 return err; in ccm_test()
165 return err; in ccm_test()
168 return err; in ccm_test()
171 return err; in ccm_test()
174 return err; in ccm_test()
196 return err; in ccm_test()
[all …]

Completed in 35 milliseconds

12345678910>>...17