-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsha512avx.h
More file actions
32 lines (26 loc) · 832 Bytes
/
Copy pathsha512avx.h
File metadata and controls
32 lines (26 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef SHA512AVX_H
#define SHA512AVX_H
#include <stdint.h>
#include "immintrin.h"
namespace slh_dsa {
typedef struct SHA512state4x {
__m256i s[8];
unsigned char msgblocks[4*128];
int datalen;
unsigned long long msglen;
} sha512ctx4x;
void sha512_init_frombytes_x4(sha512ctx4x *ctx, uint64_t *s, unsigned long long msglen);
void sha512_init4x(sha512ctx4x *ctx);
void sha512_update4x(sha512ctx4x *ctx,
const void *d0,
const void *d1,
const void *d2,
const void *d3,
unsigned long long len);
void sha512_final4x(sha512ctx4x *ctx,
__m256i out0[2],
__m256i out1[2],
__m256i out2[2],
__m256i out3[2]);
} /* slh_dsa */
#endif