blob: ccc28005accff681f74ab58840b7cf5153e9a3a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/local/bin/perl
use ExtUtils::testlib;
use SSLeay;
# 2687145 * 3003 * 10^5072 - 1.
$a=SSLeay::BN::set_word(2687145);
$b=SSLeay::BN::set_word(3003);
$c=SSLeay::BN::set_word(10);
$d=SSLeay::BN::set_word(5072);
$e=SSLeay::BN::set_word(1);
print $a->bn2hex()."\n";
print $b->bn2hex()."\n";
print $c->bn2hex()."\n";
print $d->bn2hex()."\n";
print $e->bn2hex()."\n";
$f=(($a->mul($b)->mul($c->exp($d)))->sub($e));
#print "$a $b\n";
$c=$a->mul($b);
print "1->".$c->bn2hex()." \n";
$c=$a*$b;
print "2->".$c->bn2hex()." \n";
$a*=$b;
print "3->$a\n";
print $f->bn2hex()." $a\n";
print $a."\n";
print "$a=(($b*$c)/$d);\n";
$a=(($b*$c)/$d);
print "$a\n";
|