• Home
  • Raw
  • Download

Lines Matching refs:kl

160    int err, kl, lastkl;  in cipher_gen()  local
177 case 0: kl = cipher_descriptor[x].min_key_length; break; in cipher_gen()
178 … case 1: kl = (cipher_descriptor[x].min_key_length + cipher_descriptor[x].max_key_length)/2; break; in cipher_gen()
179 case 2: kl = cipher_descriptor[x].max_key_length; break; in cipher_gen()
181 if ((err = cipher_descriptor[x].keysize(&kl)) != CRYPT_OK) { in cipher_gen()
185 if (kl == lastkl) break; in cipher_gen()
186 lastkl = kl; in cipher_gen()
187 fprintf(out, "Key Size: %d bytes\n", kl); in cipher_gen()
189 key = XMALLOC(kl); in cipher_gen()
195 for (z = 0; (int)z < kl; z++) { in cipher_gen()
198 if ((err = cipher_descriptor[x].setup(key, kl, 0, &skey)) != CRYPT_OK) { in cipher_gen()
215 for (z = 0; z < (unsigned long)kl; z++) { in cipher_gen()
218 if ((err = cipher_descriptor[x].setup(key, kl, 0, &skey)) != CRYPT_OK) { in cipher_gen()
286 int err, x, y, z, kl; in omac_gen() local
298 kl = cipher_descriptor[x].block_length; in omac_gen()
301 if (kl != 8 && kl != 16) continue; in omac_gen()
303 if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { in omac_gen()
304 kl = cipher_descriptor[x].max_key_length; in omac_gen()
306 fprintf(out, "OMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in omac_gen()
309 for (y = 0; y < kl; y++) { in omac_gen()
318 if ((err = omac_memory(x, key, kl, input, y, output, &len)) != CRYPT_OK) { in omac_gen()
329 for (z = 0; z < kl; z++) { in omac_gen()
341 int err, x, y, z, kl; in pmac_gen() local
353 kl = cipher_descriptor[x].block_length; in pmac_gen()
356 if (kl != 8 && kl != 16) continue; in pmac_gen()
358 if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { in pmac_gen()
359 kl = cipher_descriptor[x].max_key_length; in pmac_gen()
361 fprintf(out, "PMAC-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in pmac_gen()
364 for (y = 0; y < kl; y++) { in pmac_gen()
373 if ((err = pmac_memory(x, key, kl, input, y, output, &len)) != CRYPT_OK) { in pmac_gen()
384 for (z = 0; z < kl; z++) { in pmac_gen()
395 int err, kl, x, y1, z; in eax_gen() local
407 kl = cipher_descriptor[x].block_length; in eax_gen()
410 if (kl != 8 && kl != 16) continue; in eax_gen()
412 if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { in eax_gen()
413 kl = cipher_descriptor[x].max_key_length; in eax_gen()
415 fprintf(out, "EAX-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in eax_gen()
418 for (z = 0; z < kl; z++) { in eax_gen()
429 …if ((err = eax_encrypt_authenticate_memory(x, key, kl, nonce, y1, header, y1, plaintext, y1, plain… in eax_gen()
444 for (z = 0; z < kl; z++) { in eax_gen()
455 int err, kl, x, y1, z; in ocb_gen() local
467 kl = cipher_descriptor[x].block_length; in ocb_gen()
470 if (kl != 8 && kl != 16) continue; in ocb_gen()
472 if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { in ocb_gen()
473 kl = cipher_descriptor[x].max_key_length; in ocb_gen()
475 fprintf(out, "OCB-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in ocb_gen()
478 for (z = 0; z < kl; z++) { in ocb_gen()
492 …if ((err = ocb_encrypt_authenticate_memory(x, key, kl, nonce, plaintext, y1, plaintext, tag, &len)… in ocb_gen()
507 for (z = 0; z < kl; z++) { in ocb_gen()
519 int err, kl, x, y1, z; in ccm_gen() local
531 kl = cipher_descriptor[x].block_length; in ccm_gen()
534 if (kl != 16) continue; in ccm_gen()
536 if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { in ccm_gen()
537 kl = cipher_descriptor[x].max_key_length; in ccm_gen()
539 fprintf(out, "CCM-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in ccm_gen()
542 for (z = 0; z < kl; z++) { in ccm_gen()
556 …if ((err = ccm_memory(x, key, kl, NULL, nonce, 13, plaintext, y1, plaintext, y1, plaintext, tag, &… in ccm_gen()
571 for (z = 0; z < kl; z++) { in ccm_gen()
582 int err, kl, x, y1, z; in gcm_gen() local
593 kl = cipher_descriptor[x].block_length; in gcm_gen()
596 if (kl != 16) continue; in gcm_gen()
598 if (cipher_descriptor[x].keysize(&kl) != CRYPT_OK) { in gcm_gen()
599 kl = cipher_descriptor[x].max_key_length; in gcm_gen()
601 fprintf(out, "GCM-%s (%d byte key)\n", cipher_descriptor[x].name, kl); in gcm_gen()
604 for (z = 0; z < kl; z++) { in gcm_gen()
613 …if ((err = gcm_memory(x, key, kl, plaintext, y1, plaintext, y1, plaintext, y1, plaintext, tag, &le… in gcm_gen()
628 for (z = 0; z < kl; z++) { in gcm_gen()