]> git.cryptolib.org Git - avr-crypto-lib.git/commitdiff
whitespace inseration
authorbg <daniel.otte@rub.de>
Tue, 18 Dec 2012 11:06:19 +0000 (12:06 +0100)
committerbg <daniel.otte@rub.de>
Tue, 18 Dec 2012 11:06:19 +0000 (12:06 +0100)
keccak/keccak.h
keccak/rotate64.h

index ff176574ff702cda0d002ae03d0564e442262c28..736cbc8a1756228c133dbdd1e9075fab39b63adc 100644 (file)
 #include <stdint.h>
 
 #define KECCAK224_BLOCKSIZE 1152
-#define KECCAK224_BLOCKSIZE_B (KECCAK224_BLOCKSIZE/8)
+#define KECCAK224_BLOCKSIZE_B (KECCAK224_BLOCKSIZE / 8)
 #define KECCAK256_BLOCKSIZE 1088
-#define KECCAK256_BLOCKSIZE_B (KECCAK256_BLOCKSIZE/8)
+#define KECCAK256_BLOCKSIZE_B (KECCAK256_BLOCKSIZE / 8)
 #define KECCAK384_BLOCKSIZE  832
-#define KECCAK384_BLOCKSIZE_B (KECCAK384_BLOCKSIZE/8)
+#define KECCAK384_BLOCKSIZE_B (KECCAK384_BLOCKSIZE / 8)
 #define KECCAK512_BLOCKSIZE  576
-#define KECCAK512_BLOCKSIZE_B (KECCAK512_BLOCKSIZE/8)
+#define KECCAK512_BLOCKSIZE_B (KECCAK512_BLOCKSIZE / 8)
 
 typedef struct{
        uint64_t a[5][5];
index 4d60c4ce3ed24460c68bcef765039d26c2551ae3..a80d2b5e39025afa7f1f85fa9593a7cf1a5692ab 100644 (file)
 #define ROTR_3 (8+3)
 
 
-#define ROT_BIT(a) (((a)<=4)?((a)<<1):(0x01|((8-(a))<<1)))
+#define ROT_BIT(a) (((a) <= 4) ? ((a) << 1) : (0x01 | ((8 - (a)) << 1)))
 
 //#define ROT_CODE(a,b) (((a)<<4) | ((b)&0x0f))
 
-#define ROT_CODE(a) ((((a)/8+((((a)%8)>4)?1:0))<<4) | ROT_BIT(((a)%8)))
+#define ROT_CODE(a) ((((a) / 8 + ((((a) % 8) > 4) ? 1 : 0)) << 4) | ROT_BIT(((a) % 8)))
 //#define ROT_CODE(a) ((((a)/8)<<4) | ((a)%8)) /* rotations only to the left */
 
 uint64_t rotate64_1bit_left(uint64_t a);