Hi Phani,
I can confirm that the java.security package is not supported in GWT.
Keep in mind that GWT is for Ajax application development on the client-side, so all code gets cross-compiled from Java to obfuscated and optimized JavaScript that can run in the browser. Therefore, you are bound by the same browser limitations as any other Ajax framework, hence java.security functionality not being available on the client.
What you could do to solve the unique number generation problem in the code snippet above is have it run on the server and pass back the number to the client through a GWT RPC call or a RequestBuilder callback.
For more information on either technique, check out the GWT docs linked below.
GWT Developer Guide:
Hope that helps,
-Sumit Chandel