Crypt::DSA::Util(3)
π Crypt::DSA::Util π
okay bestie, welcome to Crypt::DSA::Util β the little utility drawer for the whole Crypt::DSA family of libraries. it's giving backstage crew energy: you don't see it on stage, but the show does NOT happen without it. π
β¨ NAME β¨
Crypt::DSA::Util β DSA utility functions, aka the lil helpers doing the math so you don't have to π§
πΈ SYNOPSIS πΈ
use Crypt::DSA::Util qw( func1 func2 ... );
pick whatever you need off the shelf, boo. exportable means exactly that. π
π¦ DESCRIPTION π¦
Crypt::DSA::Util is a whole lil collection of exportable utility functions that get used all over the place throughout the Crypt::DSA set of libraries. no cap, it's the shared toolbox. π₯
π bitsize($n)
hands you back the number of bits in the Math::Pari integer object $n. that's it. that's the whole function. iconic minimalism. β¨
π bin2mp($string)
you hand it a string $string of absolutely any length, and it treats that string like it's a base-256 representation of an integer β then it returns that integer, as a Math::Pari object. so: bytes in, big mathy integer out. π
π mp2bin($int)
the glow-down of the one above, kind of. give it a biginteger $int (a Math::Pari object, bestie) and it linearizes the integer into an octet string, then returns that octet string. big mathy integer in, bytes out. π«Ά
π mod_exp($a, $exp, $n)
computes $a ^ $exp mod $n and returns the value. the math is all done with Math::Pari, and what comes back at you is a Math::Pari object. so it's $a to the $exp power, mod $n, and it slays. π₯
π mod_inverse($a, $n)
computes the multiplicative inverse of $a mod $n and returns the value. again: math via Math::Pari, return value is a Math::Pari object. modular inverse, but make it cute. π
π AUTHOR & COPYRIGHTS π
for the author, copyright, and license tea, please see the Crypt::DSA manpage. all the credits live over there. π
ok that's the whole page, no notes, go forth and compute π¦
perl v5.42.2 Β· 2026-07-03 β yeah that's the version and date stamp from the footer, mwah, bye bestie π π
π¦ where this page comes from
- fedora 43: perl-Crypt-DSA 1.22-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Crypt-DSA 1.22-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms