Excactly. Read Secrets and Lies.
*Originally posted by scotth *
I probably should have qualified my statement though. There are several different encryption environments to deal with.
- One to One message passing. Your encryption engine and keys are not available for analysis to anyone trying to break your code. This makes your job much easier.
However, if you are trying to implement a real-world security system, ensuring that “your encryption engine and keys are not available for analysis” is far, far tougher than figuring out an engine and keys. In fact, it’s so tough that professional cryptographers always assume that the attacker has the encryption engine, and have done so for a few hundred years.
- Commercial encryption with out public keys. Much tougher, as potential codebreakers get to see the guts of the encryption engine.
- Commercial with public keys. By far the toughest to do mathmatically.
You missed a category, which is one of the most common:
- Symmetric (private key) encryption with public-key encryption and protocol (e.g. Diffie-Hellman) for key transmission.
This is what PGP and many other products do. Symmetric systems are desirable because they’re typically much faster than public key algorithms.
Originally by gazpacho
You are doomed. How do you know that you can trust the compiler that you will compile the code with?
Most everything else has been pretty well covered.
GES
For a high-school level project, I would suggest that you write a simple Feistel cipher. The Tiny Encryption Algorithm I posted above is a Feistel cipher. Read up on them, and you should be able to implement your own design fairly easily. It won’t be secure, but at least it will be an implementation of a real-world cipher.
The tricky part of a Feistel cipher is coming up with a transform function that is secure. If you don’t really care about that, just use the XOR trick listed above in your transform function.
Feistel ciphers are good for school projects because the basic concept is simple, and you can write some pretty simple-yet-cool algorithms to make it work.