Skip to content
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

java.lang.SecurityException: JVM does not provide a strong secure random number generator #184

Open
madanprabhud opened this issue Mar 10, 2023 · 2 comments
Assignees

Comments

@madanprabhud
Copy link

java.lang.SecurityException: JVM does not provide a strong secure random number generator
at dev.paseto.jpaseto.impl.DefaultPasetoV1LocalBuilder.compact(DefaultPasetoV1LocalBuilder.java:61)

Caused by: java.security.NoSuchAlgorithmException: Null/empty securerandom.strongAlgorithms Security Property
at java.security.SecureRandom.getInstanceStrong(SecureRandom.java:623)
at dev.paseto.jpaseto.impl.DefaultPasetoV1LocalBuilder.compact(DefaultPasetoV1LocalBuilder.java:59)
... 132 more

Java -- Version:
java version "1.8.0_341"
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
Red Hat Enterprise Linux Server release 7.9 (Maipo)
haveged 1.9.13

@madanprabhud
Copy link
Author

The same code is working fine with jdk1.8.0_301

It's not working in jdk1.8.0_341

@bdemers
Copy link
Contributor

bdemers commented Mar 10, 2023

It sounds like this might be a JVM or a VM issue.
Have you tried this with a newer version of Java 8?

Are you running this inside a VM that doesn't have a secure random device?

Something like this:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-guest_virtual_machine_device_configuration-random_number_generator_device

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

No branches or pull requests

2 participants