Using Crypt::DSA
- From: Mike Friedman <mikef@xxxxxxxxxxxxxxxx>
- Date: Sun, 21 Aug 2005 22:43:45 +0000 (UTC)
I'm looking at Crypt::DSA, in particular the docs from
CPAN. One thing I can't seem to grasp from the documentation:
How do I extract (and write to disk) just the public key, after
I've generated a DSA key object? Unlike Crypt::RSA, where keygen
returns a list consisting of the public and private keys as
separate scalars, it seems that the DSA keygen method returns
only a single scalar, which supposedly contains both the public
and private portions of the key.
Now, the only way I see to write out a key is with the 'key->write'
method, but when I use $key->write (where '$key' is what's returned
from keygen), I get just one object written and it's labeled
(internally) as a private key.
What if I want to create a file containing just the public portion,
so I can distribute it?
I must admit that the documentation for Crypt::DSA::Key, which
should explain this, is not at all clear to me. The syntax for
Crypt::DSA is supposed to be modeled after that of Crypt::RSA,
but in this area there's clearly a difference and I don't
understand it.
Thanks.
Mike
.
- Follow-Ups:
- Re: Using Crypt::DSA
- From: A. Sinan Unur
- Re: Using Crypt::DSA
- Prev by Date: Re: Use of uninitialized value Error
- Next by Date: Re: Using Crypt::DSA
- Previous by thread: FAQ 4.28 How do I change the Nth occurrence of something?
- Next by thread: Re: Using Crypt::DSA
- Index(es):