# Specifying an alternate encryption algorithm

Derby supports the following encryption algorithms.

- DES (the default)
- DESede (also known as triple DES)
- Any encryption algorithm that fulfills the following requirements:
  - It is symmetric
  - It is a block cipher, with a block size of 8 bytes
  - It uses the NoPadding padding scheme
  - Its secret key can be represented as an arbitrary byte array
  - It requires exactly one initialization parameter, an initialization vector of type javax.crypto.spec.IvParameterSpec
  - It can use javax.crypto.spec.SecretKeySpec to represent its key

  For example, the algorithm Blowfish implemented in the Sun JCE package fulfills these requirements.

By Java convention, an encryption algorithm is specified like this:

    algorithmName/feedbackMode/padding

The only feedback modes allowed are:

- CBC
- CFB
- ECB
- OFB

By default, Derby uses the DES algorithm of DES/CBC/NoPadding.

Specify an alternate encryption algorithm when you create a database with the encryptionAlgorithm=algorithm attribute. If the algorithm you specify is not supported by the provider you have specified, Derby throws an exception.

Parent topic: Creating the boot password
Related concepts
Encrypting databases on creation
Specifying an alternate encryption provider