Giter Site home page Giter Site logo

mceliece's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mceliece's Issues

Generate Keys not working

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'

Python flint installation error

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

Problem with instalation python-flint

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.

image
image

Generating keys - parameters

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")

useage on ubuntu

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

Values of m, n, t??

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.