-
Notifications
You must be signed in to change notification settings - Fork 1
/
reduce.h
34 lines (24 loc) · 885 Bytes
/
reduce.h
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
33
34
/*
* Implementors: EagleSign Team
* This implementation is highly inspired from Dilithium and
* Falcon Signatures' implementations
*/
#ifndef REDUCE_H
#define REDUCE_H
#include <stdint.h>
#include "params.h"
#define add EAGLESIGN_NAMESPACE(add)
S_DOUBLE_Q_SIZE add(S_DOUBLE_Q_SIZE x, S_DOUBLE_Q_SIZE y);
#define sub EAGLESIGN_NAMESPACE(sub)
S_DOUBLE_Q_SIZE sub(S_DOUBLE_Q_SIZE x, S_DOUBLE_Q_SIZE y);
#define rshift1 EAGLESIGN_NAMESPACE(rshift1)
S_DOUBLE_Q_SIZE rshift1(S_DOUBLE_Q_SIZE x);
#define montymul EAGLESIGN_NAMESPACE(montymul)
S_DOUBLE_Q_SIZE montymul(S_DOUBLE_Q_SIZE x, S_DOUBLE_Q_SIZE y);
#define montymul2 EAGLESIGN_NAMESPACE(montymul2)
S_DOUBLE_Q_SIZE montymul2(S_DOUBLE_Q_SIZE x, S_DOUBLE_Q_SIZE y);
#define addq EAGLESIGN_NAMESPACE(addq)
Q_SIZE addq(S_Q_SIZE r);
#define reduce EAGLESIGN_NAMESPACE(reduce)
S_DOUBLE_Q_SIZE reduce(S_DOUBLE_Q_SIZE y);
#endif