X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=noekeon.h;h=f0eaf528a7c4da9e05e27a49a89da681204a5193;hb=6bd58d7909b89a3e05003a63cdc642638fa653e6;hp=b6f094a8cdbf91a1007e36e3d03e7710c686312b;hpb=36101d05fdd3f660375301ca9f017d2e16c228b7;p=avr-crypto-lib.git diff --git a/noekeon.h b/noekeon.h index b6f094a..f0eaf52 100644 --- a/noekeon.h +++ b/noekeon.h @@ -19,11 +19,12 @@ #ifndef NOEKEON_H_ #define NOEKEON_H_ -/* - * author: Daniel Otte - * email: daniel.otte@rub.de - * license: GPLv3 - * +/** + * \author Daniel Otte + * \email daniel.otte@rub.de + * \date 2008-04-11 + * \license GPLv3 + * \brief * * */ @@ -32,8 +33,44 @@ typedef uint8_t noekeon_ctx_t[16]; +/** \fn void noekeon_enc(void* buffer, void* key) + * \brief noekeon encrytion funtion + * + * This function encrypts a block (64 bit = 8 byte) with the noekeon encrytion + * algorithm. Due to the two modes of noekeon (direct mode and indirect mode) + * the second parameter either points directly to the key (direct mode) or to a + * context generated by the noekeon_init() function (indirect mode) + * \param buffer pointer to the 64 bit (8 byte) block to encrypt + * \param key pointer to either the key (128 bit = 16 byte; direct mode) or + * to the context (indirect mode) + */ void noekeon_enc(void* buffer, void* key); + +/** \fn void noekeon_enc(void* buffer, void* key) + * \brief noekeon encrytion funtion + * + * This function decrypts a block (64 bit = 8 byte) encrypted with the noekeon + * encrytion algorithm. Due to the two modes of noekeon (direct mode and + * indirect mode) the second parameter either points directly to the key + * (direct mode) or to a context generated by the noekeon_init() function + * (indirect mode) + * \param buffer pointer to the 64 bit (8 byte) block to decrypt + * \param key pointer to either the key (128 bit = 16 byte; direct mode) or + * to the context (indirect mode) + */ void noekeon_dec(void* buffer, void* key); + + +/** \fn void noekeon_init(void* key, noekeon_ctx_t* ctx) + * \brief noekeon context generation function for indirect mode + * + * This function generates a context from the supplied key for using + * noekeon in indirect mode. For using noekeon in direct mode supply the key + * direct to the noekeon_enc() and noekeon_dec() functions + * \param key pointer to the key (128 bit = 16 byte) + * \param ctx pointer to the context to fill with key material + * to the context (indirect mode) + */ void noekeon_init(void* key, noekeon_ctx_t* ctx); #endif /*NOEKEON_H_*/