Data Encryption

I'm looking into writing my own data encryption code/program. My professor has failed to even point me in the right direction. Can some one help me out in pointing me in the right direction?
My professor has failed to even point me in the right direction
What were you told?
Nothing beyond "Google it".
In a sense he pointed you in a direction far better than he could ever explain himself. I learned everything I know about computers/programming from searching the internet.

As for your question... break it down into steps. Encryption is the process of manipulating data so that it cannot be interpreted, but can be re-manipulated back to its original meaning by the receiver. That being said, there are many ways of transforming the data. Some simple ones include Exclusive Or encryption and Caesar Shifts. XOR is literally the process of Exclusive O r- ing the bits of data with a key, and Cesar Shifting is the process of adding/subtracting a set value from the data (A + 1 = B).

Cesar Shift:
1
2
3
4
5
6
7
8
char data = 'A';
int key = 5;

//encrypt
data += key;

//decrypt
data -= key;


XOR:
1
2
3
4
5
6
7
8
char data = 'A';
char key = 'g';

//encrypt
data ^= key; //^ is exclusive or in C++

//decrypt
data ^= key; //its that simple 


Those methods are of course not actually practical in modern applications, but they're a great place to start.
Thank you. I really do appreciate you sending me in the right direction. I didn't know where to start or what to look for.
Topic archived. No new replies allowed.