#!/usr/local/bin/perl
sub dec2bin32 {
   my $str = unpack("B32", pack("N", shift));
   return $str;
   }

sub dec2bin16 {
   my $str = unpack("B16", pack("n", shift));
   return $str;
   }

open(golden_vectors,"> vectors/golden_vectors");
for($i=0; $i<150; $i++){
	$random1 = int(rand(65536));
	$random2 = int(rand(65536));
	$a_in = dec2bin16($random1);
	$b_in = dec2bin16($random2);
	$result = dec2bin32($random1*$random2);
	print golden_vectors "$a_in\t$b_in\t$result\n";
}
close(golden_vectors);

print "golden_vectors vector file generated\n\n";
