News for hackers. Stuff that matters.
Re:Java Puzzle: Square Root by cromwellian on Tuesday March 19, 2013 @09:40PM (#5405018)
Consider that SecureRandom is really a facade around multiple providers that can plug in varying implementations. :)
Re:Java Puzzle: Square Root by somethingnew on Tuesday March 19, 2013 @09:49PM (#5405062)
How about this one? http://xkcd.com/221/
Re:Java Puzzle: Square Root by Jeremysr on Tuesday March 19, 2013 @10:01PM (#5405116)
Heh, 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.
Re:Java Puzzle: Square Root by harryh on Wednesday March 20, 2013 @09:56PM (#5412267)
If 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.

Re:Java Puzzle: Square Root by raylu on Tuesday March 19, 2013 @11:14PM (#5405392)
SquareRoot.n is static, so it runs before any code in your main().
Re:Java Puzzle: Square Root by cromwellian on Tuesday March 19, 2013 @11:18PM (#5405404)
Java Service Providers (SPI) trigger before main() is run. You can create a SecureRandom() provider, add it to the classpath with SPI, removing other providers.
Re:Java Puzzle: Square Root by GhotiFish on Tuesday March 19, 2013 @09:46PM (#5405049)
ah ha! That might of being too big of a hint, good sir.
Re:Java Puzzle: Square Root by mattvanhorn on Tuesday March 19, 2013 @11:01PM (#5405337)
...and that you can remove all the existing ones and insert your own.
Re:Java Puzzle: Square Root by spiralpolitik on Tuesday March 19, 2013 @11:57PM (#5405547)
You 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.

Re:Java Puzzle: Square Root by cromwellian on Wednesday March 20, 2013 @02:06AM (#5405881)
You're right, looks like a Timing Attack might be the only solution that satisfies the spirit of the test.