summaryrefslogtreecommitdiff
path: root/drivers/staging/skein/include
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/skein/include')
-rw-r--r--drivers/staging/skein/include/skein.h16
-rw-r--r--drivers/staging/skein/include/skeinApi.h44
-rw-r--r--drivers/staging/skein/include/threefishApi.h40
3 files changed, 50 insertions, 50 deletions
diff --git a/drivers/staging/skein/include/skein.h b/drivers/staging/skein/include/skein.h
index 906bcee41c39..dd9a210cf5dd 100644
--- a/drivers/staging/skein/include/skein.h
+++ b/drivers/staging/skein/include/skein.h
@@ -9,7 +9,7 @@
** This algorithm and source code is released to the public domain.
**
***************************************************************************
-**
+**
** The following compile-time switches may be defined to control some
** tradeoffs between speed, code size, error checking, and security.
**
@@ -20,8 +20,8 @@
** [default: no callouts (no overhead)]
**
** SKEIN_ERR_CHECK -- how error checking is handled inside Skein
-** code. If not defined, most error checking
-** is disabled (for performance). Otherwise,
+** code. If not defined, most error checking
+** is disabled (for performance). Otherwise,
** the switch value is interpreted as:
** 0: use assert() to flag errors
** 1: return SKEIN_FAIL to flag errors
@@ -109,12 +109,12 @@ int Skein1024_Final(struct skein1024_ctx *ctx, u8 *hashVal);
** After an InitExt() call, just use Update/Final calls as with Init().
**
** Notes: Same parameters as _Init() calls, plus treeInfo/key/keyBytes.
-** When keyBytes == 0 and treeInfo == SKEIN_SEQUENTIAL,
+** When keyBytes == 0 and treeInfo == SKEIN_SEQUENTIAL,
** the results of InitExt() are identical to calling Init().
** The function Init() may be called once to "precompute" the IV for
** a given hashBitLen value, then by saving a copy of the context
** the IV computation may be avoided in later calls.
-** Similarly, the function InitExt() may be called once per MAC key
+** Similarly, the function InitExt() may be called once per MAC key
** to precompute the MAC IV, then a copy of the context saved and
** reused for each new MAC computation.
**/
@@ -142,7 +142,7 @@ int Skein1024_Output(struct skein1024_ctx *ctx, u8 *hashVal);
/*****************************************************************
** "Internal" Skein definitions
-** -- not needed for sequential hashing API, but will be
+** -- not needed for sequential hashing API, but will be
** helpful for other uses of Skein (e.g., tree hash mode).
** -- included here so that they can be shared between
** reference and optimized code.
@@ -269,8 +269,8 @@ int Skein1024_Output(struct skein1024_ctx *ctx, u8 *hashVal);
/*****************************************************************
** Skein block function constants (shared across Ref and Opt code)
******************************************************************/
-enum
- {
+enum
+ {
/* Skein_256 round rotation constants */
R_256_0_0 = 14, R_256_0_1 = 16,
R_256_1_0 = 52, R_256_1_1 = 57,
diff --git a/drivers/staging/skein/include/skeinApi.h b/drivers/staging/skein/include/skeinApi.h
index 0d7d59eff460..ace931a67c23 100644
--- a/drivers/staging/skein/include/skeinApi.h
+++ b/drivers/staging/skein/include/skeinApi.h
@@ -36,46 +36,46 @@ OTHER DEALINGS IN THE SOFTWARE.
* of Skein. The design and the way to use the functions follow the openSSL
* design but at the same time take care of some Skein specific behaviour
* and possibilities.
- *
+ *
* The functions enable applications to create a normal Skein hashes and
* message authentication codes (MAC).
- *
+ *
* Using these functions is simple and straight forward:
- *
+ *
* @code
- *
+ *
* #include <skeinApi.h>
- *
+ *
* ...
* struct skein_ctx ctx; // a Skein hash or MAC context
- *
+ *
* // prepare context, here for a Skein with a state size of 512 bits.
* skeinCtxPrepare(&ctx, Skein512);
- *
+ *
* // Initialize the context to set the requested hash length in bits
* // here request a output hash size of 31 bits (Skein supports variable
* // output sizes even very strange sizes)
* skeinInit(&ctx, 31);
- *
+ *
* // Now update Skein with any number of message bits. A function that
* // takes a number of bytes is also available.
* skeinUpdateBits(&ctx, message, msgLength);
- *
+ *
* // Now get the result of the Skein hash. The output buffer must be
* // large enough to hold the request number of output bits. The application
* // may now extract the bits.
* skeinFinal(&ctx, result);
* ...
* @endcode
- *
+ *
* An application may use @c skeinReset to reset a Skein context and use
* it for creation of another hash with the same Skein state size and output
* bit length. In this case the API implementation restores some internal
* internal state data and saves a full Skein initialization round.
- *
- * To create a MAC the application just uses @c skeinMacInit instead of
+ *
+ * To create a MAC the application just uses @c skeinMacInit instead of
* @c skeinInit. All other functions calls remain the same.
- *
+ *
*/
#include <linux/types.h>
@@ -111,7 +111,7 @@ struct skein_ctx {
/**
* Prepare a Skein context.
- *
+ *
* An application must call this function before it can use the Skein
* context. The functions clears memory and initializes size dependent
* variables.
@@ -128,7 +128,7 @@ int skeinCtxPrepare(struct skein_ctx *ctx, enum skein_size size);
/**
* Initialize a Skein context.
*
- * Initializes the context with this data and saves the resulting Skein
+ * Initializes the context with this data and saves the resulting Skein
* state variables for further use.
*
* @param ctx
@@ -143,11 +143,11 @@ int skeinInit(struct skein_ctx *ctx, size_t hashBitLen);
/**
* Resets a Skein context for further use.
- *
- * Restores the saved chaining variables to reset the Skein context.
- * Thus applications can reuse the same setup to process several
+ *
+ * Restores the saved chaining variables to reset the Skein context.
+ * Thus applications can reuse the same setup to process several
* messages. This saves a complete Skein initialization cycle.
- *
+ *
* @param ctx
* Pointer to a pre-initialized Skein MAC context
*/
@@ -155,8 +155,8 @@ void skeinReset(struct skein_ctx *ctx);
/**
* Initializes a Skein context for MAC usage.
- *
- * Initializes the context with this data and saves the resulting Skein
+ *
+ * Initializes the context with this data and saves the resulting Skein
* state variables for further use.
*
* Applications call the normal Skein functions to update the MAC and
@@ -209,7 +209,7 @@ int skeinUpdateBits(struct skein_ctx *ctx, const u8 *msg,
/**
* Finalize Skein and return the hash.
- *
+ *
* Before an application can reuse a Skein setup the application must
* reset the Skein context.
*
diff --git a/drivers/staging/skein/include/threefishApi.h b/drivers/staging/skein/include/threefishApi.h
index 199257e37813..5d92bbff8c9f 100644
--- a/drivers/staging/skein/include/threefishApi.h
+++ b/drivers/staging/skein/include/threefishApi.h
@@ -8,14 +8,14 @@
* @{
*
* This API and the functions that implement this API simplify the usage
- * of the Threefish cipher. The design and the way to use the functions
+ * of the Threefish cipher. The design and the way to use the functions
* follow the openSSL design but at the same time take care of some Threefish
* specific behaviour and possibilities.
*
* These are the low level functions that deal with Threefisch blocks only.
- * Implementations for cipher modes such as ECB, CFB, or CBC may use these
+ * Implementations for cipher modes such as ECB, CFB, or CBC may use these
* functions.
- *
+ *
@code
// Threefish cipher context data
struct threefish_key keyCtx;
@@ -44,7 +44,7 @@ enum threefish_size {
/**
* Context for Threefish key and tweak words.
- *
+ *
* This structure was setup with some know-how of the internal
* Skein structures, in particular ordering of header and size dependent
* variables. If Skein implementation changes this, the adapt these
@@ -58,10 +58,10 @@ struct threefish_key {
/**
* Set Threefish key and tweak data.
- *
+ *
* This function sets the key and tweak data for the Threefish cipher of
* the given size. The key data must have the same length (number of bits)
- * as the state size
+ * as the state size
*
* @param keyCtx
* Pointer to a Threefish key structure.
@@ -76,12 +76,12 @@ void threefishSetKey(struct threefish_key *keyCtx, enum threefish_size stateSize
/**
* Encrypt Threefisch block (bytes).
- *
- * The buffer must have at least the same length (number of bits) aas the
+ *
+ * The buffer must have at least the same length (number of bits) aas the
* state size for this key. The function uses the first @c stateSize bits
* of the input buffer, encrypts them and stores the result in the output
* buffer.
- *
+ *
* @param keyCtx
* Pointer to a Threefish key structure.
* @param in
@@ -93,14 +93,14 @@ void threefishEncryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out);
/**
* Encrypt Threefisch block (words).
- *
- * The buffer must have at least the same length (number of bits) aas the
+ *
+ * The buffer must have at least the same length (number of bits) aas the
* state size for this key. The function uses the first @c stateSize bits
* of the input buffer, encrypts them and stores the result in the output
* buffer.
- *
+ *
* The wordsize ist set to 64 bits.
- *
+ *
* @param keyCtx
* Pointer to a Threefish key structure.
* @param in
@@ -112,12 +112,12 @@ void threefishEncryptBlockWords(struct threefish_key *keyCtx, u64 *in, u64 *out)
/**
* Decrypt Threefisch block (bytes).
- *
- * The buffer must have at least the same length (number of bits) aas the
+ *
+ * The buffer must have at least the same length (number of bits) aas the
* state size for this key. The function uses the first @c stateSize bits
* of the input buffer, decrypts them and stores the result in the output
* buffer
- *
+ *
* @param keyCtx
* Pointer to a Threefish key structure.
* @param in
@@ -129,14 +129,14 @@ void threefishDecryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out);
/**
* Decrypt Threefisch block (words).
- *
- * The buffer must have at least the same length (number of bits) aas the
+ *
+ * The buffer must have at least the same length (number of bits) aas the
* state size for this key. The function uses the first @c stateSize bits
* of the input buffer, encrypts them and stores the result in the output
* buffer.
- *
+ *
* The wordsize ist set to 64 bits.
- *
+ *
* @param keyCtx
* Pointer to a Threefish key structure.
* @param in