• Home
  • Raw
  • Download

Lines Matching refs:out

119    FILE *out;  in hash_gen()  local
122 out = fopen("hash_tv.txt", "w"); in hash_gen()
123 if (out == NULL) { in hash_gen()
127 …fprintf(out, "Hash Test Vectors:\n\nThese are the hashes of nn bytes '00 01 02 03 .. (nn-1)'\n\n"); in hash_gen()
134 fprintf(out, "Hash: %s\n", hash_descriptor[x].name); in hash_gen()
144 fprintf(out, "%3lu: ", y); in hash_gen()
146 fprintf(out, "%02X", md[z]); in hash_gen()
148 fprintf(out, "\n"); in hash_gen()
150 fprintf(out, "\n"); in hash_gen()
153 fclose(out); in hash_gen()
161 FILE *out; in cipher_gen() local
164 out = fopen("cipher_tv.txt", "w"); in cipher_gen()
166 fprintf(out, in cipher_gen()
171 fprintf(out, "Cipher: %s\n", cipher_descriptor[x].name); in cipher_gen()
187 fprintf(out, "Key Size: %d bytes\n", kl); in cipher_gen()
208 fprintf(out, "%2lu: ", w); in cipher_gen()
210 fprintf(out, "%02X", pt[z]); in cipher_gen()
212 fprintf(out, "\n"); in cipher_gen()
223 fprintf(out, "\n"); in cipher_gen()
226 fprintf(out, "\n"); in cipher_gen()
228 fclose(out); in cipher_gen()
235 FILE *out; in hmac_gen() local
238 out = fopen("hmac_tv.txt", "w"); in hmac_gen()
240 fprintf(out, in hmac_gen()
246 fprintf(out, "HMAC-%s\n", hash_descriptor[x].name); in hmac_gen()
268 fprintf(out, "%3d: ", y); in hmac_gen()
270 fprintf(out, "%02X", output[z]); in hmac_gen()
272 fprintf(out, "\n"); in hmac_gen()
278 fprintf(out, "\n"); in hmac_gen()
280 fclose(out); in hmac_gen()
287 FILE *out; in omac_gen() local
290 out = fopen("omac_tv.txt", "w"); in omac_gen()
292 fprintf(out, in omac_gen()
306 fprintf(out, "OMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in omac_gen()
322 fprintf(out, "%3d: ", y); in omac_gen()
324 fprintf(out, "%02X", output[z]); in omac_gen()
326 fprintf(out, "\n"); in omac_gen()
333 fprintf(out, "\n"); in omac_gen()
335 fclose(out); in omac_gen()
342 FILE *out; in pmac_gen() local
345 out = fopen("pmac_tv.txt", "w"); in pmac_gen()
347 fprintf(out, in pmac_gen()
361 fprintf(out, "PMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in pmac_gen()
377 fprintf(out, "%3d: ", y); in pmac_gen()
379 fprintf(out, "%02X", output[z]); in pmac_gen()
381 fprintf(out, "\n"); in pmac_gen()
388 fprintf(out, "\n"); in pmac_gen()
390 fclose(out); in pmac_gen()
396 FILE *out; in eax_gen() local
401 out = fopen("eax_tv.txt", "w"); in eax_gen()
402 …fprintf(out, "EAX Test Vectors. Uses the 00010203...NN-1 pattern for header/nonce/plaintext/key. … in eax_gen()
415 fprintf(out, "EAX-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in eax_gen()
433 fprintf(out, "%3d: ", y1); in eax_gen()
435 fprintf(out, "%02X", plaintext[z]); in eax_gen()
437 fprintf(out, ", "); in eax_gen()
439 fprintf(out, "%02X", tag[z]); in eax_gen()
441 fprintf(out, "\n"); in eax_gen()
448 fprintf(out, "\n"); in eax_gen()
450 fclose(out); in eax_gen()
456 FILE *out; in ocb_gen() local
461 out = fopen("ocb_tv.txt", "w"); in ocb_gen()
462 …fprintf(out, "OCB Test Vectors. Uses the 00010203...NN-1 pattern for nonce/plaintext/key. The ou… in ocb_gen()
475 fprintf(out, "OCB-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in ocb_gen()
496 fprintf(out, "%3d: ", y1); in ocb_gen()
498 fprintf(out, "%02X", plaintext[z]); in ocb_gen()
500 fprintf(out, ", "); in ocb_gen()
502 fprintf(out, "%02X", tag[z]); in ocb_gen()
504 fprintf(out, "\n"); in ocb_gen()
511 fprintf(out, "\n"); in ocb_gen()
513 fclose(out); in ocb_gen()
520 FILE *out; in ccm_gen() local
525 out = fopen("ccm_tv.txt", "w"); in ccm_gen()
526 …fprintf(out, "CCM Test Vectors. Uses the 00010203...NN-1 pattern for nonce/header/plaintext/key. … in ccm_gen()
539 fprintf(out, "CCM-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in ccm_gen()
560 fprintf(out, "%3d: ", y1); in ccm_gen()
562 fprintf(out, "%02X", plaintext[z]); in ccm_gen()
564 fprintf(out, ", "); in ccm_gen()
566 fprintf(out, "%02X", tag[z]); in ccm_gen()
568 fprintf(out, "\n"); in ccm_gen()
575 fprintf(out, "\n"); in ccm_gen()
577 fclose(out); in ccm_gen()
583 FILE *out; in gcm_gen() local
587 out = fopen("gcm_tv.txt", "w"); in gcm_gen()
588 …fprintf(out, "GCM Test Vectors. Uses the 00010203...NN-1 pattern for nonce/header/plaintext/key. … in gcm_gen()
601 fprintf(out, "GCM-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in gcm_gen()
617 fprintf(out, "%3d: ", y1); in gcm_gen()
619 fprintf(out, "%02X", plaintext[z]); in gcm_gen()
621 fprintf(out, ", "); in gcm_gen()
623 fprintf(out, "%02X", tag[z]); in gcm_gen()
625 fprintf(out, "\n"); in gcm_gen()
632 fprintf(out, "\n"); in gcm_gen()
634 fclose(out); in gcm_gen()
639 FILE *out; in base64_gen() local
643 out = fopen("base64_tv.txt", "w"); in base64_gen()
644 …fprintf(out, "Base64 vectors. These are the base64 encodings of the strings 00,01,02...NN-1\n\n"); in base64_gen()
651 fprintf(out, "%2lu: %s\n", x, dst); in base64_gen()
653 fclose(out); in base64_gen()
662 FILE *out; in ecc_gen() local
668 out = fopen("ecc_tv.txt", "w"); in ecc_gen()
669 …fprintf(out, "ecc vectors. These are for kG for k=1,3,9,27,...,3**n until k > order of the curve … in ecc_gen()
677 fprintf(out, "ECC-%d\n", ltc_ecc_sets[x].size*8); in ecc_gen()
688 mp_tohex(k, (char*)str); fprintf(out, "%s, ", (char*)str); in ecc_gen()
689 mp_tohex(R->x, (char*)str); fprintf(out, "%s, ", (char*)str); in ecc_gen()
690 mp_tohex(R->y, (char*)str); fprintf(out, "%s\n", (char*)str); in ecc_gen()
697 fclose(out); in ecc_gen()
702 FILE *out; in lrw_gen() local
712 out = fopen("lrw_tv.txt", "w"); in lrw_gen()
730 fprintf(out, "%d:", x); in lrw_gen()
732 fprintf(out, "%02x", buf[y]); in lrw_gen()
734 fprintf(out, "\n"); in lrw_gen()
755 fprintf(out, "%d:", x); in lrw_gen()
757 fprintf(out, "%02x", buf[y]); in lrw_gen()
759 fprintf(out, "\n"); in lrw_gen()
762 fclose(out); in lrw_gen()