Derby allows you to configure a database for encryption when you create it. To do so, you specify dataEncryption=true 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; see Specifying an alternate encryption provider. The default encryption algorithm is DES, but you have the option of specifying an alternate algorithm; see Specifying an alternate encryption algorithm.