Net::SS...ey::DSA(3)

πŸ“¦
version 2.144 Β· 4 versions
, in fedora 44

✨ NAME ✨

Net::SSH::Perl::Key::DSA β€” it's a DSA key object, bestie πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use Net::SSH::Perl::Key;
my $key = Net::SSH::Perl::Key->new('DSA');

like… that's it. that's the whole vibe. ✨


🌸 DESCRIPTION 🌸

okay so. Net::SSH::Perl::Key::DSA is a subclass of Net::SSH::Perl::Key, and what it does is implement a key object, but the SSH way. πŸ‘‘

This object hands you literally every method you need for a DSA key object, and the heavy lifting underneath is done by Crypt::PK::DSA. This class is basically the cute little wrapper around that module that adds all the SSH-specific stuff β€” like, for example, taking a Net::SSH::Perl::Buffer blob and transforming it into a key object. it's giving glow-up, fr fr 🫢


πŸ’– USAGE πŸ’–

Net::SSH::Perl::Key::DSA implements the interface described in the documentation for Net::SSH::Perl::Key. Anything that's different or extra gets described right here. no cap. πŸ’―

πŸ” $key->sign($data)

This one wraps around Crypt::PK::DSA::sign_message to sign $data using the key $key, and then it encodes that signature into an SSH-compatible signature blob. ✍️✨

Here's the tea though: the output of Crypt::PK::DSA::sign_message is a DER ASN.1 binary structure, so that has to get decoded to extract the components of the signature. it's giving archaeology but make it cryptography 🏺

Returns the signature blob. πŸ’…

πŸ•΅οΈ $key->verify($signature, $data)

Give it a signature blob $signature plus the original signed data $data, and it attempts to verify that signature using the key $key. πŸ”

This wraps around Crypt::PK::DSA::verify_message for the core verification. And because Crypt::PK::DSA::verify_message requires a signature in DER ASN.1 format, the signature gets reconfigured into that before it's passed along. πŸ”

  • $signature should be an SSH-compatible signature blob, as returned from sign β€” yes, that sign, the one right above ⬆️
  • $data should be a string of data, as passed to sign β€” same energy πŸ’«

Returns true if the verification succeeds, and false otherwise. no in-between, she's decisive. 😌


πŸ‘‘ AUTHOR & COPYRIGHTS πŸ‘‘

Please see the Net::SSH::Perl manpage for author, copyright, and license information. πŸ“œ (yes queen, go read the parent page, the receipts are all there πŸ™ˆ)


and that's the whole page, bestie!! πŸŽ€

this was brought to you by perl v5.42.0 🌈, dated 2026-01-17, and the manual is literally called Net::SS...ey::DSA(3) (yes the name got squished, iconic behaviour honestly πŸ’€βœ¨). stan. 🫢🌸

πŸ“¦ where this page comes from