Skip to content

An efficient software implementation of the block cipher PRESENT for 8-bit platforms

Notifications You must be signed in to change notification settings

chenyipeng1/PRESENT-C

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PRESENT is an ultra-lightweight block cipher well suitable for extremely constrained environments such as RFID tags and sensor networks [1]. Here we give a fast and compact software implementation of PRESENT. The program is written in plain C, which is easy to be changed to work on various platforms.

This implementation of Present adds decryption interface to the original version of Bo Zhu [2].

License

BSD license

Usage

There are two interfaces:

  1. The full-round encryption function:
    void present_encrypt(const uint8_t *plain, const uint8_t *key, uint8_t *cipher)

Before using this function, the plaintext should have already been placed in the array plain, and the 80-bit secret key should also be arranged at key. After the encryption is done, the ciphertext will be computed and copied into cipher. Please note that the areas identified by plain and cipher can overlap with each other (also key and cipher).

  1. The full-round decryption function:
    void present_decrypt(const uint8_t *cipher, const uint8_t *key, uint8_t *plain)

Before using this function, the ciphertext should have already been placed in the array cipher, and the 80-bit secret key should also be arranged at key. After the encryption is done, the plaintext will be computed and copied into plain. Please note that the areas identified by plain and cipher can overlap with each other (also key and cipher).

References

  1. A. Bogdanov, L. R. Knudsen, G. Leander, C. Paar, A. Poschmann, M. J. B. Robshaw, Y. Seurin and C. Vikkelsoe. PRESENT: An Ultra-Lightweight Block Cipher. CHES 2007.
  2. https://github.com/bozhu/PRESENT-C

About

An efficient software implementation of the block cipher PRESENT for 8-bit platforms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.2%
  • C 2.8%