Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Crypt::DSA

Name Crypt::DSA
Version 1.17
Located at /usr/share/perl5
File /usr/share/perl5/Crypt/DSA.pm
Is Core No
Search CPAN for this module Crypt::DSA
Documentation Crypt::DSA
Module Details Crypt::DSA


NAME

Crypt::DSA - DSA Signatures and Key Generation


SYNOPSIS

    use Crypt::DSA;
    my $dsa = Crypt::DSA->new;
    my $key = $dsa->keygen(
                   Size      => 512,
                   Seed      => $seed,
                   Verbosity => 1
              );
    my $sig = $dsa->sign(
                   Message   => "foo bar",
                   Key       => $key
              );
    my $verified = $dsa->verify(
                   Message   => "foo bar",
                   Signature => $sig,
                   Key       => $key,
              );


DESCRIPTION

Crypt::DSA is an implementation of the DSA (Digital Signature Algorithm) signature verification system. The implementation itself is pure Perl, although the heavy-duty mathematics underneath are provided by the Math::Pari library.

This package provides DSA signing, signature verification, and key generation.


USAGE

The Crypt::DSA public interface is similar to that of Crypt::RSA. This was done intentionally.

Crypt::DSA->new

Constructs a new Crypt::DSA object. At the moment this isn't particularly useful in itself, other than being the object you need to do much else in the system.

Returns the new object.

$key = $dsa->keygen(%arg)

Generates a new set of DSA keys, including both the public and private portions of the key.

%arg can contain:

$signature = $dsa->sign(%arg)

Signs a message (or the digest of a message) using the private portion of the DSA key and returns the signature.

The return value--the signature--is a Crypt::DSA::Signature object.

%arg can include:

$verified = $dsa->verify(%arg)

Verifies a signature generated with sign. Returns a true value on success and false on failure.

%arg can contain:


TODO

Add ability to munge format of keys. For example, read/write keys from/to key files (SSH key files, etc.), and also write them in other formats.


SUPPORT

Bugs should be reported via the CPAN bug tracker at

http://rt.cpan.org/NoAuth/ReportBug.html

For other issues, contact the author.


AUTHOR

Benjamin Trott <ben@sixapart.com>


COPYRIGHT

Except where otherwise noted, Crypt::DSA is Copyright 2006 - 2011 Benjamin Trott.

Crypt::DSA is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026