2 * Author......: Jens Steube <jens.steube@gmail.com>
26 #define u8x(a,b) (u8x) (a,b)
27 #define u16x(a,b) (u16x) (a,b)
28 #define u32x(a,b) (u32x) (a,b)
29 #define u64x(a,b) (u64x) (a,b)
39 #define u8x(a,b,c,d) (u8x) (a,b,c,d)
40 #define u16x(a,b,c,d) (u16x) (a,b,c,d)
41 #define u32x(a,b,c,d) (u32x) (a,b,c,d)
42 #define u64x(a,b,c,d) (u64x) (a,b,c,d)
45 static inline bool allx (const u32 r
)
50 static inline u32
rotr32 (const u32 a
, const u32 n
)
52 return amd_bitalign (a
, a
, n
);
55 static inline u32
rotl32 (const u32 a
, const u32 n
)
60 static inline u32
l32_from_64 (u64 a
)
62 const u32 r
= (uint
) (a
);
67 static inline u32
h32_from_64 (u64 a
)
71 const u32 r
= (uint
) (a
);
76 static inline u64
hl32_to_64 (const u32 a
, const u32 b
)
78 return as_ulong ((uint2
) (b
, a
));
81 static inline u64
rotr64 (const u64 a
, const u32 n
)
83 uint2 a2
= as_uint2 (a
);
87 t
.s0
= (n
>= 32) ? amd_bitalign (a2
.s0
, a2
.s1
, n
- 32)
88 : amd_bitalign (a2
.s1
, a2
.s0
, n
);
89 t
.s1
= (n
>= 32) ? amd_bitalign (a2
.s1
, a2
.s0
, n
- 32)
90 : amd_bitalign (a2
.s0
, a2
.s1
, n
);
95 static inline u64
rotl64 (const u64 a
, const u32 n
)
97 return rotr64 (a
, 64 - n
);
101 static inline bool allx (const int2 r
)
106 static inline u32x
rotl32 (const u32x a
, const u32 n
)
108 return (u32x
) (rotl32 (a
.s0
, n
),
112 static inline u32x
rotr32 (const u32x a
, const u32 n
)
114 return (u32x
) (rotr32 (a
.s0
, n
),
118 static inline u64x
rotl64 (const u64x a
, const u32 n
)
120 return (u64x
) (rotl64 (a
.s0
, n
),
124 static inline u64x
rotr64 (const u64x a
, const u32 n
)
126 return (u64x
) (rotr64 (a
.s0
, n
),
130 static inline u32x
l32_from_64 (const u64x a
)
132 return (u32x
) (l32_from_64 (a
.s0
),
136 static inline u32x
h32_from_64 (const u64x a
)
138 return (u32x
) (h32_from_64 (a
.s0
),
142 static inline u64x
hl32_to_64 (const u32x a
, const u32x b
)
144 return (u64x
) (hl32_to_64 (a
.s0
, b
.s0
),
145 hl32_to_64 (a
.s1
, b
.s1
));
152 static inline bool allx (const int4 r
)
157 static inline u32x
rotl32 (const u32x a
, const u32 n
)
159 return (u32x
) (rotl32 (a
.s0
, n
),
165 static inline u32x
rotr32 (const u32x a
, const u32 n
)
167 return (u32x
) (rotr32 (a
.s0
, n
),
173 static inline u64x
rotl64 (const u64x a
, const u32 n
)
175 return (u64x
) (rotl64 (a
.s0
, n
),
181 static inline u64x
rotr64 (const u64x a
, const u32 n
)
183 return (u64x
) (rotr64 (a
.s0
, n
),
189 static inline u32x
l32_from_64 (const u64x a
)
191 return (u32x
) (l32_from_64 (a
.s0
),
197 static inline u32x
h32_from_64 (const u64x a
)
199 return (u32x
) (h32_from_64 (a
.s0
),
205 static inline u64x
hl32_to_64 (const u32x a
, const u32x b
)
207 return (u64x
) (hl32_to_64 (a
.s0
, b
.s0
),
208 hl32_to_64 (a
.s1
, b
.s1
),
209 hl32_to_64 (a
.s2
, b
.s2
),
210 hl32_to_64 (a
.s3
, b
.s3
));
226 #elif defined _BCRYPT_
228 #elif defined _SHA256_
230 #elif defined _SHA384_
232 #elif defined _SHA512_
234 #elif defined _KECCAK_
236 #elif defined _RIPEMD160_
238 #elif defined _WHIRLPOOL_
242 #elif defined _GOST2012_256_
244 #elif defined _GOST2012_512_
250 #elif defined _MYSQL323_
252 #elif defined _LOTUS5_
254 #elif defined _LOTUS6_
256 #elif defined _SCRYPT_
258 #elif defined _LOTUS8_
260 #elif defined _OFFICE2007_
262 #elif defined _OFFICE2010_
264 #elif defined _OFFICE2013_
266 #elif defined _OLDOFFICE01_
268 #elif defined _OLDOFFICE34_
270 #elif defined _SIPHASH_
272 #elif defined _PBKDF2_MD5_
274 #elif defined _PBKDF2_SHA1_
276 #elif defined _PBKDF2_SHA256_
278 #elif defined _PBKDF2_SHA512_
280 #elif defined _PDF17L8_
282 #elif defined _CRC32_
284 #elif defined _SEVEN_ZIP_
286 #elif defined _ANDROIDFDE_
292 #elif defined _MD5_SHA1_
294 #elif defined _SHA1_MD5_
296 #elif defined _NETNTLMV2_
298 #elif defined _KRB5PA_
300 #elif defined _CLOUDKEY_
302 #elif defined _SCRYPT_
304 #elif defined _PSAFE2_
306 #elif defined _LOTUS8_
310 #elif defined _SHA256_SHA1_
312 #elif defined _MS_DRSR_
375 u32 cry_master_buf
[64];
377 u32 public_key_buf
[64];
418 u32 userdomain_buf
[64];
481 u32 encryptedVerifier
[4];
482 u32 encryptedVerifierHash
[5];
490 u32 encryptedVerifier
[4];
491 u32 encryptedVerifierHash
[8];
497 u32 encryptedVerifier
[4];
498 u32 encryptedVerifierHash
[8];
505 u32 encryptedVerifier
[4];
506 u32 encryptedVerifierHash
[4];
514 u32 encryptedVerifier
[4];
515 u32 encryptedVerifierHash
[5];
563 u64x l_alt_result
[8];
584 } bitcoin_wallet_tmp_t
;
690 } pbkdf2_sha256_tmp_t
;
700 } pbkdf2_sha512_tmp_t
;
925 u32 alignment_placeholder_1
;
926 u32 alignment_placeholder_2
;
927 u32 alignment_placeholder_3
;