You configure a Derby database for encryption when you create the database by specifying the dataEncryption=true attribute on the connection URL.
The Java Runtime Environment (JRE) determines the default encryption provider, as follows:
You have the option of specifying an alternate encryption provider. The default encryption algorithm is DES, but you have the option of specifying an alternate algorithm as well. See Specifying an alternate encryption provider