9 template<
int N=232,
int M=232>
20 for(
int i = 0; i < N; ++i)
21 for(
int j = 0; j < M; ++j) {
22 matrix[i][j] = (bM[i][j]%2 == 1);
29 for(
int i = 0; i < dim; ++i) {
31 for(
int j = 0; j < M; ++j) {
40 for(i = 0; i < n/N; ++i) {
44 circuitN(out+(i*N) , in+(N+M)*i, n%N);
48 void genN(
bool* out,
bool * in,
PRG * prg,
int dim = N) {
52 for(
int i = 0; i < M; ++i)
53 out[i] = (tmp[i]%2==1);
55 for(
int i = 0; i < dim; ++i) {
57 for(
int j = 0; j < M; ++j) {
58 if( matrix[i][j] == 1)
61 out[M+i] = res ^ in[i];
67 else return (M+N)*(n/N+1);
73 void gen(
bool * out,
bool * in) {
75 for(i = 0; i < n/N; ++i) {
76 genN(out+(i*(N+M)), in+N*i, &prg, N);
79 genN(out+(i*(N+M)) , in+N*i, &prg, n%N);
block blockM[N][M]
Definition: xor_tree.h:13
void genN(bool *out, bool *in, PRG *prg, int dim=N)
Definition: xor_tree.h:48
__m128i block
Definition: block.h:8
int input_size()
Definition: xor_tree.h:69
bool matrix[N][M]
Definition: xor_tree.h:12
block xorBlocks(block x, block y)
Definition: block.h:35
XorTree(int n, int ssp=40)
Definition: xor_tree.h:14
void circuit(block *out, block *in)
Definition: xor_tree.h:38
#define zero_block()
Definition: block.h:66
void gen(bool *out, bool *in)
Definition: xor_tree.h:73
void circuitN(block *out, block *in, int dim=N)
Definition: xor_tree.h:26
Definition: xor_tree.h:10
const char fix_key[]
Definition: block.h:130
void random_data(void *data, int nbytes)
Definition: prg.h:49
int ssp
Definition: xor_tree.h:11
int n
Definition: xor_tree.h:11
#define one_block()
Definition: block.h:67
int output_size()
Definition: xor_tree.h:64
block andBlocks(block x, block y)
Definition: block.h:36