diff options
author | Jason Cooper | 2014-03-24 02:49:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-04-19 00:47:42 +0200 |
commit | 39bd42b0855fa95ec923854cfeda58e3bbb77b4a (patch) | |
tree | ea9db03404007bd98ca8ded35c35dc5608b3aebf /drivers/staging/skein/include/threefishApi.h | |
parent | staging: crypto: skein: dos2unix, remove executable perms (diff) | |
download | kernel-qcow2-linux-39bd42b0855fa95ec923854cfeda58e3bbb77b4a.tar.gz kernel-qcow2-linux-39bd42b0855fa95ec923854cfeda58e3bbb77b4a.tar.xz kernel-qcow2-linux-39bd42b0855fa95ec923854cfeda58e3bbb77b4a.zip |
staging: crypto: skein: fix leading whitespace
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/skein/include/threefishApi.h')
-rw-r--r-- | drivers/staging/skein/include/threefishApi.h | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/drivers/staging/skein/include/threefishApi.h b/drivers/staging/skein/include/threefishApi.h index 1f9e6e14f50b..199257e37813 100644 --- a/drivers/staging/skein/include/threefishApi.h +++ b/drivers/staging/skein/include/threefishApi.h @@ -33,125 +33,125 @@ #define KeyScheduleConst 0x1BD11BDAA9FC1A22L - /** - * Which Threefish size to use - */ - enum threefish_size { - Threefish256 = 256, /*!< Skein with 256 bit state */ - Threefish512 = 512, /*!< Skein with 512 bit state */ - Threefish1024 = 1024 /*!< Skein with 1024 bit state */ - }; - - /** - * 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 - * structures as well. - */ - struct threefish_key { - u64 stateSize; - u64 key[SKEIN_MAX_STATE_WORDS+1]; /* max number of key words*/ - u64 tweak[3]; - }; +/** + * Which Threefish size to use + */ +enum threefish_size { + Threefish256 = 256, /*!< Skein with 256 bit state */ + Threefish512 = 512, /*!< Skein with 512 bit state */ + Threefish1024 = 1024 /*!< Skein with 1024 bit state */ +}; + +/** + * 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 + * structures as well. + */ +struct threefish_key { + u64 stateSize; + u64 key[SKEIN_MAX_STATE_WORDS+1]; /* max number of key words*/ + u64 tweak[3]; +}; + +/** + * 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 + * + * @param keyCtx + * Pointer to a Threefish key structure. + * @param size + * Which Skein size to use. + * @param keyData + * Pointer to the key words (word has 64 bits). + * @param tweak + * Pointer to the two tweak words (word has 64 bits). + */ +void threefishSetKey(struct threefish_key *keyCtx, enum threefish_size stateSize, u64 *keyData, u64 *tweak); + +/** + * Encrypt Threefisch block (bytes). + * + * 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 + * Poionter to plaintext data buffer. + * @param out + * Pointer to cipher buffer. + */ +void threefishEncryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out); - /** - * 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 - * - * @param keyCtx - * Pointer to a Threefish key structure. - * @param size - * Which Skein size to use. - * @param keyData - * Pointer to the key words (word has 64 bits). - * @param tweak - * Pointer to the two tweak words (word has 64 bits). - */ - void threefishSetKey(struct threefish_key *keyCtx, enum threefish_size stateSize, u64 *keyData, u64 *tweak); - - /** - * Encrypt Threefisch block (bytes). - * - * 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 - * Poionter to plaintext data buffer. - * @param out - * Pointer to cipher buffer. - */ - 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 - * 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 - * Poionter to plaintext data buffer. - * @param out - * Pointer to cipher buffer. - */ - void threefishEncryptBlockWords(struct threefish_key *keyCtx, u64 *in, u64 *out); +/** + * Encrypt Threefisch block (words). + * + * 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 + * Poionter to plaintext data buffer. + * @param out + * Pointer to cipher buffer. + */ +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 - * 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 - * Poionter to cipher data buffer. - * @param out - * Pointer to plaintext buffer. - */ - void threefishDecryptBlockBytes(struct threefish_key *keyCtx, u8 *in, u8 *out); +/** + * Decrypt Threefisch block (bytes). + * + * 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 + * Poionter to cipher data buffer. + * @param out + * Pointer to plaintext buffer. + */ +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 - * 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 - * Poionter to cipher data buffer. - * @param out - * Pointer to plaintext buffer. - */ - void threefishDecryptBlockWords(struct threefish_key *keyCtx, u64 *in, u64 *out); +/** + * Decrypt Threefisch block (words). + * + * 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 + * Poionter to cipher data buffer. + * @param out + * Pointer to plaintext buffer. + */ +void threefishDecryptBlockWords(struct threefish_key *keyCtx, u64 *in, u64 *out); - void threefishEncrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output); - void threefishEncrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output); - void threefishEncrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output); - void threefishDecrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output); - void threefishDecrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output); - void threefishDecrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output); +void threefishEncrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output); +void threefishEncrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output); +void threefishEncrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output); +void threefishDecrypt256(struct threefish_key *keyCtx, u64 *input, u64 *output); +void threefishDecrypt512(struct threefish_key *keyCtx, u64 *input, u64 *output); +void threefishDecrypt1024(struct threefish_key *keyCtx, u64 *input, u64 *output); /** * @} */ |