Commit bb9fdbfd authored by Abdul Rauf's avatar Abdul Rauf Committed by Greg Kroah-Hartman

staging: skein: fix checkpatch block comments warning

Fix the following warnings:
Block comments should align the * on each line
Signed-off-by: default avatarAbdul Rauf <abdulraufmujahid@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09249ecd
#ifndef _SKEIN_H_ #ifndef _SKEIN_H_
#define _SKEIN_H_ 1 #define _SKEIN_H_ 1
/************************************************************************** /*
** **************************************************************************
** Interface declarations and internal definitions for Skein hashing. *
** * Interface declarations and internal definitions for Skein hashing.
** Source code author: Doug Whiting, 2008. *
** * Source code author: Doug Whiting, 2008.
** This algorithm and source code is released to the public domain. *
** * 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. * The following compile-time switches may be defined to control some
** * tradeoffs between speed, code size, error checking, and security.
** The "default" note explains what happens when the switch is not defined. *
** * The "default" note explains what happens when the switch is not defined.
** SKEIN_ERR_CHECK -- how error checking is handled inside Skein *
** code. If not defined, most error checking * SKEIN_ERR_CHECK -- how error checking is handled inside Skein
** is disabled (for performance). Otherwise, * code. If not defined, most error checking
** the switch value is interpreted as: * is disabled (for performance). Otherwise,
** 0: use assert() to flag errors * the switch value is interpreted as:
** 1: return SKEIN_FAIL to flag errors * 0: use assert() to flag errors
** * 1: return SKEIN_FAIL to flag errors
***************************************************************************/ *
**************************************************************************
*/
/*Skein digest sizes for crypto api*/ /*Skein digest sizes for crypto api*/
#define SKEIN256_DIGEST_BIT_SIZE 256 #define SKEIN256_DIGEST_BIT_SIZE 256
...@@ -101,19 +103,19 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val); ...@@ -101,19 +103,19 @@ int skein_512_final(struct skein_512_ctx *ctx, u8 *hash_val);
int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val); int skein_1024_final(struct skein_1024_ctx *ctx, u8 *hash_val);
/* /*
** Skein APIs for "extended" initialization: MAC keys, tree hashing. * Skein APIs for "extended" initialization: MAC keys, tree hashing.
** After an init_ext() call, just use update/final calls as with init(). * After an init_ext() call, just use update/final calls as with init().
** *
** Notes: Same parameters as _init() calls, plus tree_info/key/key_bytes. * Notes: Same parameters as _init() calls, plus tree_info/key/key_bytes.
** When key_bytes == 0 and tree_info == SKEIN_SEQUENTIAL, * When key_bytes == 0 and tree_info == SKEIN_SEQUENTIAL,
** the results of init_ext() are identical to calling init(). * the results of init_ext() are identical to calling init().
** The function init() may be called once to "precompute" the IV for * The function init() may be called once to "precompute" the IV for
** a given hash_bit_len value, then by saving a copy of the context * a given hash_bit_len value, then by saving a copy of the context
** the IV computation may be avoided in later calls. * the IV computation may be avoided in later calls.
** Similarly, the function init_ext() may be called once per MAC key * Similarly, the function init_ext() may be called once per MAC key
** to precompute the MAC IV, then a copy of the context saved and * to precompute the MAC IV, then a copy of the context saved and
** reused for each new MAC computation. * reused for each new MAC computation.
**/ */
int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len, int skein_256_init_ext(struct skein_256_ctx *ctx, size_t hash_bit_len,
u64 tree_info, const u8 *key, size_t key_bytes); u64 tree_info, const u8 *key, size_t key_bytes);
int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len, int skein_512_init_ext(struct skein_512_ctx *ctx, size_t hash_bit_len,
...@@ -122,10 +124,10 @@ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len, ...@@ -122,10 +124,10 @@ int skein_1024_init_ext(struct skein_1024_ctx *ctx, size_t hash_bit_len,
u64 tree_info, const u8 *key, size_t key_bytes); u64 tree_info, const u8 *key, size_t key_bytes);
/* /*
** Skein APIs for MAC and tree hash: * Skein APIs for MAC and tree hash:
** final_pad: pad, do final block, but no OUTPUT type * final_pad: pad, do final block, but no OUTPUT type
** output: do just the output stage * output: do just the output stage
*/ */
int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val); int skein_256_final_pad(struct skein_256_ctx *ctx, u8 *hash_val);
int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val); int skein_512_final_pad(struct skein_512_ctx *ctx, u8 *hash_val);
int skein_1024_final_pad(struct skein_1024_ctx *ctx, u8 *hash_val); int skein_1024_final_pad(struct skein_1024_ctx *ctx, u8 *hash_val);
...@@ -139,13 +141,15 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val); ...@@ -139,13 +141,15 @@ int skein_512_output(struct skein_512_ctx *ctx, u8 *hash_val);
int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val); int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
#endif #endif
/***************************************************************** /*
** "Internal" Skein definitions *****************************************************************
** -- not needed for sequential hashing API, but will be * "Internal" Skein definitions
** helpful for other uses of Skein (e.g., tree hash mode). * -- not needed for sequential hashing API, but will be
** -- included here so that they can be shared between * helpful for other uses of Skein (e.g., tree hash mode).
** reference and optimized code. * -- included here so that they can be shared between
******************************************************************/ * reference and optimized code.
*****************************************************************
*/
/* tweak word tweak[1]: bit field starting positions */ /* tweak word tweak[1]: bit field starting positions */
#define SKEIN_T1_BIT(BIT) ((BIT) - 64) /* second word */ #define SKEIN_T1_BIT(BIT) ((BIT) - 64) /* second word */
...@@ -226,9 +230,9 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val); ...@@ -226,9 +230,9 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
#define SKEIN_CFG_TREE_INFO_SEQUENTIAL SKEIN_CFG_TREE_INFO(0, 0, 0) #define SKEIN_CFG_TREE_INFO_SEQUENTIAL SKEIN_CFG_TREE_INFO(0, 0, 0)
/* /*
** Skein macros for getting/setting tweak words, etc. * Skein macros for getting/setting tweak words, etc.
** These are useful for partial input bytes, hash tree init/update, etc. * These are useful for partial input bytes, hash tree init/update, etc.
**/ */
#define skein_get_tweak(ctx_ptr, TWK_NUM) ((ctx_ptr)->h.tweak[TWK_NUM]) #define skein_get_tweak(ctx_ptr, TWK_NUM) ((ctx_ptr)->h.tweak[TWK_NUM])
#define skein_set_tweak(ctx_ptr, TWK_NUM, t_val) { \ #define skein_set_tweak(ctx_ptr, TWK_NUM, t_val) { \
(ctx_ptr)->h.tweak[TWK_NUM] = (t_val); \ (ctx_ptr)->h.tweak[TWK_NUM] = (t_val); \
...@@ -274,9 +278,11 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val); ...@@ -274,9 +278,11 @@ int skein_1024_output(struct skein_1024_ctx *ctx, u8 *hash_val);
#define skein_assert_ret(x, ret_code) #define skein_assert_ret(x, ret_code)
#define skein_assert(x) #define skein_assert(x)
/***************************************************************** /*
** Skein block function constants (shared across Ref and Opt code) *****************************************************************
******************************************************************/ * Skein block function constants (shared across Ref and Opt code)
*****************************************************************
*/
enum { enum {
/* SKEIN_256 round rotation constants */ /* SKEIN_256 round rotation constants */
R_256_0_0 = 14, R_256_0_1 = 16, R_256_0_0 = 14, R_256_0_1 = 16,
......
/*********************************************************************** /*
** ***********************************************************************
** Implementation of the Skein block functions. *
** * Implementation of the Skein block functions.
** Source code author: Doug Whiting, 2008. *
** * Source code author: Doug Whiting, 2008.
** This algorithm and source code is released to the public domain. *
** * This algorithm and source code is released to the public domain.
** Compile-time switches: *
** * Compile-time switches:
** SKEIN_USE_ASM -- set bits (256/512/1024) to select which *
** versions use ASM code for block processing * SKEIN_USE_ASM -- set bits (256/512/1024) to select which
** [default: use C for all block sizes] * versions use ASM code for block processing
** * [default: use C for all block sizes]
************************************************************************/ *
***********************************************************************
*/
#include <linux/string.h> #include <linux/string.h>
#include <linux/bitops.h> #include <linux/bitops.h>
......
/*********************************************************************** /*
** ***********************************************************************
** Implementation of the Skein hash function. *
** * Implementation of the Skein hash function.
** Source code author: Doug Whiting, 2008. *
** * Source code author: Doug Whiting, 2008.
** This algorithm and source code is released to the public domain. *
** * This algorithm and source code is released to the public domain.
************************************************************************/ *
***********************************************************************
*/
#ifndef _SKEIN_BLOCK_H_ #ifndef _SKEIN_BLOCK_H_
#define _SKEIN_BLOCK_H_ #define _SKEIN_BLOCK_H_
......
...@@ -4,18 +4,18 @@ ...@@ -4,18 +4,18 @@
#include "skein_base.h" /* get Skein macros and types */ #include "skein_base.h" /* get Skein macros and types */
/* /*
***************** Pre-computed Skein IVs ******************* **************** Pre-computed Skein IVs *******************
** *
** NOTE: these values are not "magic" constants, but * NOTE: these values are not "magic" constants, but
** are generated using the Threefish block function. * are generated using the Threefish block function.
** They are pre-computed here only for speed; i.e., to * They are pre-computed here only for speed; i.e., to
** avoid the need for a Threefish call during Init(). * avoid the need for a Threefish call during Init().
** *
** The IV for any fixed hash length may be pre-computed. * The IV for any fixed hash length may be pre-computed.
** Only the most common values are included here. * Only the most common values are included here.
** *
************************************************************ ***********************************************************
**/ */
#define MK_64 SKEIN_MK_64 #define MK_64 SKEIN_MK_64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment