huiyiqun / FastPRP

Impelemtation of the Fast Pseudo-Random Permutations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description
===========

1. Impelemtation of the Fast Pseudo-Random Permutations.

  Inspired by [this paper](https://eprint.iacr.org/2012/254.pdf)


How To
======

1. Compile the cython module(Need Cython, install with pip)

```
    python setup.py build_ext --inplace
```
or simply use python(slow)
```
    cp convert.pyx convert.py
```
2. There is two modules in my project now:


  * `RandomPermute` in `RandomPermute.py` (aimed to cryptology-safe)
  * `ArbitaryWidthRandomPermute` in `ArbitaryWidthRandomPermute.py`

test units for either module is in the source code. just run it with:
```
    python -m FastPRP/RandomPermute
    python -m FastPRP/ArbitaryWidthRandomPermute
```

Install as Module
=================

1. Install Cython
```
    pip install cython
```

1. Install module
```
    python setup.py install
```
TODO
====

1. There is not tutorist. Just see the source code.
2. AribitaryWidthRandomPermuter: Do NOT use output of last loop directly as key.

About

Impelemtation of the Fast Pseudo-Random Permutations.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%