<<< Date Index >>>     <<< Thread Index >>>

Re: re-encrypt encrypted emails



On Thu, Jan 04, 2007 at 05:49:49PM -0800, William Yardley wrote:
> I want to send him a
> new copy of all the emails somehow, only re-encrypted for his new key.

Something like:
find $dir -type f | while read f; do gpg < "$f" >> log.txt; done
gpg --encrypt log.txt

Should work.

Might want to look into gpg-agent to cache the passphrase across
invocations.

> I was thinking of decrypting the whole thing to a file and then
> re-encrypting somehow, but if I run gpg --decrypt on the whole folder, I
> get one message decrypted and then:

And then it blows up, because it assumes that each invocation is
either a single decrypt, or because the blocks of crypted stuff
are seperated by unrelated non-encrypted stuff.

Since each was crypted seperately, you need to undo them seperately,
then put them together (via tar, or concatenation as above) and
re-encrypt them en masse.
-- 
``Unthinking respect for authority is the greatest enemy of truth.''
-- Albert Einstein -><- <URL:http://www.subspacefield.org/~travis/>

Attachment: pgpqpWRPEyKNJ.pgp
Description: PGP signature