Ok, I use this code to encrypt password with bouncycastle 1.57: Security.insertProviderAt(new BouncyCastleProvider(), 1); RSAPublicKeySpec publicKeySpec = new RSAPublicKeySpec(new BigInteger(n, 16), new BigInteger(e, 16)); PublicKey publicKey = KeyFactory.getInstance("RSA").generatePublic(publicKeySpec); Cipher cipher = Cipher.getInstance("RSA/NONE/NoPadding", "BC"); cipher.init(Cipher.ENCRYPT_MODE, publicKey); byte[] cipherText = cipher.doFinal("joeuser".getBytes("UTF8")); return Base64.encodeBase64String(cipherText);[/code] After, i use this direct url and i have an error on login page :...standAlone=true&j_username=joeuser&j_password=gReYRml7YlMuEQ2... BUT, if i write the password in plain text, this url works : ...standAlone=true&j_username=joeuser&j_password=joeuser Encryption is enabled, so why the plain text version works, and not the encrypted version ? If i turn off encryption, the rest service returns Error: Key generation is off.Maybe i have to use somewhere the attribute 'maxdigits' to build public key ?