-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible Vulnerabilities #4
Comments
Hi! I should also mention that I am no cryptographer, so most of my knowledge about encryption is from Wikipedia and other encryption articles on the internet. Please correct me if any of my statements are wrong!
Good catch, I was not aware that there was a difference in this aspect. While I do not believe SHA256 in itself is a weakness, too short passwords I will investigate this further. The change is quite small, but I am afraid this
I am aware that the application cannot detect if the encrypted message has been I think the simplicity outweighs the burden of having to occasionally resend an
This is absolutely my fault, I misunderstood how the IV actually worked. Although this appends more bytes to the message, this actually improves the |
Thank your for your response! I'll add a few thoughts:
This is true, it might be wise to add a "version" byte to the front for the future. It might also be possible to add some kind of fallback mode that retries with the old key derivation method when decryption with the new one fails.
It is true that SHA256 is not broken itself, but it is still a weakness in the way you are using it. Average passwords with SHA2556 are very much in reach of being cracked with cheap hardware these days. Using an computationally expensive key derivation function to slow down attackers by, say, 100 000x will increase protection from password cracking for all users, even the ones with short passwords. The length of "too short" passwords will also only rise over time, as hardware advances.
This is true. You could truncate the HMAC as a workaround, it would still be better than nothing. I think being able to definitively say a message is valid or not valid is also valuable. The cryptographer in me hates the idea of using CBC without very strong message authentication, but for human-to-human communication, it's probably tolerable. |
I saw this in f-droid and felt like checking your crypto code.
I'm not familiar with the Java crypto libraries, but from what I can tell, it has a number of crypto issues:
The text was updated successfully, but these errors were encountered: