M
Mike Friedman
I'm looking at Crypt:SA, 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:SA::Key, which
should explain this, is not at all clear to me. The syntax for
Crypt:SA 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
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:SA::Key, which
should explain this, is not at all clear to me. The syntax for
Crypt:SA 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