bf-686.pl revision 7c478bd95313f5f23a4c958a745db2134aa03244
require "x86asm.pl";
require "cbc.pl";
$BF_ROUNDS=16;
$L="ecx";
$R="edx";
$P="edi";
$tot="esi";
$tmp1="eax";
$tmp2="ebx";
$tmp3="ebp";
&asm_finish();
&file_end();
sub des_encrypt
{
&comment("");
&comment("Load the 2 words");
&comment("");
&comment("P pointer, s and enc flag");
# encrypting part
if ($enc)
{
{
&comment("");
&comment("Round $i");
&comment("");
}
&function_end_A($name);
}
else
{
{
&comment("");
&comment("Round $i");
&comment("");
}
&function_end_A($name);
}
&function_end_B($name);
}
sub BF_ENCRYPT
{
&rotr( $R, 16);
&rotr( $R, 16);
# delay
}
sub n2a
{
sprintf("%d",$_[0]);
}