mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-24 00:11:27 +00:00
26 lines
726 B
C
26 lines
726 B
C
|
#include "vec.h"
|
||
|
|
||
|
#include "params.h"
|
||
|
|
||
|
extern void PQCLEAN_MCELIECE348864_AVX_vec_mul_asm(uint64_t *, const uint64_t *, const uint64_t *);
|
||
|
extern void PQCLEAN_MCELIECE348864_AVX_vec_mul_sp_asm(uint64_t *, const uint64_t *, const uint64_t *);
|
||
|
|
||
|
|
||
|
void PQCLEAN_MCELIECE348864_AVX_vec_mul(uint64_t *h, const uint64_t *f, const uint64_t *g) {
|
||
|
PQCLEAN_MCELIECE348864_AVX_vec_mul_asm(h, f, g);
|
||
|
}
|
||
|
|
||
|
|
||
|
void PQCLEAN_MCELIECE348864_AVX_vec_mul_sp(uint64_t *h, const uint64_t *f, const uint64_t *g) {
|
||
|
PQCLEAN_MCELIECE348864_AVX_vec_mul_sp_asm(h, f, g);
|
||
|
}
|
||
|
|
||
|
void PQCLEAN_MCELIECE348864_AVX_vec_add(uint64_t *h, const uint64_t *f, const uint64_t *g) {
|
||
|
int b;
|
||
|
|
||
|
for (b = 0; b < GFBITS; b++) {
|
||
|
h[b] = f[b] ^ g[b];
|
||
|
}
|
||
|
}
|
||
|
|