nn::crypto::CtrEncryptor

nn::crypto::CtrEncryptor Class

Syntax

template <size_t BlockSize>
class CtrEncryptor : public nn::crypto::Encryptor

Template Arguments

Name Description
BlockSize Block size of the targeted block cipher.

Description

Class for encrypting in CTR mode.

The cipher mode for CTR is as stipulated in NIST SP 800-38A. When implementing this class, use a simple incrementer as the function to increment the counter value.

This class is a template class that has the block size as a template parameter. Use the CtrDecryptor128 type when actually using.

Member Constants

S BLOCK_SIZE const size_t Constant representing the block size.
S IV_SIZE const size_t Constant representing the IV size.
S UNIT_SIZE const size_t Constant representing the processing unit size.

Member Functions

V GetIvSize Gets the IV size.
V GetUnitSize Gets the processing unit size.
V Initialize Initializes encryption.
V Finalize Finalizes encryption in CTR mode.
V Update Encrypts.
V UpdateFinal Finalizes encryption.
S Encrypt Handles batch encryption when in CTR mode.

Class Hierarchy

nn::crypto::CipherMode
  nn::crypto::Encryptor
    nn::crypto::CtrEncryptor

Revision History

2011/10/27
Initial version.

CONFIDENTIAL