(Partial) implementation of a Generalized-Feistel Cipher for generating random permutations.
Project description
gfc
(Partial) implementation of a Generalized-Feistel Cipher [1, alg. 3] for generating random permutations.
It uses Speck 64/128 as the random function.
The Speck implementation is from madmo/speck and is licensed under the ISC license (MIT-compatible).
C API
GFC* gfc_init(uint64_t range, uint64_t rounds, uint64_t seed);
void gfc_destroy(GFC* gfc);
uint64_t gfc_encrypt(GFC* gfc, uint64_t m);
Python API
from pygfc import Permutation
# Permutation(range, rounds, seed)
perm = Permutation(2 ** 16, 8, 42)
assert set(perm) == set(range(2 ** 16))
References
[1] Black, John, and Phillip Rogaway. "Ciphers with arbitrary finite domains." Cryptographers’ track at the RSA conference. Springer, Berlin, Heidelberg, 2002. https://web.cs.ucdavis.edu/~rogaway/papers/subset.pdf
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygfc-0.1.1.tar.gz
(36.1 kB
view hashes)
Built Distributions
Close
Hashes for pygfc-0.1.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14278ddf42079f20bd569173288cf2b1c5791d51f4306c71fd550adad4e43d1b |
|
MD5 | 949786ef050e4947575b3a580570b20a |
|
BLAKE2b-256 | 66db6882b91e64104a2b2c164550bee7d07edea2d9204e85effc9b3aa19462ab |
Close
Hashes for pygfc-0.1.1-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baf9140c028693438210370263d5e2b7ca66fab5efb778e3354b882f1c6e1259 |
|
MD5 | 83c0e4fd02fc99724d5192438e54a2ce |
|
BLAKE2b-256 | 489e600cf65cc862944cc24239bb6197582792891419c5059eb545133b23988b |
Close
Hashes for pygfc-0.1.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2178a6ea380b447072110d189298952bcd5996531a770b0583cf8e2801977bf2 |
|
MD5 | 35c66182d1d6d5ad0d63fe439ffea179 |
|
BLAKE2b-256 | 4ad932c144d11a7fd43f14e8a01e598acd17cb11a00940e9d9635ae58a8174f8 |
Close
Hashes for pygfc-0.1.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47a4c3192018d318d7ad549c0d1b537c54a145fe4dff9f45b7da4b059572f28a |
|
MD5 | 85a2fda111bab828cf17c6de46d8f125 |
|
BLAKE2b-256 | 6cff6b06517d7410915d404bd3cdc6bc380e500cb9624454246012c24609915f |
Close
Hashes for pygfc-0.1.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 130cbaba6dacc348ddb4d0bd1ca0716d27e85e2e1eea589ad6ed8cd5f92cda8c |
|
MD5 | ef1a3f05ab00381d017b634470004a6b |
|
BLAKE2b-256 | b48dd41467d8c1ce5fd5c129cce46a2e3ab3b83e62c1f5cb1b9810b2f35a6fb7 |
Close
Hashes for pygfc-0.1.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5926d336ff1c320e9d5e311027c85b0ba9c68d32394a73b063db9203ed29444c |
|
MD5 | 044a349912d56d84dea75c8b2a6862c2 |
|
BLAKE2b-256 | c9dc8b67ddfae30e19411374091cd0c7504e3fa3014ce5ba788b0ecfdf8c2856 |
Close
Hashes for pygfc-0.1.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 428a6cd6f9f55543fc6b9f861f44040a79ea85b940a906f8ae8ff67c20066d5b |
|
MD5 | 58f9242ab961f952597f754c88826159 |
|
BLAKE2b-256 | 50efe4e07158ecef2df25467f3ee7f838a079b6319ab48ee7e8ca67de0e58542 |
Close
Hashes for pygfc-0.1.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b73cb140d97e6445993095a17ce33a22d0de063aabbae178f828d221cab9e3 |
|
MD5 | 1175cad1d5448aa90e40dfe9224f1192 |
|
BLAKE2b-256 | 2a1d02a81768f582d44863906af3b3daafc7c5636d6e3ce7211ea6aeda335187 |
Close
Hashes for pygfc-0.1.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fdcc4d8d7db06ac9c9aa0743875af61ba09e0ee93d602139b46451b0ba90206 |
|
MD5 | 7287e9fbdc765c6d1a8f4ee6cf279f9d |
|
BLAKE2b-256 | 9d45a7d3f7a704ad9d000077d655d3ae8588072966244d533fe082ae13821291 |
Close
Hashes for pygfc-0.1.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7808e703aff6529c8562c8d28880eb248226bae966d80dcc716c970a1bccc9bd |
|
MD5 | 2613a4f0dbc1474f6e7ea77e0d904faa |
|
BLAKE2b-256 | 3ca1f0d73b56c3de49eb144db1d8ec09b4c04d6f293976b46d369939454f7fcc |