Elliptic Curve Digital Signature Algorithm: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
Thundergnat (talk | contribs) (→{{header|Raku}}: Fix up some internal links) |
||
Line 1,436: | Line 1,436: | ||
=={{header|Raku}}== |
=={{header|Raku}}== |
||
(formerly Perl 6) |
(formerly Perl 6) |
||
Reference: Many routines are translated from this [https://github.com/sblackstone/toy-ecdsa Ruby repository], by Stephen Blackstone. The rest are taken here and there from RC. |
Reference: Many routines are translated from this [https://github.com/sblackstone/toy-ecdsa Ruby repository], by Stephen Blackstone. The rest are taken here and there from RC. |
||
<lang perl6>#!/usr/bin/env perl6 |
<lang perl6>#!/usr/bin/env perl6 |
||
Line 1,481: | Line 1,482: | ||
} |
} |
||
sub mult_inv($n, :$modulo) { # rosettacode.org/wiki/Modular_inverse# |
sub mult_inv($n, :$modulo) { # rosettacode.org/wiki/Modular_inverse#Raku |
||
my ($c, $d, $uc, $vd, $vc, $ud, $q) = $n % $modulo, $modulo, 1, 1, 0, 0, 0; |
my ($c, $d, $uc, $vd, $vc, $ud, $q) = $n % $modulo, $modulo, 1, 1, 0, 0, 0; |
||
while $c != 0 { |
while $c != 0 { |