A2 Encryption Algorithm 

 

Here is a short description of A2 encryption algorithm, for more information follow the links on the bottom of this page.

A2 is a unique approach to the problem of protecting data with encryption. This algorithm is much different from other algorithms available now. The difference is how the key is used during encryption; classically "data is encrypted under the key K", for A2 more suitable is to say, "data is encrypted according to the key K". There is more than a linguistic difference, "according to the key" means that the key have some deterministic rule in encryption process. A2 use the key as an active component of algorithm, not as a passive constant that is somehow glued with the plaintext. To illustrate this; classic way of key using is: Plaintext + Key = Ciphertext; A2 propose Key(Plaintext)=Ciphertext.

Imagine you have 10 different encryption algorithms and you need to encrypt a certain data. First thing you should do is to choose one of the algorithms, second to chose the key and finally to encrypt the data.

This is A2 approach to the encryption problem. A2 is not an encryption algorithm in classical sense of the term; it is a template that should be upgraded to an active level according to the key. So A2 can be viewed as a family of algorithms.

S-boxes are rejected because there is no exact theory about generating S-boxes in order to be "secure for cryptography use". Because this algorithm must require as less as possible memory space, usage of "random and cryptographically secure arrays bits" as an initialization for any variable is rejected. This algorithm should be fast, as possible, so low time-consuming operations are used in its design. The way the key is used is the main-stone of A2.

The main innovation in A2 is AUKP. Here is a simple example for AUKP:

Consider that: Op is a set of operations { XOR, AND, OR, ADDITION } denoted as ^, &, |, + and considered to be first, second, third and forth operation. You need to encrypt some message according to a given key. Let the message be {1012,127} and the key {{1,3,4,2},{513,723,32,184}}. Now the encryption:

  1. input block is divided into two parts L and R;
  2. 4 round Feistel network is run.
    1. R=R^(L Op[1] Key[1]); swap R, L
    2. R=R^(L Op[2] Key[2]); swap R, L
    3. R=R^(L Op[3] Key[3]); swap R, L
    4. R=R^(L Op[4] Key[4]);
  3. Now the R and L are rearranged to form the block of ciphertext.

 Using the algorithm just described and the example values the process goes as follow:

  1. L=1012, R=127
  2. The network
    1. R=127^(1012^513)=394; R=1012; L=394;
    2. R=1012^(394|723)=47; R=394; L=47;
    3. R=394^(47+32)=453; R=47; L=453;
    4. R=47^(453&184)=169; R=169; L=453;
  3. The ciphertext of {1012,127} is {169,453} according to key {{1,3,4,2},{513,723,32,184}}.

Decryption is same as encryption, only the use of key is inverted.

This is a very simple implementation of AUKP principle,(This principle is very similar with VFT). The difference between this approach and the classical one is obvious; the Feistel network is completely the same: R=R^f(L,k); the difference appear in f(L,k). A2 use complex key consist of {{operation_determining component},{classic key}}. The first component of the key is called scenery because it determinate the operations that will be used in each function, the second part have a rule of classic key.

A variant of this approach is used in RC5 design. RC5 use the key to drive the rotations that are the main part of the cipher. It is interesting that RC5 is considered to be very secure because of this property, this is very simple cipher but key driven rotations makes it secure. This is the only algorithm mentioned in "Applied Cryptography" that uses key driven transformations.

Another algorithm that has certain similarities with A2 is CRAB (more correctly A2 has with CRAB). CRAB use a different function in every round (the famous FGHI set, used in MD5; A2 use it too), it also have more sub-blocks, 5 in every round. CRAB main idea is to use techniques from one-way hash functions (CRAB is based on MD5) to make fast and secure algorithm. I have the same idea (I didn’t know about CRAB when Anigma was developed) during Anigma and A2 development; they are based on MEX and VFT.

Here is the documentation about A2:

Thesis (html version)

Thesis (Word Format)

Implementation Manual (html version)

Implementation Manual (Word Format)