With Java 1.7 the key size is limited due to US export laws: you can find
here an example.
To fix this problem, you have to
- download the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files from Oracle
- copy the file in the standard place for JCE jurisdiction policy JAR files
But where is this "standard place" in MacOS/X ?
If you have installed the Oracle official JDK,
cd /tmp
unzip $HOME/Downloads/UnlimitedJCEPolicyJDK7.zip
sudo cp /tmp/UnlimitedJCEPolicy/*.jar /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/security/