0

has anyone used custom encryption algorithm(s) for encrypting data in ecryptfs?

Custom Algorithm means any other crypto library/algorithm than standard kernel crypto APIs used by ecryptfs?

Yogesh Rathi
  • 6,331
  • 4
  • 51
  • 81

2 Answers2

1

I think I found something. Ecryptfs uses ciphers from native kernel crypto library for encryption/decryption operations. More specifically, it uses the generic "struct crypto_ablkcipher" (a kind of asynchronous block cipher) of crypto library. This shows strong coupling of crypto lib with ecryptfs.

So, if you want to use custom algorithm, then you may have to write one in kernel that should adapt to the interface of crypto library. If you need more information on this, please check How can i add more algorithm in cryptoAPI in linux

Community
  • 1
  • 1
0

The list of available algorithms is hardcoded:

static struct cipher_descriptor {
    char *name;
    uint32_t blocksize;
    uint32_t min_keysize;
    uint32_t max_keysize;
} cipher_descriptors[] = {
    {"aes", 16, 16, 32},
    {"blowfish", 8, 16, 56},
    {"des3_ede", 8, 24, 24},
    {"twofish", 16, 16, 32},
    {"cast6", 16, 16, 32},
    {"cast5", 8, 5, 16},
    {NULL, 0, 0, 0}
};
double-beep
  • 5,031
  • 17
  • 33
  • 41
zenbooster
  • 29
  • 5