sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.31k stars 450 forks source link

Creation of a class for McEliece cryptosystem #21352

Open 979f6f8a-3a13-4974-bc2f-8b26846177fc opened 8 years ago

979f6f8a-3a13-4974-bc2f-8b26846177fc commented 8 years ago

This class can encrypt and decrypt messages using McEliece cryptosystem.

Depends on #20970

CC: @sagetrac-dlucas @ralfarogit @johanrosenkilde @miguelmarco @sagetrac-danielaugot @TaniaRichmond @jlavauzelle @emes4

Component: cryptography

Keywords: sd75

Author: Fangan Dosso, Marketa Slukova

Branch/Commit: u/gh-emes4/crypto/mceliece @ ea3c326

Issue created by migration from https://trac.sagemath.org/ticket/21352

979f6f8a-3a13-4974-bc2f-8b26846177fc commented 8 years ago

Description changed:

--- 
+++ 
@@ -1 +1 @@
-This class can encrypt and decrypt messages using McEliece cryptosystem.
+This class can encrypt and decrypt messages using `McEliece` cryptosystem.
979f6f8a-3a13-4974-bc2f-8b26846177fc commented 8 years ago

Branch: u/fdosso48/mc_eliece_cryptosystem

979f6f8a-3a13-4974-bc2f-8b26846177fc commented 8 years ago

Commit: 6ecc978

979f6f8a-3a13-4974-bc2f-8b26846177fc commented 8 years ago
comment:3

First commit done as backup.


New commits:

6ecc978adds a first commit as backup
1861b8a9-77f0-4f35-8431-8514a75b40d1 commented 8 years ago
comment:4

Hello,

A framework which supports cryptosystems already exists in Sage (see sage/crypto/cryptosystem.py), but it does not contain a lot of code, and is designed in a way which does not support our needs.

We're about to discuss the redesign of this crypto framework.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 6ecc978 to b819ada

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

b819adaAdds the decoding radius as parameter because 'decoder.decoding_radius()' method gives incorrect results. Adds also an example of test.
emes4 commented 5 years ago

Changed branch from u/fdosso48/mc_eliece_cryptosystem to u/gh-emes4/crypto/mceliece

emes4 commented 5 years ago

Dependencies: #20970

emes4 commented 5 years ago

Changed author from Fangan Dosso to Fangan Dosso, Marketa Slukova

emes4 commented 5 years ago

Changed commit from b819ada to none

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

3917048Merge branch 'develop' of git://trac.sagemath.org/sage into rank_metric
01d9a3dMerge branch 'develop' of git://trac.sagemath.org/sage into t/28350/abstract_linear_code_no_metric_class
226ffbfAdded no metric to coding documentation index. Moved zero method from AbstractLinearCode. Changed base_field check.
bd31704Merge branch 'u/gh-emes4/coding/no_metric' of git://trac.sagemath.org/sage into rank_metric
0a115d0Removed zero method. Added field extension method.
9d74474Merge branch 'u/gh-emes4/coding/linear_rank_metric' of git://trac.sagemath.org/sage into gabidulin
55128afInitial completed, working version. No Metric changes. Documentation and doctests.
d736c4aMerge branch 'develop' of git://trac.sagemath.org/sage into gabidulin
d9776d7Rank static error channel.
ea3c326Rough working version of rank metric Gabidulin McEliece
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Commit: ea3c326

emes4 commented 5 years ago
comment:10

As part of my GSoC 2019 project, I added support for rank metric and Gabidulin codes - partially to use these to create a rank metric McEliece cryptosystem class.

This is a rough, working version. I used the original definition for the key generation, SG + P. It is probably better to later change this to one of the newer column scrambler definitions. It might be nice to have a choice of which one to use.

johanrosenkilde commented 5 years ago
comment:11

This implementation is nice and barebone, but it's specialised to rank distance. The McEliece cryptosystem is originally, and usually, for Hamming-metric.

It seems that the only place this makes a difference in the current implementation is where the error is added. If this channel was simply given at construction time, then the class could be invoked with both a Hamming metric code or a rank metric code.

It would be nice to see a doctest with both instantiations.

The methods of the class are missing doc-strings and -tests, and the file should have a module doc-string that explains what the McEliece cryptosystem is.