/BlockCipherModes

A collection of different block cipher modes, designed to facilitate secure data encryption.

Primary LanguageC++MIT LicenseMIT

BlockCipherModes

tests

A collection of different block cipher modes, designed to facilitate secure data encryption. This library focuses exclusively on providing implementations of block cipher modes and does not include block cipher algorithms or padding functions.

This library also aims to ease the integration of external or 3rd party block cipher functions or methods through the use of callback functions.

Block Cipher Mode vs Block Cipher

A block cipher mode is a technique used in cryptography to encrypt/decrypt data using a block cipher algorithm.

Block ciphers operate on fixed-size blocks of data and produce ciphertext as output. However, when encrypting large amounts of data, block cipher modes are needed to handle multiple blocks securely.

Some common block cipher modes include Electronic Codebook (ECB), Cipher Block Chaining (CBC), Counter (CTR), and Galois/Counter Mode (GCM).

These modes provide different approaches when encrypting and processing multiple blocks of data, ensuring confidentiality and integrity of the encrypted information.

Currently Supported Modes

  • 🟩 - already supported and available (done)
  • 🟨 - will be supported in the future (pending)
  • 🟥 - will not be supported
Mode Name Status
ECB Electronic Codebook 🟥
CBC Cipher Block Chaining 🟩
OFB Output Feedback 🟨
CFB Cipher Feedback 🟩
CTR Counter 🟨
GCM Galois/Counter Mode 🟨

Minimum Requirement(s)

  • Requires C++17 so you need to compile it with the compilation flag -std=c++17.

Learn How To Use The Library

  1. Block Cipher Mode On A Single-Block
  2. Block Cipher Mode On Multi-Block
  3. Block Cipher Mode + Block Cipher : Local Access
  4. Block Cipher Mode + Block Cipher : Global Access