An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6

Lecture



In this article we present an improved version of the RC6 block-cipher algorithm (rc6_en - an improved version of RC6), which is a symmetric encryption algorithm designed for 256-bit blocks of plain text. RC6 uses four (w-bit) registers to store the plaintext and for data-dependent rotations [2, 3], but this extended version (RC6_En) uses eight (w-bit) registers, which helps improve performance as well as increase security. Its distinctive feature includes a two-variable algebraic expression modulo 2w
and 2 Box-Type operations, Box-Type I and Box-Type II. Each Box-Type operation uses two (w-bit) registers. Box-Type I works the same as the two registers (A and B or C and D) in RC6, but in Box-Type II the bitwise XOR is replaced by integer addition modulo 2w, which is used in Box-Type I, and vice versa; this improves diffusion in each round. This extended version requires 2r + 4 additional round keys, and each round key is used twice to encrypt the file. This improved version
performs better compared to RC5 [4, 5] and RC6 [2, 3] when the file size is larger.


In cryptography, symmetric-key encryption is typically used to ensure data integrity.
Symmetric-key encryption code can be divided into block and stream types.

RC6 is a symmetric-key block cipher derived from RC5. It was designed by Ron Rivest, Matt Robshaw,
Ray Sidney and Yiqun Lisa Yin to meet the requirements of the Advanced Encryption Standard (AES) competition.
The algorithm was one of the five finalists, and was also submitted to the NESSIE and CRYPTREC projects.
It is a proprietary algorithm, patented by RSA Security [10].


RC6 details: Like RC5, RC6 is a fully parameterised family of encryption algorithms. A version of RC6 is more precisely specified as RC6-w / r / b, where the word size is w bits, the encryption consists of a non-negative number of rounds r, and
b denotes the length of the encryption key in bytes. Since the AES submission targets w = 32 and r = 20, we
will use RC6 as shorthand for such versions. If the text assumes any other value of w or r,
the parameter values will be given as RC6-w / r. Of particular significance for AES will be versions of RC6 with
16-, 24- and 32-byte keys. For all variants, RC6-w / r / b operates on blocks of four w-bit words, using the following
basic operations.

The operations used in RC6 are defined as follows.

  • A + B integer addition modulo 2w
  • A - B integer subtraction modulo 2w A⊕B bitwise exclusive-OR of w-bit words
  • A * B integer multiplication modulo 2w
  • A<<< B rotation of the w-bit word A to the left by the amount given by the low-order lg w bits of B
  • A>>> B rotation of the w-bit word A to the right by the amount given by the low-order lg w bits of B
  • f (x) = x (2x + 1) mod 2w RC6 is very similar to RC5 in structure, using data-dependent rotations, addition modulo 2w and XOR operations; in fact RC6 can be viewed as interleaving two parallel RC5 encryption processes.


However, RC6 does use an additional multiplication operation not present in RC5, to make the rotation amount depend on every bit in the word rather than only a few of the least significant bits. The base-two logarithm of w will be denoted lg w [10].


Encryption and decryption:

An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6


Figure 1: Block cipher


RC6 RC6 operates on four w-bit registers A, B, C, D, which hold the original input plaintext, as well as the output
ciphertext at the end of encryption. The first byte of the plaintext or ciphertext is placed in the least significant byte
of A, and the last byte of the plaintext or ciphertext is placed in the most significant byte of D. Pseudocode
for encryption and decryption is given below; first we load the plaintext into registers A, B, C, D, and then apply these
operations to encrypt the plaintext.


Encryption using RC6-w / r / b
Input
: the plaintext is stored in four w-bit input registers A, B, C, D. r denotes the number of rounds and there are 2r + 4 w-bit
round keys S [0, 1, ..., 2r + 3]
Output: the ciphertext will be stored in A, B, C, D


An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6
The operation (A, B, C, D) = (B, C, D, A) denotes the parallel assignment of the values on the right to the registers on the left.
The round-key generation algorithm is described below, in the section on the proposed system. After applying these operations
to registers A, B, C, D, the plaintext is transformed into ciphertext, and we store it in some file, which is called the encrypted file. Now, to decrypt the ciphertext, load this ciphertext
into registers A, B, C, D and then apply these operations to transform the ciphertext into plaintext.


Decryption using RC6-w / r / b
Input
: the ciphertext is stored in four w-bit input registers A, B, C, D. r denotes the number of rounds and there are 2r + 4 w-bit round keys S [0, 1 , ..., 2r + 3]
Output: the plaintext will be stored in A, B, C, D


An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6
This algorithm uses integer subtraction modulo 2w and right rotation of the registers to recover the plaintext; it performs the inverse operations on the registers.

The computer era has arrived, and every day we need new technologies that deliver better results and consume less
time, while also providing a high level of security. Therefore, taking these changing requirements into account,

