Designing a secure message format
Been reading for a few months, my first time posting.
I am designing an application which will allow users to send encrypted
messages (anything from a few characters to a gigabyte or so) over
insecure channels. I want the system to be extremely simple to use and
so I envision a user entering a passphrase into the application to
decode a message.
I am assuming the user's computer is secure and that the sender and
receiver have shared the secret passphrase in some secure way.
The passphrase would be used to generate a pseudo-random data stream
(S1) which would be used to decrypt a message header, which contains
additional information needed to decrypt the body of the message. (I
plan on using RC4 for S1 and including an initialization vector in the
message.) I have had a few ideas about what to put in this header.
Perhaps it could contain several symmetric keys which were used to
encrypt the message body (3DES, AES, etc.) or maybe it could contain
initialization vectors for a series of pseudo random streams spawned
from the original data stream (S1).
My question is this: Is it better to 1. use S1 to encrypt randomly
generated keys which are used to encrypt the message, 2. use S1 to
encrypt a series of initialization vectors which are applied to streams
derived from S1, 3. use S1 to encrypt the message directly (would S1
with initialization vector provide enough security for the entire
I'm new to this and don't have a strong math background, so I would
appreciate any advice you can give.