samvartaka / keyak-python

This repository contains a pure Python implementation of Keyak v2. This implementation is based on the pure Python FIPS202 and C++ Keyak v2 implementations by the Keccak, Keyak and Ketje Teams.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keyak v2 Pure Python Implementation

MIT License (MIT)

Copyright (c) 2015, Jos Wetzels and Wouter Bokslag

This repository contains a pure Python implementation of Keyak v2 as specified here. This implementation is based on the pure Python FIPS202 and C++ Keyak v2 implementations by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni, Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer.

For an introductory overview of the algorithms, primitives and design components underlying the Keyak encryption scheme see our accompanying document Sponges and Engines: An introduction to Keccak and Keyak (arXiv:1510.02856) which seeks to condense available literature in order to provide a "bird's eye view" of the matter. For in-depth specifications of Keccak and Keyak (including design considerations and security proofs) see their respective reference documents:

Code structure

  • keyak.py contains the top-level Keyak object definition and the five named instances (River, Lake, Sea, Ocean and Lunar Keyak) as child classes.

  • motorist.py contains the object definition of the motorist mode of operation which can be used with a variable underlying primitive.

  • keccakp.py contains the KeccakP object definition as a child class of (a modified version of) the KeccakF object as defined in the FIPS202 pure Python implementation by the Keccak team.

  • utils.py contains several helper functions (mostly relating to string streaming functionality).

  • sanity_test.py contains sanity tests for the KeccakF and KeccakP permutations as well as sanity tests for all named Keyak instances as derived from sanity tests contained in the KeccakTools package.

  • example.py contains an example of using Keyak for a simple AEAD message transfer.

About

This repository contains a pure Python implementation of Keyak v2. This implementation is based on the pure Python FIPS202 and C++ Keyak v2 implementations by the Keccak, Keyak and Ketje Teams.

License:MIT License


Languages

Language:Python 100.0%