Crypt::...gnature(3)

πŸ’… Crypt::OpenSSL::DSA::Signature

okay so bestie, this is the Digital Signature Object from Crypt::OpenSSL::DSA β€” it's literally the little bundle that holds a DSA signature pair around. it's giving "small but crucial." no cap. ✨


πŸŽ€ SYNOPSIS

like, here's the whole vibe in code, fr fr:

use Crypt::OpenSSL::DSA;
my $dsa_priv = Crypt::OpenSSL::DSA->read_priv_key( $filename );
my $sig_obj = $dsa_priv->do_sign($message);
my $dsa_pub = Crypt::OpenSSL::DSA->read_pub_key( $filename );
my $valid = $dsa_pub->do_verify($message, $sig_obj);
my $sig_size = $dsa_priv->get_sig_size();

my $r = $sig_obj->get_r;
my $s = $sig_obj->get_s;

my $sig_obj2 = Crypt::OpenSSL::DSA::Signature->new();
$sig_obj2->set_r($r);
$sig_obj2->set_s($s);
my $valid = $dsa_pub->do_verify($message, $sig_obj2);

like yes, you read a priv key, sign the message, read the pub key, verify β€” and you can also pull out r and s, build a fresh signature object, and verify that too. iconic behavior honestly. πŸ‘‘


🌸 CLASS METHODS

  • $sig_obj = Crypt::OpenSSL::DSA::Signature->new(); β€” creates a brand new DSA Signature Object for you. πŸ’– but heads up bestie: after you make it, you gotta call set_r and set_s β€” like, it's not going to fill itself in, that's your job. 🫢

πŸ¦‹ OBJECT METHODS

  • $r = $sig_obj->get_r; β€” gets the first member of the signature pair. that's the r. slay. ⭐
  • $s = $sig_obj->get_s; β€” gets the second member of the signature pair. that's the s. periodt. πŸ’…
  • $r = $sig_obj->set_r; β€” sets the first member of the signature pair. πŸŽ€
  • $s = $sig_obj->set_s; β€” sets the second member of the signature pair. 🌸
lowkey notice how the docs literally spell it out for us: get/set for r and s, first member and second member, over and over. it's giving consistency queen. πŸ’œ

πŸ‘‘ AUTHOR

T.J. Mather, <tjmather@maxmind.com> β€” the main character who made this happen. 🫢


🌈 SEE ALSO

  • Crypt::OpenSSL::DSA β€” go check out the parent module, iykyk. πŸ’–

and that's the whole page, bestie!! πŸ’…βœ¨ no notes, ate and left no crumbs. this lovely little doc shipped with perl v5.42.2, dated 2025-06-30, under the Crypt::...gnature(3) name β€” catch you in the group chat! πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from