Re:Can you break my home rolled encryption?
by quelsolaar on Saturday October 26, 2013 @03:00AM
(#6616640)
Here is a C implementation I just banged together.
http://www.quelsolaar.com/crypto_test.c
(yet another possible source of embarrassment)
Ill try to put together a "test" for the algorithm.
Re:Can you break my home rolled encryption?
by sillysaurus2 on Saturday October 26, 2013 @04:53AM
(#6616802)
Your key is based on an insecure RNG. It's trivial to reconstruct the seed and thereby recover the key.
Your key isn't random. It's the same every time.
This example also isn't communicating any secrets, so it's not really cryptography.
Re:Can you break my home rolled encryption?
by smcl on Saturday October 26, 2013 @05:36AM
(#6616842)
I think that the author is more interested in the design of the encryption algorithm rather than the specifics of the reference implementation provided. So yeah a dodgy prng was used but is there anything wrong otherwise - i.e. something inside the algorithm itself that reduces its efficacy and makes it vulnerable.
Re:Can you break my home rolled encryption?
by sillysaurus2 on Saturday October 26, 2013 @06:06AM
(#6616891)
Well, if they would provide an actual implementation rather than a reference implementation, then I would break it. Breaking cryptography often depends on breaking implementations, not breaking the underlying theory. That's why AES-CTR is theoretically secure but so deviously hard to actually implement.
Re:Can you break my home rolled encryption?
by quelsolaar on Saturday October 26, 2013 @06:19AM
(#6616920)
I note in the comments that the random number generator is not secure in any way. Its just a handy thing for testing, not something you would use in real life.
Re:Can you break my home rolled encryption?
by sillysaurus2 on Saturday October 26, 2013 @06:34AM
(#6616945)
Ok, well, if you ever actually implement your theory, then I would love to break it for you. Shoot me an email (sillysaurus2 at gmail) if you ever do.
Re:Can you break my home rolled encryption?
by ruchir on Saturday October 26, 2013 @06:35AM
(#6616950)
I like the idea of mutating both the output and the key. You are using it for a single pass over the length of the data. You could use the final key as input to another round of crypto. Repeating it for a number of rounds would keep it deterministic, but increase the computational load of an attacker and create an even distribution of input to output. Ah, problem could be that decryption would need the final key, not the one you started with, if so it would be good for a 1-time hash. So the key idea for the crypto is the nuking of the part of the key that was just used for the xor. Thing that concerns me is if the attacker has access to your crypto in binary form, he could run it again and again on different inputs (data,key) to infer its structure - you'd want to slow him down.
* If you delivered a complete implementation in a popular language like C, Python, or Ruby, rather than publishing pseudocode that may or may not be interpreted correctly by error-prone humans
* If there was a clear goal. "Find a weakness" is vague; "Recover the missing plaintext from this 1MB message" is specific.