Vikas Tyagi, Shrinivas Singh propose RC6_En (an improved version of RC6), a symmetric block-cipher encryption algorithm that helps improve the performance of the older version as well as provide better security for the confidentiality of the plaintext.


Features of the proposed RC6_En system:
Like RC5 and RC6, this extended version (RC6_En) is a symmetric-key block cipher that uses data-dependent rotations, modular addition and XOR operations.
RC6_En operates with a block size of 256 bits, a key size of (128, 192 or 256 bits) and 20 rounds. RC6_En operates with
an input block size of eight words (plaintext) and an output block size of eight words (ciphertext). This means that it is a word-oriented algorithm.


Algorithm:
This extended version (RC6_En) is more precisely defined as RC6_En-w / r / b in this section. Where

w: the word size in bits,
r: a non-negative number of rounds, r and
b: the encryption key length in bytes.


The operations used in RC6_En are defined as follows.

  • A + B integer addition modulo 2w
  • A - B integer subtraction modulo 2w
  • A⊕B bitwise exclusive-OR of w-bit words
  • A * B integer multiplication modulo 2w
  • A<<< B rotation of the w-bit word A to the left by the amount given by the low-order lg w bits of B
  • A>>> B rotation of the w-bit word A to the right by the amount given by the low-order lg w bits of B
  • f (A, B) = (A2 + B2 - AB - 7) mod 2w, an algebraic expression with two variables.
  • (A, B, C, D, E, F, G, H) = (B, C, D, E, F, G, H, A) parallel assignment


The operation of RC6_En is illustrated in Figure 2; in this figure two types of box are used, Box-Type I & Box-Type II, working in parallel. Box-Type II swaps the integer addition modulo 2w and the bitwise exclusive-OR used in Box-Type I, which
increases the diffusion in each round. RC6_En also uses the two-variable algebraic expression f (x, y) = (x2 + y2 - xy - 7) mod 2w, which takes 2 inputs (shown by the green line in Fig. 1), and the output of this function is then used in the bitwise integer addition modulo 2w with exclusive-OR and the other registers in Box-Type I and Box-Type II, preceded by a left rotation. This leads to security in each round. RC6_En uses only 2r + 4 additional round keys, the same as RC6, and uses each round key twice, once in Box-Type I and once in Box-Type II. Using the same key in both box types does not compromise security, but it reduces the effort
required to generate the round keys.


RC6_En consists mainly of 3 algorithms: key expansion, encryption and decryption.


The encryption and decryption algorithms use the basic operations described above in this section. In the encryption algorithm the plaintext will be stored in 8 registers (A through H), and then the steps of the encryption algorithm (described below) are performed to obtain the ciphertext in these registers. In the decryption algorithm we will store the ciphertext in these registers, and then perform the steps of the decryption algorithm (described below) to obtain the plaintext.

An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6


Figure 2: Key-expansion algorithm of the RC6_En block cipher


The key schedule for RC6_En-w / r / b is the same as the RC6 key schedule. The user supplies a key of b bytes, copies the secret key K [0 ... b-1] into the word array L [0..c-1] of c = ceil (b / u), where u = w / 8, in reverse order. In other words, we fill L,
using u consecutive key bytes of K. Any unfilled byte positions in L are zeroed. In the case where b = c = 0, set c = 1 and L = 0. The number of w-bit words that will be generated for the additive round keys is (2r + 4), and they
are stored in the array S [0 , ..., 2r + 3].
The magic constants Pw and Qw are defined for an arbitrary w as follows:
Pw = Odd ((e -1) 2w) (1)
Qw = Odd ((v - 1) 2w) (2)


Where e is the base of the natural logarithm (e = 2.718281828459), and v is the golden ratio (v = 1.618033988749). Odd
(x) is the odd integer nearest to x [11].


Table 1 shows these magic constants in hexadecimal form using
several values of w, which are calculated using the above
expressions (1) and (2).
Table 1. Values of the magic constants Pw and Qw [11]

An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6

The magic constants play a vital role in round-key generation. The Key-Expansion algorithm can be used to
generate any number of round keys.


Input: a byte key b, which is pre-loaded into the word array c L [0,1,…, c-1], r denotes the number of rounds.
Output: 2r + 4 w-bit round keys S [0,1,…, 2r + 2,2r + 3].

An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6


Encryption algorithm:
input: plaintext stored in eight w-bit registers A, B, C, D, E, F, G and H. r denotes the number of rounds and there are 2r + 4 w-bit
round keys, stored in S [0,1,…, 2r + 2,2r + 3].
Output: the ciphertext will be stored in these eight w-bit registers A, B, C, D, E, F, G and H.


Procedure:
B = B + S
An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6


