Commit 1e03b011 authored by Sophie Leuenberger's avatar Sophie Leuenberger
Browse files

Upload README.txt

parent fc8fee09
Usage of crypto_builder.sage and crypto_builder_me.sage
What is this?
These two sage scripts can be used to set up a McEliece cryptosystem using alternant codes. The decoder is based on the concept of error-correcting pairs, see
1. Pellikaan, Ruud: On decoding by error location and dependent sets of error positions. 1992.
2. Marquez-Corbella, Irene and Pellikaan, Ruud: Error-correcting pairs for a public-key cryptosystem. 2012.
1. SageMath (free open source mathematics software system), <>
Usage Examples
This script simulates the exchange of a randomly generated secret key.
1. q: Size of finite field
2. m: Degree of extension field
3. n: Lenght of alternant code
4. k: Dimension of underlying GRS-code
5. name: Choose a name for your system. Will create a folder with this name for the private key.
> sage crypto_builder.sage 31 2 500 100 myTest
This command will generate the following:
* myTest_encrypter.sage: Sage script for encryption.
* myTest.public.sobj: Sage object representing the public key.
* myTest: Folder containing the private key, in particular the sage script decrypter.sage which is used for decryption.
and will output the number [t] of errors which can be added to a codeword.
> sage myTest_encrypter.sage myTest.public [t]
This command will output the encrypted message [m].
> cd myTest
> sage decrypter.sage [m]
This script can be used to exchange messages. The usage is similar to the usage of crypto_builder.sage.
Note that the size of the finite field determines the number of characters which can be encrypted.
In order to encrypt all characters of the extended ASCII-table, choose q=271.
> sage crypto_builder.sage 271 2 500 100 myTest
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment