8000 Using SecureRandom instead of Random by Ricardo-Lechuga · Pull Request #277 · sqlcipher/android-database-sqlcipher · GitHub
[go: up one dir, main page]

Skip to content
8000

Using SecureRandom instead of Random #277

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

Closed
wants to merge 1 commit into from

Conversation

Ricardo-Lechuga
Copy link

Random class should never be used, because of security issues:

From http://docs.oracle.com/javase/6/docs/api/java/util/Random.html:

"An instance of this class is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula. (See Donald Knuth, The Art of Computer Programming, Volume 3, Section 3.2.1.)"

More info:

https://static.aminer.org/pdf/PDF/000/211/835/secret_linear_congruential_generators_are_not_cryptographically_secure.pdf

@developernotes
Copy link
Member

Hi @Ricardo-Lechuga

Thank you for your interest in SQLCipher for Android. The usage of random in this case does not apply to any cryptographic operation, but rather to get a random distribution on whether to log the timing for a query. The actual logging is suppressed in SQLCipher. We have decided to remove the log timing function from the source. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0