Home > Research > Code-based cryptography > Code-based cryptosystems : implementations > Implementation of code-based hash-functions and stream-ciphers

Implementation of code-based hash-functions and stream-ciphers

Wednesday 20 April 2011, by Cayrel, Matthias Boll and Thorsten Peter

These are the results of a cryptography lab project of Thorsten
Peter and Matthias Boll in winter semester 2010/2011. The lab project contains two main parts: the implementation (C and Java) and performance comparison of several code-based cryptographic schemes.

The first two schemes, FSB [1] and S-FSB are two cryptographic hash functions. The other two, SYND [2] and 2SC, are two stream ciphers.
In our report, we are going to introduce the cryptographic schemes briefly, building the basis for the understanding of their implementations. Section 3 presents the C and Java implementations. Based on our C implementations, we have done several performance measurements in order to compare the two hash function schemes, FSB and S-FSB, as well as the two stream ciphers, SYND and 2SC. Section 4 deals with the performance analysis and covers some Dieharder tests for the FSB and S-FSB hash functions.

These are the performance results we obtained [3] for S-FSB and FSB:

Hash Length FSB cycles/byte S-FSB cycles/byte FSB file hash 100 MB S-FSB file hash 100 MB
160 Bit 212 160 8.82s 6.64s
224 Bit 248 201 10.14s 7.66s
384 Bit 381 359 15.82s 14.71s

As we can see, S-FSB achieves a better performance. [4]

and those are our results for SYND and 2SC:

Security Level SYND cycles/byte
80 36
170 85
366 132

The 80 bit security level are the parameters recommended by the SYND authors.

Security Level 2SC cycles/byte
100 37
200 47
350 72

This shows that at comparable security levels, 2SC is faster.

An other hash-function have been proposed by Daniel J. Bernstein, Tanja Lange, Christiane Peters and Peter Schwabe called RFSB. An implementation of the hash-function can be found here.

[1Daniel Augot, Matthieu Finiasz, Philippe Gaborit, Stéphane Manuel, Nicolas Sendrier - SHA-3 proposal: FSB,
Submission to NIST, 2008, FSB project page

[2Philippe Gaborit, Cedric Lauradoux and Nicolas Sendrier - SYND: a fast code-based stream cipher with a security reduction, 2007, download paper

[3test machine was a 2.53 GHz Pentium Core2 Duo, 32 Bit Ubuntu 10.04, 6MB Level 2 Cache, 4 GB RAM

[4see also the FSB authors’ results on p.11, table 6 of their proposal