• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/libgcrypt-1.5.0/tests/

Lines Matching refs:cipher

118 # porting to a new cipher library
126 # independent ciphers is given with the cipher specification, we hand in
131 # $3 cipher - the cipher string is defined as specified in the openssl
187 # supplying the call to the external cipher implementation
190 # $1: cipher
201 # supplying the call to the external cipher implementation
206 # $1: cipher key in hex format
274 my $cipher=shift;
283 my $program="openssl enc -$cipher -nopad -nosalt -K $key $enc $iv";
291 my $cipher = shift;
297 "openssl dgst -$cipher -binary -sign $keyfile");
303 my $cipher = shift;
310 "openssl dgst -$cipher -binary -verify $keyfile -signature $sigfile");
330 my $cipher = shift;
335 return pipe_through_program($hash, "openssl dgst -$cipher -hex");
339 my $cipher = shift;
351 my $out = "openssl enc -'$cipher' $enc -nopad -nosalt -bufsize $bufsize -K ".bin2hex($key)." $iv";
365 my $cipher=shift;
373 my $program="fipsdrv --key $key $iv --algo $cipher $enc";
454 my $cipher = shift;
464 my $program="fipsdrv --binary --key ".bin2hex($key)." $iv --algo '$cipher' --chunk '$bufsize' $enc";
470 my $cipher = shift;
480 my $program="fipsdrv --algo '$cipher' --mct-server $enc";
586 my $cipher=shift;
597 my $cipher = shift;
708 # as the new key is calculated from oldkey XOR cipher in the MCT test,
1050 # $7: cipher
1060 my $cipher = shift;
1080 $out .= "CIPHERTEXT = " . &$encdec($key1, $iv, $cipher, 1, $pt) . "\n";
1083 $out .= "PLAINTEXT = " . &$encdec($key1, $iv, $cipher, 0, $pt) . "\n";
1096 my $cipher = shift;
1104 $out .= "MD = " . &$hash($pt, $cipher) . "\n";
1156 # $7: cipher
1166 my $cipher = shift;
1178 my $ciph = substr($cipher,0,3);
1207 my $cipher_imp = &$state_cipher($cipher, $enc, $bufsize, $key1, $iv);
1208 $cipher_imp = &$state_cipher_des($cipher, $enc, $bufsize, $key1, $iv) if($cipher =~ /des/);
1217 if ($cipher =~ /des/) {
1254 $cipher =~ /ecb/ ) {
1307 die "Test limitation: cipher '$cipher' not supported in Monte Carlo testing";
1310 if ($cipher =~ /des-ede3-ofb/) {
1312 } elsif (!$enc && $cipher =~ /des-ede3-cfb/) {
1315 } elsif ( $ciph =~ /rc4/ || $cipher eq "des-ede3" || $cipher =~ /ecb/) {
1337 my $cipher = shift;
1353 $md2 = &$hash($mi, $cipher);
1370 my $cipher = shift;
1375 $out .= "SHAAlg = $cipher\n";
1377 $out .= "S = " . &$rsa_sign($data, lc($cipher), $keyfile) . "\n";
1391 my $cipher = shift;
1398 $out .= "SHAAlg = $cipher\n";
1414 $out .= "Result = " . (&$rsa_verify($data, lc($cipher), $keyfile, $sigfile) ? "P\n" : "F\n");
1465 # $1 key for the AES cipher
1630 # this is my cipher/hash type
1631 my $cipher = "";
1634 # 1 - cipher known answer test
1635 # 2 - cipher Monte Carlo test
1701 ##### Extract cipher
1708 #we do not need mode as the cipher is already clear
1709 elsif ($tmpline =~ /SHA-1/) { $cipher="sha1"; }
1710 elsif ($tmpline =~ /SHA-224/) { $cipher="sha224"; }
1711 elsif ($tmpline =~ /SHA-256/) { $cipher="sha256"; }
1712 elsif ($tmpline =~ /SHA-384/) { $cipher="sha384"; }
1713 elsif ($tmpline =~ /SHA-512/) { $cipher="sha512"; }
1714 #we do not need mode as the cipher is already clear
1715 elsif ($tmpline =~ /RC4VS/) { $cipher="rc4"; }
1719 $cipher="sha1"; #place holder - might be overwritten later
1723 # AES cipher (part of it)
1724 $cipher="aes";
1727 # TDES cipher (full definition)
1730 if ($mode eq "cbc") { $cipher="des-ede3-cbc"; }
1731 if ($mode eq "ecb") { $cipher="des-ede3"; }
1732 if ($mode eq "ofb") { $cipher="des-ede3-ofb"; }
1733 if ($mode eq "cfb") { $cipher="des-ede3-cfb"; }
1746 die "Unexpected cipher type with $infile";
1788 } elsif ($tmpline =~ /Monte|MCT|Carlo/ && $cipher =~ /^sha/) {
1796 } elsif ($cipher =~ /^sha/) {
1809 $iv = "00000000000000000000000000000000" if ($cipher eq "rc4"
1816 if ($cipher eq "aes") {
1817 $cipher="$cipher-$1-$mode";
1819 die "Error: Key length $1 given for cipher $cipher which is unexpected";
1902 $cipher=$1;
2004 if ($key1 ne "" && $pt ne "" && $cipher ne "") {
2005 $out .= kat($keytype, $key1, $key2, $key3, $iv, $pt, $cipher, $enc);
2015 if ($key1 ne "" && $pt ne "" && $cipher ne "") {
2016 $out .= crypto_mct($keytype, $key1, $key2, $key3, $iv, $pt, $cipher, $enc);
2026 if ($pt ne "" && $cipher ne "") {
2027 $out .= hash_kat($pt, $cipher, $len);
2033 if ($pt ne "" && $cipher ne "") {
2034 $out .= hash_mct($pt, $cipher);
2039 if ($pt ne "" && $cipher ne "" && $rsa_keyfile ne "") {
2040 $out .= rsa_siggen($pt, $cipher, $rsa_keyfile);
2045 if ($pt ne "" && $cipher ne "" && $signature ne "" && $n ne "" && $e ne "") {
2046 $out .= rsa_sigver($pt, $cipher, $signature, $n, $e);