Contents
Navigation
PatiSoftware Other Documents Related Topics

This document describes the QDLPlgBlockCipher class of the QDLPluginEncryptionPS plugin for Xojo/RealStudio. This abstract class defines basic properties and behaviors of an object that ciphers data working on work on blocks of symbols usually of a fixed size.

In cryptography, a block cipher is a deterministic algorithm operating on fixed–length groups of bits, called blocks, with an unvarying transformation that is specified by a symmetric . Block ciphers are important elementary components in the design of many cryptographic protocols, and are widely used to implement encryption of bulk data.

The publication of the cipher by the U.S. National Bureau of Standards (now National Institute of Standards and Technology, NIST) in 1977 was fundamental in the public understanding of modern block cipher design. In the same way, it influenced the academic development of cryptanalytic attacks. Both differential and linear cryptanalysis arose out of studies on the DES design. Today, there is a palette of attack techniques against which a block cipher must be secure, in addition to being robust against brute force attacks. Even a secure block cipher is suitable only for the encryption of a single block under a fixed key. A multitude of modes of operation have been designed to allow their repeated use in a secure way, commonly to achieve the security goals of confidentiality and authenticity. However, block ciphers may also be used as building blocks in other cryptographic protocols, such as universal and pseudo–random number generators (src. Wikipedia).

At time, the QDLPluginEncryptionPS plugin implements a wide spectrum of ciphers based on blocks of symbols: among them, it is possible to find out almost the entire collection of the fifteen ones submitted to the Advanced Encryption Standard process to become the new standard in substitution of the aging predecessor (i.e. , , , etc.). Furthermore, the plugin implements a few well–known and widely used block ciphers such as , and .

If not otherwise stated, any block cipher implemented by the QDLPluginEncryptionPS plugin supports all of the listed below.





Characteristics
Type:Class
Abstract:Yes
Hierarchy:→
Availability:QDLPluginEncryptionPS 1.0 or later
Console Safe

is expected to determine the length, in bits, of the used to encrypt/decrypt the input data. Usually, block ciphers use keys of fixed sizes among them the 128, 192 and 256 being the most frequently used ones. Specifying the property first and then modifying the value of this property will
  • shorten the specified key in case it was longer than the specified bits length
  • pad the specified key with zeroes until the required length is reached if it was shorter than the specified bits length
This will affect the part of the key effectively used into the encryption/decryption process only; the value returned by the property will remain unchanged.
is expected to specify the size, in bits, of a single block of symbols required by the instance in use.
is expected to determine the active mode of operation for the instance in use. In cryptography, a mode of operation is an algorithm that uses a block cipher to provide an information service such as confidentiality or authenticity. A block cipher by itself is only suitable for the secure cryptographic transformation (encryption or decryption) of one fixed–length group of bits called a block. A mode of operation describes how to repeatedly apply a cipher's single–block operation to securely transform amounts of data larger than a block. The plugin provides support for the ECB, CBC and CFB modalities. This property can be set with one of the defined by the class.

Summary
Scope:Public
Availability:QDLPluginEncryptionPS 1.0 or later
represents the Electronic Codebook (ECB) mode. This is the simplest of the encryption modes. The message is divided into blocks, and each block is encrypted separately.
represents the Cipher–Block Chaining (CBC) mode. IBM invented the CBC mode of operation in 1976. In this mode, each block of plaintext is XORed with the previous ciphertext block before being encrypted. This way, each ciphertext block depends on all plaintext blocks processed up to that point. To make each message unique, an initialization vector must be used in the first block. This plugin version does not allow to provide a customized block of initialization: instead, it uses an internal defined one.
represents the Cipher Feedback (CFB) mode. The CFB mode, a close relative of CBC, makes a block cipher into a self–synchronizing stream cipher. Operation is very similar; in particular, CFB decryption is almost identical to CBC encryption performed in reverse.