Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I usually use AxCrypt to encrypt my documents. For some documents that I want to store online, being a paranoid, I re-encrypt using PGP.

I want to know whether re-encryption does affect the previous encryption in any way? AxCrypt uses AES-128 bit encryption algorithm, whereas I have set CAST for PGP.

share|improve this question

migrated from stackoverflow.com Nov 17 '09 at 3:04

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 5 down vote accepted

You can re-encrypt any cipertext witout tampering the original encryption as long as you use independent keys for the two encryptions. A formal proof can be found in the paper Cascade ciphers: The importance of being first by Massey and Maurer.

The paper also shows that a cascade may not be as strong as the second cipher. This is a surprising observation and it is difficult to come up with a case that is not totaly unpractical. For example, if the first encryption uses compression then the length of the ciphertext could reveal some information. Assume for example that a bank is sending a standard letter to their customers with new pin codes. The letters where the new pin code overlaps e.g. with the banks zip code might compress better. Hence an attacker seeing a series of encrypted letters could potentially select the ones with easy guessable pin numbers. In such a case, re-encrypting the letter a second time might not help.

Note, this does not mean a second encryption does never help. Just that there is no guarantee that the cascade is as strong as the second encryption.

share|improve this answer
1  
TrueCrypt has option to use three ciphers for creating encrypted volumes. It is open-source and thoroughly reviewed. Is it also not safe? Coming back to my original post, I first encrypt a file using AxCrypt using a strong passphrase. After that I re-encrypt that file using PGP with RSA 4096-bit key. –  RPK Nov 16 '09 at 6:16

No, it's fine. If it did, encrypting a second time would be a viable attack against the underlying cipher, which would make it a weak cipher.

In general, you can expect that the security you get from encrypting something twice is at least the security you get by using just the stronger of the two methods.

share|improve this answer

I'm not an expert but logically it should NOT affect if you decrypt back in the reverse order.

share|improve this answer
    
I got the impression RPK was saying that the encrypted documents are encrypted again with PGP without undoing the AES encryption. If the documents were decrypted when PGP was used, it wouldn't make sense to ask if the previous encryption was affected. –  pavium Nov 15 '09 at 10:10
3  
Yes, and what okw is saying pavium is that as long as you decrypt the twice-encrypted data in the reverse order as you encrypted it, there's no reason it should be affected. –  Dav Nov 15 '09 at 10:24
    
@Dav: Yes, that was what I meant. Thanks! :) –  o.k.w Nov 18 '09 at 0:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.