5 ms·
Consider that SecureRandom is really a facade around multiple providers that can plug in varying implementations. :)
by cromwellian 14y ago
Consider that SecureRandom is really a facade around multiple providers that can plug in varying implementations. :)
- GhotiFish 14y agoah ha! That might of being too big of a hint, good sir.
- deleted 14y ago[deleted]
- somethingnew 14y agoHow about this one? http://xkcd.com/221/ http://xkcd.com/221/
- Jeremysr 14y agoHeh, not knowing Java very well, I scoured the BigInteger docs for quirks and loopholes, then gave up and found your comment. I guess "java.security.SecureRandom" sounded too impregnably secure to be worth looking into.
- mattvanhorn 14y ago...and that you can remove all the existing ones and insert your own.
- spiralpolitik 14y agoYou can't change Providers while running under the SecurityManager he specifies you must use in the rules. SecurityManager.checkSecurityAccess(java.lang.String) is called if you try and mess with the Providers.
- cromwellian 14y agoYou're right, looks like a Timing Attack might be the only solution that satisfies the spirit of the test.
- raylu 14y agoSquareRoot.n is static, so it runs before any code in your main().
- cromwellian 14y agoJava Service Providers (SPI) trigger before main() is run. You can create a SecureRandom() provider, add it to the classpath with SPI, removing other providers.
- harryh 14y agoIf that's really the answer they are looking for then it's a stupid question. Trying to write a timing attack sounds much more interesting.