ECRYPT Interface for Stream Ciphers

 

General Rules

Submissions must be programmed in portable C. For an explanation of portable C, see here. ECRYPT provides header files that ensure this and also define some types to be used.

When pointers are used in the interfaces, the calling function must guarantee that the pointers point to suitable addresses. In particular, parameters for returning results of the function must point to data areas large enough to store the result.

The authors should provide a header file that defines some constants (such as the MAXSIZE of the key, the BLOCKSIZE used for one encryption at a time, and so on) and the declaration of functions. See the provided example header files for each type of stream cipher).

The ECRYPT interfaces

These are the four interfaces provided:

Synchronous stream ciphers without authentication

The file ecrypt-sync.h defines and explains the API to be used. The authors should edit this file where indicated. The file ecrypt-sync.c gives the default implementation of an all-in-one function to encrypt/decrypt packets of arbitrary (but short) length .

Synchronous stream ciphers with authentication

The file ecrypt-sync-ae.h defines and explains the API to be used. The authors should edit this file where indicated. The file ecrypt-sync-ae.c gives the default implementation of an all-in-one function to encrypt/decrypt packets of arbitrary (but short) length .

Self-synchronising stream ciphers without authentication

The file ecrypt-ssyn.h defines and explains the API to be used. The authors should edit this file where indicated. The file ecrypt-ssyn.c gives the default implementation of an all-in-one function to encrypt/decrypt packets of arbitrary (but short) length .

Self-synchronising stream ciphers with authentication

The file ecrypt-ssyn-ae.h defines and explains the API to be used. The authors should edit this file where indicated. The file ecrypt-ssyn-ae.c gives the default implementation of an all-in-one function to encrypt/decrypt packets of arbitrary (but short) length .

Remark: The described interfaces are only intended for the submission of stream ciphers to the ECRYPT Stream Cipher project. They are not suggested as a general crypto-API. (For example, the functions of this interface do not return error codes, which they should do in an API for general usage.)

Remark: Please send any comments on the API to streamciphercall@ecrypt.eu.org. We appreciate your comments. Thanks to Doug Whiting and Alexander Maximov for their suggestions to improve this API.