Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 2.88 KB

README.md

File metadata and controls

18 lines (13 loc) · 2.88 KB

The Lightweight Block Cipher PRESENT

As we are aware, ciphers have come a long way, with the block cipher AES being the go-to algorithm for encrypting sensitive data at the moment. Although it is thought to be secure until the invention of the quantum computers, it is unsuitable for implementation on constrained environments. Furthermore, technology has evolved in such a way that smart devices are evermore present in our everyday lives. They have limited resources, which implies that they need a fast and light encryption algorithm, which will be able to provide at least short term security. The trade-off between speed and security is defined as the "lightweightness" of the algorithm [1]. This brought on the need for a new cipher, which could be implemented on these devices. As a response, in 2007, the Ultra-Lightweight Block Cipher PRESENT was first published by Andrey Bogdanov et al [2].

This repository hold a C implementation of PRESENT implemented for a student project as part of the Cryptohraphy course.

Cipher Description

PRESENT is a block cipher based on a SP-network and consists of 31 rounds. It encrypts 64-bit blocks with a key with a length of 80 or 128 bits [2]. This repository holds the 80-bit key implementation, which is shown in the figure below. This is satisfactory for low-security applications typically required in tag-based deployments. Each round is comprised of 3 distinct functions performed in the following order:

  1. addRoundKey()
  2. sBoxLayer()
  3. pLayer()

The addRoundKey() function XORs the output of the previous round (the plaintext in the first round) with the round key for the current round, generated by the Key Schedule. The Key Schedule reduces the 80-bit key to 64-bit round keys. The sBoxLayer() function divides the result of the addRoundKey() function into 4-bit blocks and runs them through 16 instances of the same S-Box. Next, the pLayer() function permutes the output from the S-Boxes according to a predefined table. Finally, when all 31 rounds have finished, the output is once more XORed with a round key for the purpose of key whitening. For a more detailed explanation, refer to [2].

present

References

  1. Carsten Rolfes, Axel Poschmann, Gregor Leander, and Christof Paar. Ultra-Lightweight Implementations for Smart Devices - Security for 1000 Gate Equivalents. Web page retrieved 2015-12-25 at http://lightweightcrypto.org/present/present_cardis2008.pdf.
  2. Andrey Bogdanov, Lars R. Knudsen, Gregor Leander, Christof Paar, Axel Poschmann, Matthew J. B. Robshaw, Yannick Seurin, and C. Vikkelsoe. PRESENT: An Ultra-Lightweight Block Cipher. Web page retrieved 2015-12-25 at http://www.ist-ubisecsens.org/publications/present_ches2007.pdf.