Net::SS...ey::DSA(3)
β¨ 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. π
$signatureshould be an SSH-compatible signature blob, as returned fromsignβ yes, thatsign, the one right above β¬οΈ$datashould be a string of data, as passed tosignβ 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
- fedora 44: perl-Net-SSH-Perl 2.144-2.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