Botan 1.10.17

Namespaces | Macros | Enumerations
skein_512.cpp File Reference
`#include <botan/skein_512.h>`
`#include <botan/loadstor.h>`
`#include <botan/parsing.h>`
`#include <botan/exceptn.h>`
`#include <botan/rotate.h>`
`#include <algorithm>`

Go to the source code of this file.

## Namespaces
| Botan

## Macros
#define | THREEFISH_8_ROUNDS(R1, R2)
#define | THREEFISH_INJECT_KEY(r)
#define | THREEFISH_ROUND(I1, I2, I3, I4, I5, I6, I7, I8, ROT1, ROT2, ROT3, ROT4)

## Enumerations
enum | Botan::@326::type_code

## Macro Definition Documentation

## ◆ THREEFISH_8_ROUNDS

#define THREEFISH_8_ROUNDS | ( |  | R1,
|  |  | R2
| ) |  |

Value:
do { \
THREEFISH_ROUND(0,1,2,3,4,5,6,7, 46,36,19,37); \
THREEFISH_ROUND(2,1,4,7,6,5,0,3, 33,27,14,42); \
THREEFISH_ROUND(4,1,6,3,0,5,2,7, 17,49,36,39); \
THREEFISH_ROUND(6,1,0,7,2,5,4,3, 44, 9,54,56); \
\
THREEFISH_INJECT_KEY(R1); \
\
THREEFISH_ROUND(0,1,2,3,4,5,6,7, 39,30,34,24); \
THREEFISH_ROUND(2,1,4,7,6,5,0,3, 13,50,10,17); \
THREEFISH_ROUND(4,1,6,3,0,5,2,7, 25,29,39,43); \
THREEFISH_ROUND(6,1,0,7,2,5,4,3, 8,35,56,22); \
\
THREEFISH_INJECT_KEY(R2); \
} while(0);
THREEFISH_ROUND
#define THREEFISH_ROUND(I1, I2, I3, I4, I5, I6, I7, I8, ROT1, ROT2, ROT3, ROT4)
THREEFISH_INJECT_KEY
#define THREEFISH_INJECT_KEY(r)
R2
#define R2
Definition: asm_x86_64.h:53
R1
#define R1
Definition: asm_x86_64.h:52

## ◆ THREEFISH_INJECT_KEY

#define THREEFISH_INJECT_KEY | ( |  | r | ) |

Value:
do { \
X0 += H[(r ) % 9]; \
X1 += H[(r+1) % 9]; \
X2 += H[(r+2) % 9]; \
X3 += H[(r+3) % 9]; \
X4 += H[(r+4) % 9]; \
X5 += H[(r+5) % 9] + T[(r ) % 3]; \
X6 += H[(r+6) % 9] + T[(r+1) % 3]; \
X7 += H[(r+7) % 9] + (r); \
} while(0);

## ◆ THREEFISH_ROUND

#define THREEFISH_ROUND | ( |  | I1,
|  |  | I2,
|  |  | I3,
|  |  | I4,
|  |  | I5,
|  |  | I6,
|  |  | I7,
|  |  | I8,
|  |  | ROT1,
|  |  | ROT2,
|  |  | ROT3,
|  |  | ROT4
| ) |  |

Value:
do { \
X##I1 += X##I2; X##I2 = rotate_left(X##I2, ROT1) ^ X##I1; \
X##I3 += X##I4; X##I4 = rotate_left(X##I4, ROT2) ^ X##I3; \
X##I5 += X##I6; X##I6 = rotate_left(X##I6, ROT3) ^ X##I5; \
X##I7 += X##I8; X##I8 = rotate_left(X##I8, ROT4) ^ X##I7; \
} while(0);
Botan::rotate_left
T rotate_left(T input, size_t rot)
Definition: rotate.h:21

## Enumeration Type Documentation

## ◆ type_code

enum Botan::@326::type_code

Definition at line 19 of file skein_512.cpp.

19 {
20 SKEIN_KEY = 0,
21 SKEIN_CONFIG = 4,
22 SKEIN_PERSONALIZATION = 8,
23 SKEIN_PUBLIC_KEY = 12,
24 SKEIN_KEY_IDENTIFIER = 16,
25 SKEIN_NONCE = 20,
26 SKEIN_MSG = 48,
27 SKEIN_OUTPUT = 63
28 };