Public Group

# Basic Encryption?

This topic is 4880 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I was wondering if someone could explain a little bit how to do basic encryption. I checked throught the article's here at GameDev but only found one article, and it was in VB so I really didn't understand it. I am programming in C++.

##### Share on other sites
TEA is easy to implement and from what Ive read its very secure. You can also make it very fast by unwinding the loop. Just click that link and you should find a lot of info on it (including C++ implementations).

##### Share on other sites
Encryption Lessons

##### Share on other sites
Err sorry that didn't work. Encryption Lessons

##### Share on other sites
Quote:
 Original post by mike25025TEA is easy to implement and from what Ive read its very secure. You can also make it very fast by unwinding the loop. Just click that link and you should find a lot of info on it (including C++ implementations).

This thread has a few implementations as well to take a look into for TEA.

##### Share on other sites
http://www.und.edu/org/crypto/crypto/lanaki.crypt.class/lessons/

##### Share on other sites
I am sorry but I don't seem to understand any of that. What I meant by my first post was how would I effectively code my own form of encryption. I get the concepts but not how to code it.

##### Share on other sites
Sorry, but rule number one about effectively implementing encryption in software is not to roll your own. Seriously consider using a pre existing encryption library.

##### Share on other sites
Quote:
 Original post by kelchargeI am sorry but I don't seem to understand any of that. What I meant by my first post was how would I effectively code my own form of encryption. I get the concepts but not how to code it.

Basic example of encryption:
char someInputString[] = "Hello world!";int key = 35;for(int i=0; i<strlen(someInputString); i++){ cout << char((int)someInputString^key);}cout << endl;

Quote:
 Original post by SiCraneSorry, but rule number one about effectively implementing encryption in software is not to roll your own. Seriously consider using a pre existing encryption library.

Agreed, especially if you having problems such as figuring out the basic concepts of implementing it.

##### Share on other sites
Quote:
Original post by DevLiquidKnight
Quote:
 Original post by kelchargeI am sorry but I don't seem to understand any of that. What I meant by my first post was how would I effectively code my own form of encryption. I get the concepts but not how to code it.

Basic example of encryption:
*** Source Snippet Removed ***

That method is not good. It can be broken in a couple of minutes. For basic XOR encryption you need a large key an possibly a changing key.

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 16
• 18
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633360
• Total Posts
3011524
• ### Who's Online (See full list)

There are no registered users currently online

×