jkrauze / mceliece Goto Github PK
View Code? Open in Web Editor NEWSimple python implementation of McEliece cryptosystem
License: MIT License
Simple python implementation of McEliece cryptosystem
License: MIT License
This code rocks. Splendid use of numpy, sympy and flint. To use on ubuntu 18.04, you need to download and install
to install python-flint from pip, on ubuntu 18.04, you must use 18.10 versions of libflint:
https://debian.pkgs.org/10/debian-main-amd64/libflint-arb2_2.16.0-2_amd64.deb.html
https://debian.pkgs.org/10/debian-main-amd64/libflint-arb-dev_2.16.0-2_amd64.deb.html
then perform a symlink
sudo ln -s /usr/lib/x86_64-linux-gnu/libflint-arb.so /usr/lib/x86_64-linux-gnu/libarb.so
after, the following wheel should succeed:
pip3 install python-flint --user
For python-flint installation, make use of anaconda and do the following:
conda create -n mypython3 python=3
source activate mypython3
conda install python-flint
erreur d'installation de python-flint
merci
I need m>8, n>20 and t>3
I run the following command to generate keys:
python3 mceliece.py -v gen 8 20 3 PRIV_KEY_FILE PUB_KEY_FILE
I get below error:
Traceback (most recent call last):
File "/root/mceliece/mceliece.py", line 147, in
generate(int(args['M']), int(args['N']), int(args['T']), args['PRIV_KEY_FILE'], args['PUB_KEY_FILE'])
File "/root/mceliece/mceliece.py", line 44, in generate
mceliece.generate_random_keys()
File "/root/mceliece/mceliece/mceliececipher.py", line 37, in generate_random_keys
self.S_inv = self.S.inv()
File "/root/mceliece/mceliece/mathutils.py", line 503, in inv
eye = flint.nmod_mat(self.arr.shape[0], self.arr.shape[1],
IndexError: tuple index out of range
How to set the correct combination of m,n,t?
I'm still getting this exception no matter what input I give for key generation. Can someone post a set of parameters that works for them such that I'm sure that I don't miss anything regarding the way McEliece key generation works?
Traceback (most recent call last):
File "./mceliece.py", line 140, in
generate(int(args['M']), int(args['N']), int(args['T']), args['PRIV_KEY_FILE'], args['PUB_KEY_FILE'])
File "./mceliece.py", line 38, in generate
mceliece.generate_random_keys()
File ".../mceliece/mceliececipher.py", line 27, in generate_random_keys
self.G, self.H, self.g_poly, self.irr_poly = GoppaCodeGenerator(self.m, self.n, self.t).gen()
File ".../goppa/goppacodegenerator.py", line 63, in gen
raise Exception("irr poly not found")
Dzień dobry,
mam problem z instalacją biblioteki python-flint czy mógłbym prosić o wsparcie?
Próbowałem się skontaktować przez linkedin, niestety bezskutecznie. Jeśli to możliwe proszę o kontakt mailowy
[email protected]
Poniżej załączam zrzuty ekranu z błędami.
How do I generate the PUB_KEY_FILE and PRIV_KEY_FILE?
I am getting the following error, when I try to generate the keys:
Traceback (most recent call last):
File "...Projekt/McEliece - python/mceliece/./mceliece.py", line 143, in
generate(int(args['M']), int(args['N']), int(args['T']), args['PRIV_KEY_FILE'], args['PUB_KEY_FILE'])
File "...Projekt/McEliece - python/mceliece/./mceliece.py", line 41, in generate
mceliece.generate_random_keys()
File "...Projekt/McEliece - python/mceliece/mceliece/mceliececipher.py", line 29, in generate_random_keys
self.G, self.H, self.g_poly, self.irr_poly = GoppaCodeGenerator(self.m, self.n, self.t).gen()
File "...Projekt/McEliece - python/mceliece/goppa/goppacodegenerator.py", line 88, in gen
H_nullspace, nullity = H_bin.nullspace()
File "...Projekt/McEliece - python/mceliece/mceliece/mathutils.py", line 495, in nullspace
X, nullity = self.to_flint().nullspace()
File "...Projekt/McEliece - python/mceliece/mceliece/mathutils.py", line 492, in to_flint
return flint.nmod_mat(self.arr.shape[0], self.arr.shape[1], [int(e) for e in self.arr.flatten()], 2)
AttributeError: module 'flint' has no attribute 'nmod_mat'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.