setpref in GnuPG

Newton Hammet newton@hammet.net
Sat Sep 28 19:38:04 2002


Gyre wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
> 
> Please explain me how do I change the list
> of preferred algorithms in GnuPG? Thank you.
> 
> Yours sincerely,
> Gyre  mailto:gyre@ukr.net
> 28 sep 2002 12:51 (local)
> Only post in plain text.
> OpenPGP Key ID:0xB37C2B92
> .
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.0 (MingW32) - GPGshell v2.60
> Comment: http://www.gyre.rbcmail.ru/pgpkey/0xB37C2B92.asc
> 
> iD8DBQE9lX0QC504qbN8K5IRA336AJ9pcxCZHlwYiTW5cDvAzDrJxvWkRgCeLTta
> 7uJ5nwaAos7DJQKxLgL90Mo=
> =0EaT
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users

Do it this way:

1. Edit your key

gpg --edit-key <keyid>

2. Use either showpref or pref to look at current preferences...
showpref
   is verbose, pref is the actual codes that you have to enter via 
   setpref. Use both in the order implicit in below:

Command> showpref

output:
pub  2048R/05BD84B4  created: 2002-09-26 expires: 2003-09-26 trust: u/u
(1). Newton Hammet (TreeFlyer Global Resources) <newton@hammet.net>
     Cipher: AES, CAST5, 3DES
     Hash: SHA1, RIPEMD160
     Compression: ZLIB, ZIP
				--and then--

Command> pref

output:
pub  2048R/05BD84B4  created: 2002-09-26 expires: 2003-09-26 trust: u/u
(1). Newton Hammet (TreeFlyer Global Resources) <newton@hammet.net>
     S7 S3 S2 H2 H3 Z2 Z1 [mdc]

3. Set the new preferences: (you need to use actual code for preference 
   being added)

Command> setpref S10 S7 S3 S2 H2 H3 Z2 Z1

Command> updpref

you will be prompted: "Really update the prefrences?" answer 'yes'.

you will be prompted for your  passphrase (hopefully you still remember
it!, I had to re-type mine)


3. Then enter 'pref' or showpref' to insure the changes have been made. 
In this example
  I added the symmetric cipher "TWOFISH" to my preference list. (It's
code is S10)

Command> showpref

pub  2048R/05BD84B4  created: 2002-09-26 expires: 2003-09-26 trust: u/u
(1). Newton Hammet (TreeFlyer Global Resources) <newton@hammet.net>
     Cipher: TWOFISH, AES, CAST5, 3DES
     Hash: SHA1, RIPEMD160
     Compression: ZLIB, ZIP


And then you can exit edit-key or perform other edits.

Regards, Newton