If a streaming cipher is specified for data encryption when creating a database, a java.lang.ArithmeticException is thrown.
The reason is that the cipher block size is used in a division as the divisor and it has value 0 (zero).
Derby should either inform that streaming ciphers are not supported, or be able to use them.
A quick hack indicates Derby is capable of using streaming ciphers. I was able to create an encrypted database using the ARCFOUR (RC4) algorithm, close Derby and boot the database and fetch the data in the database again. This required changes in only two places (LogToFile and FileLogger), but the issue must be further investigated.