Home > Research > Code-based cryptography > Code-based cryptosystems : implementations > Efficient implementation of a CCA2-secure variant of McEliece using (...)

Efficient implementation of a CCA2-secure variant of McEliece using generalized Srivastava codes

Monday 5 March 2012, by Cayrel , Gerhard Hoffman

Efficient implementation of a CCA2-secure variant of McEliece
using generalized Srivastava codes

(by Pierre-Louis Cayrel, Gerhard Hoffmann and Edoardo Persichetti)

Part 0: Introduction.

This document will outline the details for the source codes of the above
publication. It is our hope that it might help people interested in code-based
cryptography to put this subject further by another step.

NOTE: At the moment, we do not plan to provide free access to the source codes. However, that does not mean that access is completely restricted.

Anyone seriously interested in code-based cryptography, who can outline why he or she needs the sources codes, please feel free to contact us.

The source consists basically of two parts. The first one is running on the PC, producing the necessary Generalized Srivastava (GRSV) codes, secret support etc. The second one is run on a microcontroller, simulated by AVRStudio, version 5. It contains the decrypting part of the McEliece system based on GSRV codes. That means, the matrices representing the secret code have been copied manually to the device.

A note about the simulator in AVR Studio:
Debugging takes a very long time. Running the program in the simulator might take more than two hours, whereas the actual runtime in hardware would be under a second. The reason for this huge gap is that the graphical window of the debugger will be updated for each cycle the simulated processor is doing.
As there is no way to turn off graphics under Windows, there seems to be only one way around this restriction: the use of some sort of real hardware (JTAG etc.).

For the parameters we have used, please see the above paper. The actual memory layout for the device has to be set inside AVRStudio itself, which unfortunately means that it does not show up directly in source code. For convenience, we will give the various settings when discussing the two source code versions for the microcontroller sources.

For the assembler implementation of Keccak code made public by the Keccak team has been used (with some minor modifications). Otherwise, the code has been written in C.

Part 1: The PC part for generating the codes. (avr_gen_code.tgz)

The most important files are:


The source also contains an implementation of Paulo’s algorithm for generating the necessary codes.

Part 2.1: The microcontroller sources for the above publication.
(avr-version-paper.tgz).


The memory layout for the matrices H and G, the exp/log-tables and the support has been defined as follows:


Note that the names of the segments show up in source code. They serve as a convenient way for definition and reference.

Part 2.2: The microcontroller sources for some setting, which did not make it into the paper (avr-version-excluded.tgz).


The memory layout for the matrices H and G, the exp/log-tables and the support has been defined as follows:


Note that the names of the segments show up in source code. They serve as a convenient way for definition and reference.

Comment on this article

SPIP | | Site Map | Follow site activity RSS 2.0

Graphic design (c) Kozlika under License GPL