Click here to Skip to main content
15,912,897 members
Please Sign up or sign in to vote.
2.00/5 (3 votes)
See more:
I want to design encryption algorithm with 8 bit key length .can anyone give me some refrence?
Posted
Comments
Philippe Mori 2-Jul-12 15:07pm    
If you want to do encryption, you should use existing algorithms and the key should also have an appropriate length.
Sergey Alexandrovich Kryukov 2-Jul-12 16:34pm    
Why? What if OP wants to explore the possibility and develop the skills of creating security algorithms?
--SA

Yes. Don't.

An eight bit key is far, far too small to provide any significant protection - it's got fewer possibilities than the PIN code for your bank card!

You will be wasting your time, and giving yourself a false sense of security, by thinking that your algorithm in any way protects your data. How long do you think it would take to try all 256 possible "combinations" of keys on your encrypted data? Minutes? Seconds perhaps?


[edit]Due to the prevalence of eight bit bytes, using *only* two values per bit, I changed the combinations total to 256. Which makes it an even worse algorithm - OriginalGriff[/edit]
 
Share this answer
 
v2
Comments
lewax00 2-Jul-12 14:33pm    
You give him too much credit...there's only half that many combinations. :P
OriginalGriff 2-Jul-12 14:42pm    
You mean your are still using the "old" eight bit bytes? :OMG:
My processor runs exclusively on nine bit bytes. And three value bits.
Or I c*cked up.
Probably the latter... :O
Albert Holguin 2-Jul-12 16:16pm    
See my note in the other solution.
If you're using an 8-bit key then security is non-existent, it won't take long for someone to try all possible 256 combinations. You might as well just xor the key with all your data, then you can xor it again to get the information back. It's simple, and since you aren't using a secure key length to begin with you aren't losing much.
 
Share this answer
 
Comments
Albert Holguin 2-Jul-12 16:16pm    
If he's doing it to learn, there's really nothing wrong with that.
Sergey Alexandrovich Kryukov 2-Jul-12 16:31pm    
Good point.
--SA
lewax00 2-Jul-12 16:38pm    
In which case xor is a good place to start, it's the most basic form of encryption that I can think of, and it's simple to implement.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900