•

Check out our Community Blogs

Register and join over 40,000 other developers!

### Recent Blog Entries

• phi

I love this community !

# Anyone good with encryption algorithms?

encryption

12 replies to this topic

### #1 ki4jgt

ki4jgt

CC Resident

• Just Joined
• 83 posts

Posted 25 January 2011 - 11:47 PM

I would like some input on this encryption algorithm. What do you think? What are it's weaknesses?
Just BASIC Programming - Message Encryption (Jose's Open Source Encryption)

NOTE: I do not want to write it for the binary level yet. also, it is opensourced and licenced under the gnu gpl v3
• 0

### #2 Alexander

Alexander

YOL9

• Moderator
• 3963 posts
• Location:Vancouver, Eh! Cleverness: 200
• Programming Language:C, C++, PHP, Assembly

Posted 26 January 2011 - 06:32 PM

You are implementing a simple ASCII based encryption. With no sort of rounds, a cryptanalysis, or the ability to obtain the original text without the key is extremely successful.

Consider following the mathematical properties of other encryption algorithms (Blowfish, DES) and implement rounds including lookup tables if anything in to your formula (which will require binary operations), this will allow you to produce a binary result completely independent of the original plaintext in any way.

It can be represented then in Base 64 or hexadecimal, so then that the user can transport the result.
• 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.

### #3 ki4jgt

ki4jgt

CC Resident

• Just Joined
• 83 posts

Posted 26 January 2011 - 06:48 PM

Don't want to sound like an idiot, but what are rounds and how can I implement them?
• 0

### #4 Alexander

Alexander

YOL9

• Moderator
• 3963 posts
• Location:Vancouver, Eh! Cleverness: 200
• Programming Language:C, C++, PHP, Assembly

Posted 27 January 2011 - 12:09 AM

A great way to understand what you are doing and what can be done is here:
Cipher - Wikipedia, the free encyclopedia

You will notice the sample historical cipher implementation being similar to yours (text replacement), and simple to crack. Implementing ciphers, that use multiple steps (rounds) can achieve a great amount of more complexity in your algorithm. You may wish to look at some of the more modern ciphers (listed on the page as well) to get ideas on what they are and how to form a basic implementation.

There is the standard for data encryption (DES) and the specification can be found here, although it relies on complex mathematical operations, matrices and arrays that may not be able to be ran on BASIC (although I do not know, you can browse the figures and see how rounds are performed in that block cipher)
FIPS 46-2 - (DES), Data Encryption Standard
• 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.

### #5 sam_l

sam_l

CC Resident

• Just Joined
• 52 posts

Posted 27 January 2011 - 12:19 AM

Don't write your own encryption algorithm. You do not have the background or the knowledge to do so. The result will be weak and worthless.
• 0

### #6 ki4jgt

ki4jgt

CC Resident

• Just Joined
• 83 posts

Posted 27 January 2011 - 04:45 AM

Thanks for the over whelming vote of confidence! That has been noted (Statistically), but I am very interested in the ability you posses to foresee the future. As the old proverb goes "anything is possible.You just have to believe." P.S. Please tell me when I'm wrong, but don't tell me I'm wrong simply because you doubt my credentials. If the entire world worked on that philosophy, we would still believe the world was flat.
• 0

### #7 Alexander

Alexander

YOL9

• Moderator
• 3963 posts
• Location:Vancouver, Eh! Cleverness: 200
• Programming Language:C, C++, PHP, Assembly

Posted 27 January 2011 - 03:19 PM

You learn a lot about logic, base conversion, and other mathematics not limited to the programming language you are working on, when trying to implement a basic encryption format. It is far a better way to learn about encryption, rather than reading about it. I do not get why it would be "worthless". It may take years to write one that can match a standard, but that is not the point.

• 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.

### #8 ki4jgt

ki4jgt

CC Resident

• Just Joined
• 83 posts

Posted 27 January 2011 - 04:22 PM

Thanks :-) you've already helped so much Alexander :-) Some how every time I visit here you're the first or second to answer my question. Good job. and thanks again.
• 0

### #9 Upstream

Upstream

CC Resident

• 98 posts
• Location:Netherlands
• Programming Language:C, C++, PHP, (Visual) Basic, JavaScript, Perl, Bash, Others
• Learning:Others

Posted 28 May 2011 - 05:53 PM

I also think that trying to make some basic encryption of your own is a nice and good way to learn. Also trying crack some basic ones (these are mostly not suitable for actual use) can be very helpful to get better an understanding of how and when to use encryption. God only knows the crazy and seemingly useless projects I’ve done like: pixels in img to morse, enigma, text replacement and much more.

It has learned me the basics knowledge about different methods like one way, public key etc. Now I know what to use and when.
• 0
"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim." (Edsger Dijkstra)

### #10 null

null

• 128 posts

Posted 01 June 2011 - 11:35 PM

Me myself am actually trying to do precisely what you are doing. I advise you investigate into AES, a common encryption algorithm. Its pretty easy to understand and good if you want to use some of the functions from it.
• 0

### #11 johnhardy009

johnhardy009

CC Newcomer

• Just Joined
• 14 posts

Posted 08 June 2011 - 11:47 PM

Cryptography is hard. It is hard because there are always smarter people out there who can break your home-made super-duper encryption algorithm. If you are so confident in your abilities, use your own encryption algorithms in your own applications.
• 0

### #12 WingedPanther73

WingedPanther73

A spammer's worst nightmare

• Moderator
• 17757 posts
• Location:Upstate, South Carolina
• Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
• Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 09 June 2011 - 03:59 PM

I would like some input on this encryption algorithm. What do you think? What are it's weaknesses?
Just BASIC Programming - Message Encryption (Jose's Open Source Encryption)

NOTE: I do not want to write it for the binary level yet. also, it is opensourced and licenced under the gnu gpl v3

It's a lousy encryption method, easily broken. I've run into similar methods of encryption, and easily deduced how to decrypt them just with a little experimenting.
• 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

### Also tagged with one or more of these keywords: encryption

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download