The following encryption modes exist:

  • C, C++
  • C#
  • Python

Encryption mode

Description

Direct encryption

The direct encryption encrypts or decrypts a sequence with a fixed length (usually 16 bytes) directly in the CmContainer.

Use CmCrypt2 (or CmCrypt for compatibility < 4.30) with the flags CM_CRYPT_DIRECT_...

Indirect encryption

The indirect encryption encrypts the sequence given in CMCRYPT2 InitKey directly in the CmContainer (key derivation). For information on the key derivation see the separate CodeMeter Development Guide section "The CodeMeter Concept | Security by Encryption | Key Derivation - One License Entry - Many Keys."

The result is the input of a key derivation (P1363_KDF2) with SHA-256 hash calculation, returning an output of 32 bytes. The first 16 bytes are taken for the key and the second 16 bytes are taken for the IV (initialization vector) of the indirect en-/decryption. The given sequence is then encrypted or decrypted by the calling driver (like WibuCm32.dll on Windows) using the set mode (see CM_CRYPT_AES_…-flags).

Use CmCrypt2 (or CmCrypt for compatibility < 4.30) with the flags CM_CRYPT_STREAM, CM_CRYPT_AES_... but not CM_CRYPT_AES_ENC_CBC_DIRECT or CM_CRYPT_AES_DEC_CBC_DIRECT

Software encryption

The software encryption encrypts or decrypts sequence without using any CmContainer. This implements standard AES encryption with cipher block chaining (CBC) mode. Two parameters influence the encryption result: the AES key and the initialization vector (IV) (both see CMCRYPT2).

Use CmCrypt2 with the flags CM_CRYPT_AES_ENC_CBC_DIRECT or CM_CRYPT_AES_DEC_CBC_DIRECT.

The software encryption is supported since 4.30 and is implemented in the library part of CodeMeter (dll).

Encryption mode

Description

Direct encryption

The direct encryption encrypts or decrypts a sequence with a fixed length (usually 16 bytes) directly in the CmContainer.

Use CmCrypt2 (or CmCrypt for compatibility < 4.30) with the flags CryptDirect...

Indirect encryption

The indirect encryption using the ExplicitKey Mode encrypts the sequence given in CmCrypt InitKey directly in the CmContainer. The result is the input of a key derivation (P1363_KDF2) with SHA-256 hash calculation, returning an output of 32 bytes. The first 16 bytes are taken for the key and the second 16 bytes are taken for the IV (initialization vector) of the indirect en-/decryption. The given sequence is then encrypted or decrypted by the calling driver (like WibuCm32.dll on Windows) using the set mode (see Aes…-flags).

Use CmCrypt2 (or CmCrypt for compatibility < 4.30) with the flags Stream, Aes... but not AesEncCbcDirect or AesDecCbcDirect.

Software encryption

The software encryption encrypts or decrypts sequence without using any CmContainer. This implements standard AES encryption with cipher bock chaining (CBC) mode. Two parameters influence the encryption result: the AES key and the initialization vector (IV) (both see CmCrypt2). If the sequence to be encrypted is not divisible by 16, the algorithm uses ciphertext stealing (CTS).

Use CmCrypt2 with the flags AesEncCbcDirect or AesDecCbcDirect.

The software encryption is supported since 4.30 and is implemented in the library part of CodeMeter (dll).

 

Encryption mode

Description

Direct encryption

The direct encryption encrypts or decrypts a sequence with a fixed length (usually 16 bytes) directly in the CmContainer.

Use CmCrypt2  with the flags CM_CRYPT_DIRECT_...

Indirect encryption

The indirect encryption encrypts the sequence given in CMCRYPT2 InitKey directly in the CmContainer (key derivation). For information on the key derivation see the separate CodeMeter Development Guide section "The CodeMeter Concept | Security by Encryption | Key Derivation - One License Entry - Many Keys."

The result is the input of a key derivation (P1363_KDF2) with SHA-256 hash calculation, returning an output of 32 bytes. The first 16 bytes are taken for the key and the second 16 bytes are taken for the IV (initialization vector) of the indirect en-/decryption. The given sequence is then encrypted or decrypted by the calling driver (like WibuCm32.dll on Windows) using the set mode (see CM_CRYPT_AES_…-flags).

Use CmCrypt2 with the flags CM_CRYPT_STREAM, CM_CRYPT_AES_... but not CM_CRYPT_AES_ENC_CBC_DIRECT or CM_CRYPT_AES_DEC_CBC_DIRECT

Software encryption

The software encryption encrypts or decrypts sequence without using any CmContainer. This implements standard AES encryption with cipher block chaining (CBC) mode. Two parameters influence the encryption result: the AES key and the initialization vector (IV) (both see CMCRYPT2).

Use CmCrypt2 with the flags CM_CRYPT_AES_ENC_CBC_DIRECT or CM_CRYPT_AES_DEC_CBC_DIRECT.

The software encryption is supported since 4.30 and is implemented in the library part of CodeMeter (dll).