Giter VIP home page Giter VIP logo

pyascon's Introduction

Python implementation of Ascon

This is a Python3 implementation of Ascon v1.2, an authenticated cipher and hash function.

https://github.com/meichlseder/pyascon

Ascon

Ascon is a family of authenticated encryption (AEAD) and hashing algorithms designed to be lightweight and easy to implement, even with added countermeasures against side-channel attacks. It was designed by a team of cryptographers from Graz University of Technology, Infineon Technologies, and Radboud University: Christoph Dobraunig, Maria Eichlseder, Florian Mendel, and Martin Schläffer.

Ascon has been selected as the primary choice for lightweight authenticated encryption in the final portfolio of the CAESAR competition (2014–2019) and is currently competing in the NIST Lightweight Cryptography competition (2019–).

Find more information, including the specification and more implementations here:

https://ascon.iaik.tugraz.at/

Algorithms

This is a simple reference implementation of Ascon v1.2 as submitted to the NIST LWC competition that includes

  • Three family members for authenticated encryption:

    • Ascon-128
    • Ascon-128a
    • Ascon-80pq
  • Four hashing algorithms: hash function variants with fixed 256-bit (Hash) or variable (Xof) output lengths

    • Ascon-Hash
    • Ascon-Hasha
    • Ascon-Xof
    • Ascon-Xofa

Files

  • ascon.py: Implements the seven family members as well as the underlying permutation:

    • ascon_encryption()/ascon_decrypt() for authenticated encryption,
    • ascon_hash() for hashing,
    • ascon_permutation for the underlying permutation.

    By default, prints the results of encrypting and hashing some example strings.

    • debug = True|False: Set this variable to print the intermediate state after each phase of the encryption/hashing process.
    • debugpermutation = True|False: Set this variable to print the intermediate state after each step of the permutation's round function.
  • genkat.py: Produces result files for the Known Answer Tests (KATs) defined for the NIST LWC competition (call for algorithms, test vector generation code).

    Call with the name of the target algorithm (see above) as first parameter, default is Ascon-128.

    Results are written to

    • LWC_AEAD_KAT_{klenbits}_{nlenbits}.txt for authenticated encryption,
    • LWC_HASH_KAT_{hlenbits}.txt for hashing.

pyascon's People

Contributors

meichlseder 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.