When creating a new database, you must combine the encryptionKey attribute with the create=true and dataEncryption=true attributes.
When you configure an existing unencrypted database for encryption, the encryptionKey attribute must be combined with the dataEncryption=true attribute.
When booting an existing encrypted database, you must also specify the encryptionAlgorithm attribute if the algorithm that was used when the database was created is not the default algorithm.
The default encryption algorithm used by Derby is DES/CBC/NoPadding.
-- create a new encrypted database jdbc:derby:newDB;create=true;dataEncryption=true;encryptionAlgorithm=DES/CBC/NoPadding;encryptionKey=6162636465666768 -- configure an existing unencrypted database for encryption jdbc:derby:salesdb;dataEncryption=true;encryptionKey=6162636465666768 -- boot an encrypted database jdbc:derby:encryptedDB;encryptionKey=6162636465666768