how to create a symmetric cipher

Martin A. Brown martin at
Tue Nov 14 23:43:55 CET 2006

Hash: SHA1

Greetings Wei Wu,

 : Well, my ultimate goal is to encrypt data, but I don't want to 
 : use passphrase to do it as I believe it is not secure enough.
 : So my questions are:
 : 1. How to create a symmetric key or cipher? With that, I may use 
 :    another tool to encrypt/decrypt.
 : 2. Can gpg be used to do key based encryption? Not passphrase 
 :    based.

There is a utility (outside of the GnuPG family of encryption tools) 
called aespipe [0], which is very handy for exactly the above sort 
of tasks.  This tool can be used with 1, 64 or 65 encryption keys, 
which themselves are protected using GnuPG's public key 
cryptographic mechanisms.  So, your stream of data is encrypted with 
(for example) randomly* generated encryption keys, which themselves 
are encrypted using your conventional public key cryptography.

I wrote a wrapper script [1] (which has never been audited), which 
makes aespipe a touch more friendly to use on the command line.

Best of luck,

- -Martin

  *  Beware the wonderful word "random" when speaking to those who 
     are professionally engaged in cryptography.

- -- 
Martin A. Brown
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: pgf-0.72 (


More information about the Gnupg-users mailing list