#SecureRandom is very slow when executed in remote server
1 messages · Page 1 of 1 (latest)
<@&987246964494204979> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
you might be falling victim to not collecting entropy quickly enough
we actually had this problem where I work and had to modify the random source
Do I use normal random?
check out the SO post
You mean the solution?
yeah
I don't get it, what should I do exactly ?
If you want a PRNG, do something like this:
SecureRandom.getInstance("SHA1PRNG");
yeap try starting with this
The problem is: my team doesn't agree on this approach :/ I mean the use of SecureRandom
especially now after having this issue
I can but I have no issue in my local env
I want to test on server, but I'm afraid this will not solve the issue
btw I think the problem is maybe cause of linux
following this answer: https://stackoverflow.com/a/2325109/10000150
What do you think?
the source of the problem is mentioned in many, many replies to that SO, which is the slow default entropy collection on linux machines
you don't have the problem locally because you have a different entropy storage, different sources of it and potentially a different OS with different collection algorithms
I recommend starting with the approved answer
Ahaa
Got it! thank you @fiery dock