(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
# 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.0.tar.gz
(36.0 kB
view hashes)
Built Distributions
Close
Hashes for pygfc-0.1.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 342f863f96c5bd194db81f7cb847c50af47ad4790994e1fdd7b65972eed8df63 |
|
MD5 | aa92131220467aa08b859eb987cec590 |
|
BLAKE2b-256 | 521fe3366e728a76284609f8bef889310f0e9d94bf571b45eda8f694f0efbfca |
Close
Hashes for pygfc-0.1.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7da9de28f9ae45d00a3649df72e7e7c438843f209f4c9d09a63855e5e7ec508 |
|
MD5 | 4cc2545c1bfbb4574eab49e0daf2b2a3 |
|
BLAKE2b-256 | 16966935486a046d50b658b0a74105778b0db22ee1a187ad3e0c602991ac7083 |
Close
Hashes for pygfc-0.1.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9934e5680236e14d0ad2a5d5518118445f1ce419a2c8dbeca8599cbdb005fa86 |
|
MD5 | 06d4b8d71942206de69f0d4e63b97af6 |
|
BLAKE2b-256 | a97dcb024326d917c3af0dc1f6bf97d3790534fd66c0e5c8418e25a8c3fb5925 |
Close
Hashes for pygfc-0.1.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 936a40b9a4d6e81017b045e75d05482fdd694e856d7b4cd255859bc862d3f35a |
|
MD5 | f5af01b964816dd49269ca68fe0f4805 |
|
BLAKE2b-256 | bb8e3205a4bef27da3b59c0df3bcbb37e8e3e11f23d77ff89cc0a04ddfa99f07 |
Close
Hashes for pygfc-0.1.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96ccd308bf3c8ab53f1e395e9fb087efc5f348cd9376f03cfa8ba6c9f9e678de |
|
MD5 | 0b5f8a6d65a6c88e9b70dda7ca478815 |
|
BLAKE2b-256 | 58a3a46fb5e8bcf905a023ab90a02f3db5a49f47694a9ea9ce37154cd2fe48a9 |
Close
Hashes for pygfc-0.1.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6124ce30f0ad3949faec3625973ad902a59eccf74bc6076acb279c7c93c1587 |
|
MD5 | 35f323a553e2dadc8a8e58c857df1409 |
|
BLAKE2b-256 | b9769803b710adefa90f75aecfbe353027207e09313af5e4c291a5370458641c |
Close
Hashes for pygfc-0.1.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f707b9e1eeafb2454c6677613cccdc4032d8aafd350fac7a994cec98f9fa0a73 |
|
MD5 | dbb2b4938a57dba2a070a6e27d533ef4 |
|
BLAKE2b-256 | 8367a53e6503728202c7b457568682bc94739c0ca3feefe90bf009110dbcf8dd |
Close
Hashes for pygfc-0.1.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8171ad188d61c6ba557aa6541bc5958fc6560f2d0d130f741d9bf492346570b1 |
|
MD5 | 63e0d7966cab1900487b82a54ac46350 |
|
BLAKE2b-256 | 8b2af4679f57fde1f1d994cda63a089c4b1e65407afbbdc5dd37ab3ea2361c75 |