In addition to the crypto APIs in the JDK you should look at the Bouncy
Castle libraries: http://www.bouncycastle.org/
You can use Bouncy Castle in conjunction with the JDK crypto APIs to do
almost anything. One thing to note though is that the documentation is
not always that good in the Bouncy Castle library.