Encryption that doesn't repeat?
BlitzMax Forums/BlitzMax Programming/Encryption that doesn't repeat?
| ||
I've tried a couple of the encryption routines from the archives to no avail. What I need is an encryption routine that doesn't print the same character for all of one character. Ie...every A would be a 9. I thought RC4 would do the trick but if you encrypt a string of "0000000000"...you get 10 of the same character back. Any ideas? |
| ||
I thought RC4 would do the trick but if you encrypt a string of "0000000000"...you get 10 of the same character back. Any ideas? Yes, there's something very wrong with your RC4 routine. |
| ||
...every A would be a 9... Maybe it's so simple no-one would think to try cracking it in that way? ;-) |
| ||
Maybe do a simple addition of some kind of counter, perhaps adding the key to itself, and then add this to the current value, so with each character the value changes? |
| ||
Here is my simple encryption method. It probably wouldn't stand up to a decent hacker, but I didn't need it too when I wrote it. To encrypt or decrypt a string you simply need a key which is passed to encrypt() or decrypt(). The encrypted string from toString() is quite large so you might want to use Hex or something else instead of Ascii values to represent it. |
| ||
Yes, there's something very wrong with your RC4 routine. so, this: http://www.blitzbasic.com/codearcs/codearcs.php?code=1711 isn't *truly* rc4 encryption? |
| ||
If you want secury encryption use blockciphers. Even though already mentioned: AES / Rijndael |
| ||
I was actually looking at the IDEA algorithm since it's never been cracked. Has anyone already coded IDEA? A .dll of the algorithm in C++ would be cool too. |
| ||
I was actually looking at the IDEA algorithm since it's never been cracked. The strength of an encryption system is not measured by how often it's been "cracked", but how much it's been under scrutiny. IDEA is fairly new (compared to say DES) and thus has not been under as much scrutiny. Just because someone can't come up with a better than brute force attack today, doesn't mean they can't do it tomorrow. |
| ||
FD, you keep forgetting to put IMO at the end of your posts. :) If I'm not mistaken, IDEA has been around for almost 17 years. I think not being cracked in that amount of time deserves some merit. And just because no one can sprout wings today doesn't mean they can't tomorrow... Now if you can port the IDEA algorithm to BMax...that would be useful. |
| ||
Just because you never heard of IDEA being cracked doesn't mean it hasn't been cracked... |
| ||
Thought I might have a go at a cipher for fun. Seems solid, even with a single character key, and handles your repeating problem quite well (try it with a text file full of the same character) IMHO, nobodies going to spend much time trying to decrypt your media, as other people have already said, there is alot easier ways of nabbing it. *EDIT* Updated code! |
| ||
Thanks REDi i'll mess around with that. Plash, what grade are you in? |