Lines Matching refs:key1
1045 # $2: crypto key1 in hex form
1055 my $key1 = shift;
1065 $out .= "$keytype = $key1\n";
1070 $key1 = $key1 . $key2;
1074 $key1= $key1 . $key3;
1080 $out .= "CIPHERTEXT = " . &$encdec($key1, $iv, $cipher, 1, $pt) . "\n";
1083 $out .= "PLAINTEXT = " . &$encdec($key1, $iv, $cipher, 0, $pt) . "\n";
1151 # $2: crypto key1 in hex form
1161 my $key1 = hex2bin(shift);
1186 $out .= "$keytype = ". bin2hex($key1). "\n";
1188 $key1 = $key1 . $key2;
1190 $out .= "$keytype = ". bin2hex($key1). "\n";
1194 $key1 = $key1 . $key3;
1196 my $keylen = length($key1);
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/);
1224 .bin2hex($key1)."\n"
1274 $key1 ^= substr($old_calc_data . $calc_data, -$keylen);
1275 #print STDERR bin2hex($key1)."\n";
1281 my $nkey = fix_key_parity(substr($key1,0,8) ^ $calc_data);
1283 if (substr($key1,0,8) ne substr($key1,8,8)) {
1285 $key2 = fix_key_parity((substr($key1,8,8) ^ $old_calc_data));
1288 $key2 = fix_key_parity((substr($key1,8,8) ^ $calc_data));
1291 if ( substr($key1,0,8) eq substr($key1,16)) {
1293 $key3 = fix_key_parity((substr($key1,16) ^ $calc_data));
1296 $key3 = fix_key_parity((substr($key1,16) ^ $old_old_calc_data));
1302 $key1=$nkey;
1304 $key1 ^= substr($calc_data, 0, 16);
1305 #print STDERR bin2hex($key1)."\n";
1644 my $key1 = "";
1825 die "KEY seen twice - input file crap" if ($key1 ne "");
1827 $key1=$2;
1828 $key1 =~ s/\s//g; #replace potential white spaces
1831 die "KEY seen twice - input file crap" if ($key1 ne "");
1833 $key1=$2;
1834 $key1 =~ s/\s//g; #replace potential white spaces
1835 $key2 = $key1;
1836 $key3 = $key1;
1839 die "First key not set, but got already second key - input file crap" if ($key1 eq "");
2004 if ($key1 ne "" && $pt ne "" && $cipher ne "") {
2005 $out .= kat($keytype, $key1, $key2, $key3, $iv, $pt, $cipher, $enc);
2007 $key1 = "";
2015 if ($key1 ne "" && $pt ne "" && $cipher ne "") {
2016 $out .= crypto_mct($keytype, $key1, $key2, $key3, $iv, $pt, $cipher, $enc);
2018 $key1 = "";
2052 if ($key1 ne "" && $dt ne "" && $v ne "") {
2053 $out .= rngx931($key1, $dt, $v, "VST");
2054 $key1 = "";
2060 if ($key1 ne "" && $dt ne "" && $v ne "") {
2061 $out .= rngx931($key1, $dt, $v, "MCT");
2062 $key1 = "";
2068 if ($klen ne "" && $tlen ne "" && $key1 ne "" && $pt ne "") {
2069 $out .= hmac_kat($klen, $tlen, $key1, $pt);
2070 $key1 = "";