HomeSort by relevance Sort by last modified time
    Searched refs:prng (Results 1 - 25 of 44) sorted by null

1 2

  /external/dropbear/libtomcrypt/src/prngs/
yarrow.c 15 Yarrow PRNG, Tom St Denis
34 Start the PRNG
35 @param prng [out] The PRNG state to initialize
38 int yarrow_start(prng_state *prng)
42 LTC_ARGCHK(prng != NULL);
47 prng->yarrow.cipher = register_cipher(&rijndael_enc_desc);
49 prng->yarrow.cipher = register_cipher(&aes_enc_desc);
51 prng->yarrow.cipher = register_cipher(&rijndael_desc);
53 prng->yarrow.cipher = register_cipher(&aes_desc)
    [all...]
fortuna.c 15 Fortuna PRNG, Tom St Denis
53 static void fortuna_update_iv(prng_state *prng)
58 IV = prng->fortuna.IV;
65 /* reseed the PRNG */
66 static int fortuna_reseed(prng_state *prng)
72 ++prng->fortuna.reset_cnt;
76 if ((err = sha256_process(&md, prng->fortuna.K, 32)) != CRYPT_OK) {
82 if (x == 0 || ((prng->fortuna.reset_cnt >> (x-1)) & 1) == 0) {
84 if ((err = sha256_done(&prng->fortuna.pool[x], tmp)) != CRYPT_OK) {
94 if ((err = sha256_init(&prng->fortuna.pool[x])) != CRYPT_OK)
    [all...]
rc4.c 15 RC4 PRNG, Tom St Denis
34 Start the PRNG
35 @param prng [out] The PRNG state to initialize
38 int rc4_start(prng_state *prng)
40 LTC_ARGCHK(prng != NULL);
43 prng->rc4.x = 0;
49 Add entropy to the PRNG state
52 @param prng PRNG state to updat
    [all...]
rng_make_prng.c 15 portable way to get secure random bits to feed a PRNG (Tom St Denis)
19 Create a PRNG from a RNG
21 @param wprng Index of which PRNG to setup
22 @param prng [out] PRNG state to initialize
26 int rng_make_prng(int bits, int wprng, prng_state *prng,
32 LTC_ARGCHK(prng != NULL);
43 if ((err = prng_descriptor[wprng].start(prng)) != CRYPT_OK) {
52 if ((err = prng_descriptor[wprng].add_entropy(buf, (unsigned long)bits, prng)) != CRYPT_OK) {
56 if ((err = prng_descriptor[wprng].ready(prng)) != CRYPT_OK)
    [all...]
sprng.c 15 Secure PRNG, Tom St Denis
18 /* A secure PRNG using the RNG functions. Basically this is a
19 * wrapper that allows you to use a secure RNG as a PRNG
39 Start the PRNG
40 @param prng [out] The PRNG state to initialize
43 int sprng_start(prng_state *prng)
49 Add entropy to the PRNG state
52 @param prng PRNG state to updat
    [all...]
sober128.c 105 Start the PRNG
106 @param prng [out] The PRNG state to initialize
109 int sober128_start(prng_state *prng)
114 LTC_ARGCHK(prng != NULL);
116 c = &(prng->sober128);
201 Add entropy to the PRNG state
204 @param prng PRNG state to update
207 int sober128_add_entropy(const unsigned char *in, unsigned long inlen, prng_state *prng)
    [all...]
  /external/dropbear/libtomcrypt/src/headers/
tomcrypt_prng.h 1 /* ---- PRNG Stuff ---- */
66 /** PRNG descriptor */
68 /** Name of the PRNG */
72 /** Start a PRNG state
73 @param prng [out] The state to initialize
76 int (*start)(prng_state *prng);
77 /** Add entropy to the PRNG
80 @param prng The PRNG state
83 int (*add_entropy)(const unsigned char *in, unsigned long inlen, prng_state *prng);
    [all...]
tomcrypt_pkcs.h 31 prng_state *prng,
47 unsigned long modulus_bitlen, prng_state *prng,
58 unsigned long saltlen, prng_state *prng,
tomcrypt_pk.h 8 int rand_prime(void *N, long len, prng_state *prng, int wprng);
39 int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key);
64 prng_state *prng, int prng_idx, int hash_idx, int padding, rsa_key *key);
75 prng_state *prng, int prng_idx,
120 int katja_make_key(prng_state *prng, int wprng, int size, katja_key *key);
132 prng_state *prng, int prng_idx, int hash_idx, katja_key *key);
216 int ecc_make_key(prng_state *prng, int wprng, int keysize, ecc_key *key);
217 int ecc_make_key_ex(prng_state *prng, int wprng, ecc_key *key, const ltc_ecc_set_type *dp);
233 prng_state *prng, int wprng, int hash,
242 prng_state *prng, int wprng, ecc_key *key)
    [all...]
  /external/dropbear/libtomcrypt/src/misc/crypt/
crypt_register_prng.c 15 Register a PRNG, Tom St Denis
19 Register a PRNG with the descriptor table
20 @param prng The PRNG you wish to register
23 int register_prng(const struct ltc_prng_descriptor *prng)
27 LTC_ARGCHK(prng != NULL);
32 if (XMEMCMP(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor)) == 0) {
41 XMEMCPY(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor));
crypt_unregister_prng.c 15 Unregister a PRNG, Tom St Denis
19 Unregister a PRNG from the descriptor table
20 @param prng The PRNG descriptor to remove
23 int unregister_prng(const struct ltc_prng_descriptor *prng)
27 LTC_ARGCHK(prng != NULL);
32 if (XMEMCMP(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor)) != 0) {
  /external/pixman/test/
prng-test.c 4 * Based on the public domain implementation of small noncryptographic PRNG
29 #include "utils-prng.h"
64 prng_t prng; local
67 prng_srand_r (&prng, 1234);
70 prng_randmemset_r (&prng, buf, BUFSIZE, 0);
77 prng_randmemset_r (&prng, buf + 1, BUFSIZE, 0);
85 prng_randmemset_r (&prng, buf, BUFSIZE, RANDMEMSET_MORE_00_AND_FF);
94 prng_randmemset_r (&prng, buf + 1, BUFSIZE, RANDMEMSET_MORE_00_AND_FF);
119 prng_t prng; local
130 prng_srand_r (&prng, 0)
    [all...]
utils-prng.c 4 * Based on the public domain implementation of small noncryptographic PRNG
28 #include "utils-prng.h"
43 * Set a 32-bit seed for PRNG
102 randmemset_internal (prng_t *prng,
108 prng_t local_prng = *prng;
261 *prng = local_prng;
272 void prng_randmemset_r (prng_t *prng,
282 randmemset_internal (prng, buf, size, 0, 0);
284 randmemset_internal (prng, buf, size, RANDMEMSET_MORE_00_AND_FF, 0);
286 randmemset_internal (prng, buf, size, flags, 0)
    [all...]
  /external/dropbear/libtomcrypt/src/math/
rand_prime.c 20 int rand_prime(void *N, long len, prng_state *prng, int wprng)
40 /* valid PRNG? Better be! */
53 if (prng_descriptor[wprng].read(buf, len, prng) != (unsigned long)len) {
  /external/dropbear/libtomcrypt/src/pk/katja/
katja_encrypt_key.c 28 @param prng An active PRNG
29 @param prng_idx The index of the desired prng
37 prng_state *prng, int prng_idx, int hash_idx, katja_key *key)
47 /* valid prng and hash ? */
74 lparamlen, modulus_bitlen, prng, prng_idx, hash_idx,
katja_make_key.c 22 @param prng An active PRNG state
23 @param wprng The index of the PRNG desired
28 int katja_make_key(prng_state *prng, int wprng, int size, katja_key *key)
52 if ((err = rand_prime(q, -size, prng, wprng)) != CRYPT_OK) { goto done; }
57 if ((err = rand_prime(p, size+1, prng, wprng)) != CRYPT_OK) { goto done; }
  /external/dropbear/libtomcrypt/src/pk/pkcs1/
pkcs_1_v1_5_encode.c 26 * \param prng An active PRNG state (only for LTC_PKCS_1_EME)
27 * \param prng_idx The index of the PRNG desired (only for LTC_PKCS_1_EME)
37 prng_state *prng,
52 if (block_type == LTC_PKCS_1_EME) { /* encryption padding, we need a valid PRNG */
77 if (prng_descriptor[prng_idx].read(ps, ps_len, prng) != ps_len) {
85 if (prng_descriptor[prng_idx].read(&ps[i], 1, prng) != 1) {
  /external/dropbear/libtomcrypt/src/pk/rsa/
rsa_encrypt_key.c 28 @param prng An active PRNG
29 @param prng_idx The index of the desired prng
38 prng_state *prng, int prng_idx, int hash_idx, int padding, rsa_key *key)
54 /* valid prng? */
80 lparamlen, modulus_bitlen, prng, prng_idx, hash_idx,
88 modulus_bitlen, prng, prng_idx,
rsa_sign_hash.c 27 @param prng An active PRNG state
28 @param prng_idx The index of the PRNG desired
37 prng_state *prng, int prng_idx,
55 /* valid prng and hash ? */
77 if ((err = pkcs_1_pss_encode(in, inlen, saltlen, prng, prng_idx,
  /external/dropbear/libtomcrypt/src/pk/ecc/
ecc_make_key.c 28 @param prng An active PRNG state
29 @param wprng The index of the PRNG you wish to use
34 int ecc_make_key(prng_state *prng, int wprng, int keysize, ecc_key *key)
45 err = ecc_make_key_ex(prng, wprng, key, &ltc_ecc_sets[x]);
50 int ecc_make_key_ex(prng_state *prng, int wprng, ecc_key *key, const ltc_ecc_set_type *dp)
62 /* good prng? */
79 if (prng_descriptor[wprng].read(buf, (unsigned long)keysize, prng) != (unsigned long)keysize) {
ecc_sign_hash.c 32 @param prng An active PRNG state
33 @param wprng The index of the PRNG you wish to use
39 prng_state *prng, int wprng, ecc_key *key)
74 if ((err = ecc_make_key_ex(prng, wprng, &pubkey, key->dp)) != CRYPT_OK) {
  /external/llvm/lib/Transforms/Utils/
MetaRenamer.cpp 29 // This PRNG is from the ISO C spec. It is intentionally simple and
32 struct PRNG {
62 // Seed our PRNG with simple additive sum of ModuleID. We're looking to
70 PRNG prng; local
71 prng.srand(randSeed);
101 STy->setName((Twine("struct.") + metaNames[prng.rand() %
112 FI->setName(metaNames[prng.rand() % array_lengthof(metaNames)]);
  /external/smack/src/org/xbill/DNS/
UDPClient.java 17 private static SecureRandom prng = new SecureRandom(); field in class:UDPClient
38 int n = prng.nextInt();
68 int port = prng.nextInt(EPHEMERAL_RANGE) +
  /external/dropbear/libtomcrypt/src/pk/dsa/
dsa_make_key.c 22 @param prng An active PRNG state
23 @param wprng The index of the PRNG desired
29 int dsa_make_key(prng_state *prng, int wprng, int group_size, int modulus_size, dsa_key *key)
38 /* check prng */
62 if ((err = rand_prime(key->q, group_size, prng, wprng)) != CRYPT_OK) { goto error; }
68 if (prng_descriptor[wprng].read(buf+1, modulus_size - group_size, prng) != (unsigned long)(modulus_size - group_size)) {
108 if (prng_descriptor[wprng].read(buf, group_size, prng) != (unsigned long)group_size) {
dsa_sign_hash.c 26 @param prng An active PRNG state
27 @param wprng The index of the PRNG desired
33 prng_state *prng, int wprng, dsa_key *key)
68 if (prng_descriptor[wprng].read(buf, key->qord, prng) != (unsigned long)key->qord) {
117 @param prng An active PRNG state
118 @param wprng The index of the PRNG desired
124 prng_state *prng, int wprng, dsa_key *key)
138 if ((err = dsa_sign_hash_raw(in, inlen, r, s, prng, wprng, key)) != CRYPT_OK)
    [all...]

Completed in 344 milliseconds

1 2