#include <botan/sha2_32.h>
#include <botan/loadstor.h>
#include <botan/rotate.h>
Go to the source code of this file.
|
#define | SHA2_32_F(A, B, C, D, E, F, G, H, M1, M2, M3, M4, magic) |
|
◆ SHA2_32_F
#define SHA2_32_F |
( |
|
A, |
|
|
|
B, |
|
|
|
C, |
|
|
|
D, |
|
|
|
E, |
|
|
|
F, |
|
|
|
G, |
|
|
|
H, |
|
|
|
M1, |
|
|
|
M2, |
|
|
|
M3, |
|
|
|
M4, |
|
|
|
magic |
|
) |
| |
Value: do { \
uint32_t A_rho = rotr<2>(A) ^ rotr<13>(A) ^ rotr<22>(A); \
uint32_t E_rho = rotr<6>(E) ^ rotr<11>(E) ^ rotr<25>(E); \
uint32_t M2_sigma = rotr<17>(M2) ^ rotr<19>(M2) ^ (M2 >> 10); \
uint32_t M4_sigma = rotr<7>(M4) ^ rotr<18>(M4) ^ (M4 >> 3); \
H += magic + E_rho + ((E & F) ^ (~E & G)) + M1; \
D += H; \
H += A_rho + ((A & B) | ((A | B) & C)); \
M1 += M2_sigma + M3 + M4_sigma; \
} while(0);
Definition at line 21 of file sha2_32_bmi2.cpp.
21 { \
22 uint32_t A_rho = rotr<2>(A) ^ rotr<13>(A) ^ rotr<22>(A); \
23 uint32_t E_rho = rotr<6>(E) ^ rotr<11>(E) ^ rotr<25>(E); \
24 uint32_t M2_sigma = rotr<17>(M2) ^ rotr<19>(M2) ^ (M2 >> 10); \
25 uint32_t M4_sigma = rotr<7>(M4) ^ rotr<18>(M4) ^ (M4 >> 3); \
26 H += magic + E_rho + ((E & F) ^ (~E & G)) + M1; \
27 D += H; \
28 H += A_rho + ((A & B) | ((A | B) & C)); \
29 M1 += M2_sigma + M3 + M4_sigma; \
30 } while(0);