benphp Posted October 17, 2013 Share Posted October 17, 2013 (edited) I wrote a text encryption function that uses a combination of looped base64_encode, mcrypt_encrypt, and random-ish str_replace that produces a fairly meaningless chunk of text. How strong is this encryption? For example, how long would it take for the Chinese government to crack it? Edited October 17, 2013 by benphp Quote Link to comment https://forums.phpfreaks.com/topic/283068-how-strong-is-my-encryption/ Share on other sites More sharing options...
Psycho Posted October 17, 2013 Share Posted October 17, 2013 Probably not long. The fact that you have not provided any code makes me think that the strength of the encryption is dependent upon the method of encryption being unknown to the attacker. That is not how a good encryption process should work - obfuscation is not security. There are plenty of current encryption methods that are currently, for all intents and purposes, uncrackable. Quote Link to comment https://forums.phpfreaks.com/topic/283068-how-strong-is-my-encryption/#findComment-1454352 Share on other sites More sharing options...
requinix Posted October 17, 2013 Share Posted October 17, 2013 The only part of your "encryption" algorithm that could possibly mean anything is the mcrypt_encrypt() stuff. base64_encode() and str_replace() don't make it more secure. Quote Link to comment https://forums.phpfreaks.com/topic/283068-how-strong-is-my-encryption/#findComment-1454353 Share on other sites More sharing options...
adoado Posted October 18, 2013 Share Posted October 18, 2013 Never invent your own encryption methodology. You can disregard that message, sure, but it's not me saying it - it's the professionals. Why? Because security is not a topic where things are obvious (by definition) so a flaw that you or I cannot see may be easily visible when it's analyzed by those who understand it. If you want to ensure security - use known encryption algorithms such as AES. RSA, etc. Experimenting is fine, and definitely worth doing. But never deploy your own solution in practice. Quote Link to comment https://forums.phpfreaks.com/topic/283068-how-strong-is-my-encryption/#findComment-1454384 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.