Giter VIP home page Giter VIP logo

present's Introduction

PRESENT

C implementation of the PRESENT Block Cipher.

Table of Contents

Introduction

PRESENT is a lightweight block cipher algorithm designed in 2007 by Andrey Bogdanov, Lars R. Knudsen, Gregor Leander, Christof Paar, Axel Poschmann, Matthew J. B. Robshaw, Yannick Seurin, and C. Vikkelsoe.

The project was designed mainly for embedded systems but it is suitable to use in any platform.

How to Use

The module could be used by either adding source files directly to the project, or compiling as a static library via pre-included build system.

To build the module as a static library, TYPE tag in the Config.mk file must be chosen as SLIB. Additional source files could be added. The build system detects and adds those file directly to the source tree.

Object files(and assembly files if the ASM_GEN flag is set) and out file are placed to bin folder.

By default, the project has a test main file under the test folder. To adding custom main function, the test_main.c file must be excluded from the source tree.

To build the project, at the project root folder, run:

$ make

By default, make command compile files only when something changes in the source code. To build whole project in any case, run:

$ make rebuild

To remove all generated files, run:

$ make clean

Examples

The project has a test code which could be found under test folder. The code demonstrates encrypt and decrypt operations with text blocks and keys given in appendix I of the article.

Test outputs are placed to bin/test folder. Results could be seen by running test out files.

To build test files, run:

$ make

Configuration

Project configurations grouped under two category; module configurations and build configurations. If the module is not compiled as static library, build configurations are negligible.

Module configurations are found under conf.h file. All options related with modules are documented in that file.

Build configurations are found under Config.mk file. All options related with build system are documented in that file.

Additionally, tools used to build project could be configured via Tools.mk file and build rules could be configured via Rules.mk file.

NOTE: Every compiler has different features and flags. Therefore, Tools.mk and Rules.mk files may have to be rewritten.

License

This project is licensed under the MIT License - see the LICENSE file for details.

See Also

present's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.