post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
 All Data Structures Files Functions Variables Typedefs Macros Pages
ntru_rnd.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 FH Bielefeld
3  *
4  * This file is part of a FH Bielefeld project.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301 USA
20  */
21 
28 #ifndef NTRU_RND_H
29 #define NTRU_RND_H
30 
31 #include "ntru_params.h"
32 
33 #include <stdlib.h>
34 
35 #include <fmpz_poly.h>
36 
37 
43 int
44 get_rnd_int(void);
45 
51 int
52 get_urnd_int(void);
53 
65 void
66 ntru_get_rnd_tern_poly_num(fmpz_poly_t poly,
67  const ntru_params *params,
68  uint32_t num_ones,
69  uint32_t num_neg_ones,
70  int (*rnd_int)(void));
71 
72 
73 #endif /* NTRU_RND_H */
int get_urnd_int(void)
Definition: ntru_rnd.c:66
NTRU parameters.
void ntru_get_rnd_tern_poly_num(fmpz_poly_t poly, const ntru_params *params, uint32_t num_ones, uint32_t num_neg_ones, int(*rnd_int)(void))
Definition: ntru_rnd.c:86
int get_rnd_int(void)
Definition: ntru_rnd.c:42