Changing signature algorithms

David Picón Álvarez eleuteri@myrealbox.com
Fri Oct 18 00:26:03 2002


--ldphz1fZ.5XiMkIG0nnxfhpcRy8C.PaU
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,

> Tell me if I'm wrong- when I sign a message, the first thing that
> happens is a hash is created (usually SHA1).  Then that SHA1 hash is
> encrypted with my private asymmetric key.  So not only do I have a
> choice of hashes (SHA1, MD5, RipeMD5), but I also have a choice of
> asymmetric crptosystems (RSA, DSA, ..).

You're wrong. The assymetric algorithm is chosen by the key type. If you
have an RSA keypair you can't use it to do ElGamal. If you have a DSA
keypair you can't use it to do RSA. That's why you can create different
types of keys in the first place. The cryptosystems are based on different
numeric problems so the keys are not exchangable like that.

> Or if I'm encrypting to myself.  I just tried to encrypt a message to
> myself, using my public key; and when I use the --cipher-algo switch
> as follows:
>
>   gpg -ea --cipher-algo RSA text_msg

Sorry, I meant symmetric here. My finger went of. Cipher-algo  chooses
symmetric algos.

> It doesn't matter what public algorithm I specify.  Then for kicks I
> specified a symmetric algorithm, and it worked!  So it seems
> --cipher-algo is used to select which *symmetric* algorithm to use.

Correct.


> If that's true, then what does the --s2k-cipher-algo switch do
> differently?

It chooses the symmetric algorithm used to encrypt your private key with
your passphrase.

HTH
--David.



--ldphz1fZ.5XiMkIG0nnxfhpcRy8C.PaU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----

iQQXAwUAPa858IVy4iYQ9LKqFAK4rA/8Cr5YOA5rknN1OSGWTR2gCld2+pmKOr22
qz/6VQrFYdNnUlFv2Q7sguTBClp3Ze8mpiMN/zlOuSpnLSIjG528If5Z/b3N5H16
AwZ5GnuiN8ECDtX7i5K67yMVj813gMcR/DEF1HdoNYo08uCaDMEJy9ejk5D/bCYL
4YJ+EFjzQD5FbgrknDQL+T41xsON265HNkKe0GKpqxI4Mr7x9Eu3uNlp1RSHbWnB
1Qc9ghWzyC1mgdeVj9sWFFys8TUFDX68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