Lines Matching refs:DO
40 DO(mp_init_multi(&kA, &kB, &rA, &rB, &modulus, NULL));
55 DO(mp_read_radix(G->x, ltc_ecc_sets[z].Gx, 16));
56 DO(mp_read_radix(G->y, ltc_ecc_sets[z].Gy, 16));
57 DO(mp_set(G->z, 1));
58 DO(mp_read_radix(modulus, ltc_ecc_sets[z].prime, 16));
59 DO(mp_montgomery_setup(modulus, &mp));
61 /* do 100 random tests */
65 DO(mp_read_unsigned_bin(rA, buf, sizes[x]));
67 DO(mp_read_unsigned_bin(rB, buf, sizes[x]));
70 DO(ltc_mp.ecc_ptmul(rA, G, A, modulus, 1));
73 DO(ltc_mp.ecc_ptmul(rB, G, B, modulus, 1));
77 DO(mp_read_unsigned_bin(kA, buf, sizes[x]));
79 DO(mp_read_unsigned_bin(kB, buf, sizes[x]));
82 DO(ltc_mp.ecc_ptmul(kA, A, C1, modulus, 0));
83 DO(ltc_mp.ecc_ptmul(kB, B, C2, modulus, 0));
84 DO(ltc_mp.ecc_ptadd(C1, C2, C1, modulus, mp));
85 DO(ltc_mp.ecc_map(C1, modulus, mp));
88 DO(ltc_mp.ecc_mul2add(A, kA, B, kB, C2, modulus));
115 DO(ecc_test ());
116 DO(ecc_test ());
117 DO(ecc_test ());
118 DO(ecc_test ());
119 DO(ecc_test ());
123 DO(ecc_make_key (&yarrow_prng, find_prng ("yarrow"), sizes[s], &usera));
124 DO(ecc_make_key (&yarrow_prng, find_prng ("yarrow"), sizes[s], &userb));
128 DO(ecc_shared_secret (&usera, &userb, buf[0], &x));
131 DO(ecc_shared_secret (&userb, &usera, buf[1], &y));
145 DO(ecc_export (buf[1], &y, PK_PUBLIC, &userb));
149 DO(ecc_import (buf[1], y, &userb));
152 DO(ecc_shared_secret (&usera, &userb, buf[2], &z));
165 DO(ecc_ansi_x963_export(&userb, buf[1], &y));
169 DO(ecc_ansi_x963_import(buf[1], y, &userb));
173 DO(ecc_shared_secret (&usera, &userb, buf[2], &z));
188 DO(ecc_make_key (&yarrow_prng, find_prng ("yarrow"), sizes[s], &usera));
192 DO(ecc_export(buf[0], &x, PK_PUBLIC, &usera));
193 DO(ecc_import(buf[0], x, &pubKey));
195 DO(ecc_export(buf[0], &x, PK_PRIVATE, &usera));
196 DO(ecc_import(buf[0], x, &privKey));
202 DO(ecc_encrypt_key (buf[0], 32, buf[1], &y, &yarrow_prng, find_prng ("yarrow"), find_hash ("sha256"), &pubKey));
205 DO(ecc_decrypt_key (buf[1], y, buf[0], &x, &privKey));
221 DO(ecc_sign_hash (buf[0], 16, buf[1], &x, &yarrow_prng, find_prng ("yarrow"), &privKey));
222 DO(ecc_verify_hash (buf[1], x, buf[0], 16, &stat, &pubKey));
224 DO(ecc_verify_hash (buf[1], x, buf[0], 16, &stat2, &privKey));