Decryption algorithm:
Input: the ciphertext is stored in eight w-bit registers A, B, C, D, E, F, G and H. r denotes the number of rounds and there are 2r + 4 w-bit
round keys, stored in S [0,1,…, 2r + 2 , 2r + 3].
Output: the plaintext will be stored in these eight w-bit registers A, B, C, D, E, F, G and H.

An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6


PARAMETRIC COMPARISON


Table 2 summarises the comparison of RC5, RC6 and
RC6_En for various design parameters, such as
word size, block size, number of rounds and secret-key size
[11 ] [12].
Table 2.

An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6
An Improvement to the RC6 Block Cipher (RC6_EN) and a Comparison with RC5 and RC6


IMPLEMENTATION ISSUE


Unlike many other encryption algorithms, the RC6_En block cipher does not use lookup tables during encryption. This
means that the code and data can easily fit into today's on-chip cache memory, and generally do so with
room to spare. The RC6_En block cipher uses a (2r +4) key-word schedule and a minimum of extra memory; to
compute this (2r + 4) word schedule, the key-setup process requires little more than an auxiliary array
roughly the same size as the key supplied by the user. Moreover, since the key schedule consists of only (2r + 4) words, it is possible to precompute and store the key schedules for hundreds of keys. Switching to one of these keys
then requires only switching a pointer to the corresponding key schedule,
which provides key flexibility [11].


The two-variable algebraic function is aimed at providing complex diffusion, thereby increasing the probability that
simple differentials will corrupt the rotation amount much earlier than is achieved with RC5. The transformed values of B and F are used to modify registers A and E, and conversely, the transformed values of D and H are used to modify registers C and G, nonlinearly increasing.
The variable rotation amount, by means of the bit-transformation function values, plays a vital role in complicating both linear and differential cryptanalysis.


CONCLUSION

This article presents an improved version of the RC6 block-cipher algorithm (RC6_En). It has a new architecture and
implementation, such that it encrypts and decrypts a data block size of 256 bits per cycle.
RC6_En also meets the requirements of the Advanced Encryption Standards (AES) and the goals of computer-security system designers. Thus, this improved version of RC6 (RC6_En) is a fast and secure block-cipher algorithm. It offers good performance and high security.

References

  1. W. Stallings, «Cryptography and Network Security: Principles and Practice», Prentice-Hall, New Jersey, 1999.
  2. Ronald L. Rivest, MJB Robshaw, R. Sidney and YLYin, The RC6 TM Block Cipher, MIT Laboratory for Computer Science, 545 Technology Square, Cambridge, MA 02139, version 1.1 - August 20, 1998. Available at: http://people.csail.mit.edu/rivest/Rc6.pdf
  3. «RC6® Block Cipher» http: // www.rsa.com/rsalabs/node.asp?id=2512
  4. Ronald L. Rivest, «The RC5 Encryption Algorithm», Dr Dobb's Journal, Vol. 226, pp. 146-148, January 1995.
  5. Vikas Tyagi et al., Journal of Global Research in Computer Science, 3 (4), April 2012, pp. 39-43
  6. Ronald L. Rivest, The RC5 Encryption Algorithm, MIT Laboratory for Computer Science, 545 Technology Square, Cambridge, MA 02139 (revised March 20, 1997). Available at: httu: //theory.lcs.mit.cdu/-rivest/Rivest-rc5rev.pdf
  7. Gil-Ho Kim, Jong-Nam Kim, Gyeong-Yeon Cho, «An Improved RC6 Algorithm with the Same Structure of Encryption and Decryption» ISBN 978-89-5519-139-4,
  8. vol.: 02, ICACT 2009, IEEE «Report on the Development of the Advanced Encryption Standard (AES)».
  9. http://csrc.nist.gov/encryption/aes/round2/r2report.pdf «New European Schemes for Signatures, Integrity and Encryption» https://cosic.esat.kuleuven.be/nessie
  10. «Cryptography Research and Evaluation Committees» http://www.cryptrec.go.jp/english/about.html
  11. Abdel Hamid M. Ragab, Nabil A. Ismail, Senior Member IEEE, and Osama S. Farag Allah, «Enhancements and Implementation of RC6TM Block Cipher for Data Security», IEEE Catalogue No. 01 CH37239-0-7803-7101-1/01 © 2001 IEEE.
  12. Asma Belhadj Mohamed, Ghada Zaibi, Abdennaser Kachouri, «IMPLEMENTATION OF RC5 AND RC6 BLOCK CIPHERS ON DIGITAL IMAGES», 978-1-4577-0411-6/ 11 © 2011 IEEE
  13. W. Stallings, «Network and Internetwork Security: Principles and Practice», Prentice-Hall, New Jersey, 1995.

See also

  • RC6
  • RC5
  • RC4 (ARC4 or ARCFOUR (alleged RC4))
created: 2020-11-12
updated: 2026-03-09
210



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Information security, Cryptographic ciphers"

Terms: Information security, Cryptographic ciphers