| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
sober128.h
Go to the documentation of this file.
1
11/* About LibTomCrypt:
12 * ---------------------------------------------------------------------
13 * LibTomCrypt, modular cryptographic library -- Tom St Denis
14 *
15 * LibTomCrypt is a library that provides various cryptographic
16 * algorithms in a highly modular and flexible manner.
17 *
18 * The library is free for all purposes without any express
19 * guarantee it works.
20 *
21 * Tom St Denis, tomstdenis@iahu.ca, http://www.libtom.net/LibTomCrypt/
22 */
23
24#ifndef _SOBER127_H
25#define _SOBER127_H
26
27#include "ws_symbol_export.h"
28
36 typedef struct _sober128_prng {
37 unsigned long R[17];
38 unsigned long initR[17];
39 unsigned long konst;
40 unsigned long sbuf;
42 int nbuf;
43 int flag;
44 int set;
45} sober128_prng;
46
53WS_DLL_PUBLIC
54 int sober128_start(sober128_prng *prng);
55
66WS_DLL_PUBLIC
67 int sober128_add_entropy(const unsigned char *buf, unsigned long len, sober128_prng *prng);
68
80WS_DLL_PUBLIC
81 unsigned long sober128_read(unsigned char *buf, unsigned long len, sober128_prng *prng);
82
83#endif /* sober128.h */
sober128_prng
struct _sober128_prng sober128_prng
Internal state structure for the Sober128 pseudorandom number generator.
sober128_start
WS_DLL_PUBLIC int sober128_start(sober128_prng *prng)
Initialize a Sober128 PRNG instance.
Definition sober128.c:270
sober128_read
WS_DLL_PUBLIC unsigned long sober128_read(unsigned char *buf, unsigned long len, sober128_prng *prng)
Generate random bytes from a Sober128 PRNG instance.
Definition sober128.c:413
sober128_add_entropy
WS_DLL_PUBLIC int sober128_add_entropy(const unsigned char *buf, unsigned long len, sober128_prng *prng)
Inject entropy into a Sober128 PRNG instance.
Definition sober128.c:356
_sober128_prng
Internal state structure for the Sober128 pseudorandom number generator.
Definition sober128.h:36
_sober128_prng::initR
unsigned long initR[17]
Definition sober128.h:38
_sober128_prng::nbuf
int nbuf
Definition sober128.h:42
_sober128_prng::flag
int flag
Definition sober128.h:43
_sober128_prng::R
unsigned long R[17]
Definition sober128.h:37
_sober128_prng::konst
unsigned long konst
Definition sober128.h:39
_sober128_prng::set
int set
Definition sober128.h:44
_sober128_prng::sbuf
unsigned long sbuf
Definition sober128.h:40