crypto: prng - Deterministic CPRNG
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / crypto / prng.h
blob1ac9be5009b741a9ef6282fbd86936348fa34903
1 /*
2 * PRNG: Pseudo Random Number Generator
4 * (C) Neil Horman <nhorman@tuxdriver.com>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * any later version.
14 #ifndef _PRNG_H_
15 #define _PRNG_H_
16 struct prng_context;
18 int get_prng_bytes(char *buf, int nbytes, struct prng_context *ctx);
19 struct prng_context *alloc_prng_context(void);
20 int reset_prng_context(struct prng_context *ctx,
21 unsigned char *key, unsigned char *iv,
22 unsigned char *V,
23 unsigned char *DT);
24 void free_prng_context(struct prng_context *ctx);
26 #endif