LDK encrypt mechanism

  • The LDK encrypt/decrypt functions work using AES128 for blocks of 16 and 32 bytes.
  • In case you encrypt/decrypt a block of 32 bytes, it automatically executes twice the encrypt/decrypt using AES in ECB mode.
  • Basically it executes 2 different calls to the key, one for each block.
  • For all the other sizes (even for multiples of 16) encrypt/decrypt functions apply the AES in CBC-CTS mode + an accelerated remotely key (ARK) to speed up the encryption of big blocks of data (> 32 bytes).