How to effectively apply combination of Block and Stream Cipher? I have used TrueCrypt but it uses a cascaded encryption. I want to know about encrypting a file using two ciphers with each cipher having different key.

Cipher A (Block Cipher) - with Key KA

Cipher B (Stream Cipher) - with Key KB

First I am encrypting a file with Cipher A (KA). Again I am encrypting a file using Cipher B (KB).

Does this, in any way, make the final encrypted file vulnerable? Or, rather, leave some loopholes.

One other approach I thought is to compress a file before applying second cipher so as to make it more random.

Cipher A -> ZIP -> Cipher B

How secure is this and in which mode the two ciphers be operated to achieve high security?

** Edited **

Both the keys are different. Encrypted file also does not contain any key.
What you can do is convert the block cipher into a stream cipher. You can do this by using it as primitive for a stream cipher mode of encryption such as CTR. Then you can use the resulting key streams of cipher A and B and XOR them together with the plaintext.

In principle you can also encrypt it using a block cipher mode of encryption or stream cipher in any order. This should not leave loopholes.



Compression or no compression is a tricky question. I'd say that no compression is better. As long as your plaintext doesn't leak information through the size of the plaintext, you're OK. The amount of compression is dependent on the contents and size of the plaintext.

The problem with this is that the compression factor may differ for slightly different plaintext. This means that it will become next to impossible to not leak information.



It's good if the keys are not related to each other. For best security it would also be wise to make sure that the algorithms are not related either.



The use of two ciphers to achieve confidentiality is an operation with questionable returns. Often it is more useful to e.g. use public key cryptography (in a hybrid scheme, so that the private key is not required during encryption) and/or authenticated ciphers.