Home
last modified time | relevance | path

Searched full:entropy (Results 1 – 25 of 1266) sorted by relevance

12345678910>>...51

/external/libjpeg-turbo/
Djcphuff.c13 * This file contains Huffman entropy encoding routines for progressive JPEG.
77 /* Expanded entropy encoder object for progressive Huffman encoding. */
208 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in start_pass_phuff() local
213 entropy->cinfo = cinfo; in start_pass_phuff()
214 entropy->gather_statistics = gather_statistics; in start_pass_phuff()
223 entropy->pub.encode_mcu = encode_mcu_DC_first; in start_pass_phuff()
225 entropy->pub.encode_mcu = encode_mcu_AC_first; in start_pass_phuff()
227 entropy->AC_first_prepare = jsimd_encode_mcu_AC_first_prepare; in start_pass_phuff()
229 entropy->AC_first_prepare = encode_mcu_AC_first_prepare; in start_pass_phuff()
232 entropy->pub.encode_mcu = encode_mcu_DC_refine; in start_pass_phuff()
[all …]
Djcarith.c11 * This file contains portable arithmetic entropy encoding routines for JPEG
27 /* Expanded entropy encoder object for arithmetic encoding. */
141 arith_entropy_ptr e = (arith_entropy_ptr)cinfo->entropy; in finish_pass()
227 register arith_entropy_ptr e = (arith_entropy_ptr)cinfo->entropy; in arith_encode()
327 arith_entropy_ptr entropy = (arith_entropy_ptr)cinfo->entropy; in emit_restart() local
341 MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); in emit_restart()
343 entropy->last_dc_val[ci] = 0; in emit_restart()
344 entropy->dc_context[ci] = 0; in emit_restart()
348 MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); in emit_restart()
353 entropy->c = 0; in emit_restart()
[all …]
Djdarith.c11 * This file contains portable arithmetic entropy encoding routines for JPEG
30 /* Expanded entropy decoder object for arithmetic decoding. */
117 register arith_entropy_ptr e = (arith_entropy_ptr)cinfo->entropy; in arith_decode()
201 arith_entropy_ptr entropy = (arith_entropy_ptr)cinfo->entropy; in process_restart() local
213 MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); in process_restart()
215 entropy->last_dc_val[ci] = 0; in process_restart()
216 entropy->dc_context[ci] = 0; in process_restart()
219 MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); in process_restart()
224 entropy->c = 0; in process_restart()
225 entropy->a = 0; in process_restart()
[all …]
Djdphuff.c11 * This file contains Huffman entropy decoding routines for progressive JPEG.
33 * Expanded entropy decoder object for progressive Huffman decoding.
82 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in start_pass_phuff_decoder() local
147 entropy->pub.decode_mcu = decode_mcu_DC_first; in start_pass_phuff_decoder()
149 entropy->pub.decode_mcu = decode_mcu_AC_first; in start_pass_phuff_decoder()
152 entropy->pub.decode_mcu = decode_mcu_DC_refine; in start_pass_phuff_decoder()
154 entropy->pub.decode_mcu = decode_mcu_AC_refine; in start_pass_phuff_decoder()
165 pdtbl = (d_derived_tbl **)(entropy->derived_tbls) + tbl; in start_pass_phuff_decoder()
170 pdtbl = (d_derived_tbl **)(entropy->derived_tbls) + tbl; in start_pass_phuff_decoder()
173 entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; in start_pass_phuff_decoder()
[all …]
Djdhuff.c12 * This file contains Huffman entropy decoding routines.
33 * Expanded entropy decoder object for Huffman decoding.
79 huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy; in start_pass_huff_decoder() local
98 pdtbl = (d_derived_tbl **)(entropy->dc_derived_tbls) + dctbl; in start_pass_huff_decoder()
100 pdtbl = (d_derived_tbl **)(entropy->ac_derived_tbls) + actbl; in start_pass_huff_decoder()
103 entropy->saved.last_dc_val[ci] = 0; in start_pass_huff_decoder()
111 entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no]; in start_pass_huff_decoder()
112 entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no]; in start_pass_huff_decoder()
115 entropy->dc_needed[blkn] = TRUE; in start_pass_huff_decoder()
117 entropy->ac_needed[blkn] = (compptr->_DCT_scaled_size > 1); in start_pass_huff_decoder()
[all …]
Djchuff.c14 * This file contains Huffman entropy encoding routines.
69 /* Expanded entropy encoder object for Huffman encoding.
167 huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy; in start_pass_huff() local
173 entropy->pub.encode_mcu = encode_mcu_gather; in start_pass_huff()
174 entropy->pub.finish_pass = finish_pass_gather; in start_pass_huff()
179 entropy->pub.encode_mcu = encode_mcu_huff; in start_pass_huff()
180 entropy->pub.finish_pass = finish_pass_huff; in start_pass_huff()
183 entropy->simd = jsimd_can_huff_encode_one_block(); in start_pass_huff()
199 if (entropy->dc_count_ptrs[dctbl] == NULL) in start_pass_huff()
200 entropy->dc_count_ptrs[dctbl] = (long *) in start_pass_huff()
[all …]
/external/openthread/third_party/mbedtls/repo/tests/suites/
Dtest_suite_entropy.data1 Entropy init-free-free
4 Entropy init-free-init-free
10 Entropy write/update seed file: good
13 Entropy write/update seed file: nonexistent
16 Entropy write/update seed file: base NV seed file
19 Entropy no sources
22 Entropy too many sources
25 Entropy output length: 0
28 Entropy output length: 1
31 Entropy output length: 2
[all …]
Dtest_suite_ctr_drbg.function2 #include "mbedtls/entropy.h"
28 int entropy_len_arg, data_t * entropy,
43 test_max_idx = entropy->len;
45 /* CTR_DRBG_Instantiate(entropy[:entropy->len], nonce, perso, <ignored>)
51 mbedtls_test_entropy_func, entropy->x,
60 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
77 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
138 void ctr_drbg_validate_no_reseed( data_t * add_init, data_t * entropy,
144 entropy->len, entropy,
152 void ctr_drbg_validate_pr( data_t * add_init, data_t * entropy,
[all …]
Dtest_suite_hmac_drbg.function39 entropy_ctx entropy;
48 entropy.len = sizeof( buf );
49 entropy.p = buf;
63 /* Init must use entropy */
64 TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_test_entropy_func, &entropy,
66 /* default_entropy_len of entropy, plus half as much for the nonce */
68 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy );
71 * 2 * reps so the next few calls should not use entropy */
78 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy );
89 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy );
[all …]
Dtest_suite_random.function8 #include "mbedtls/entropy.h"
24 mbedtls_entropy_context entropy;
30 mbedtls_entropy_init( &entropy );
33 mbedtls_entropy_func, &entropy,
38 mbedtls_entropy_free( &entropy );
41 mbedtls_entropy_init( &entropy );
44 mbedtls_entropy_func, &entropy,
49 mbedtls_entropy_free( &entropy );
56 mbedtls_entropy_free( &entropy );
63 mbedtls_entropy_context entropy;
[all …]
/external/mbedtls/tests/suites/
Dtest_suite_entropy.data1 Entropy init-free-free
4 Entropy init-free-init-free
10 Entropy write/update seed file: good
13 Entropy write/update seed file: nonexistent
16 Entropy write/update seed file: base NV seed file
19 Entropy no sources
22 Entropy too many sources
25 Entropy output length: 0
28 Entropy output length: 1
31 Entropy output length: 2
[all …]
Dtest_suite_ctr_drbg.function2 #include "mbedtls/entropy.h"
28 int entropy_len_arg, data_t * entropy,
43 test_max_idx = entropy->len;
45 /* CTR_DRBG_Instantiate(entropy[:entropy->len], nonce, perso, <ignored>)
51 mbedtls_test_entropy_func, entropy->x,
60 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
77 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
138 void ctr_drbg_validate_no_reseed( data_t * add_init, data_t * entropy,
144 entropy->len, entropy,
152 void ctr_drbg_validate_pr( data_t * add_init, data_t * entropy,
[all …]
Dtest_suite_hmac_drbg.function39 entropy_ctx entropy;
48 entropy.len = sizeof( buf );
49 entropy.p = buf;
63 /* Init must use entropy */
64 TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_test_entropy_func, &entropy,
66 /* default_entropy_len of entropy, plus half as much for the nonce */
68 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy );
71 * 2 * reps so the next few calls should not use entropy */
78 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy );
89 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy );
[all …]
Dtest_suite_random.function8 #include "mbedtls/entropy.h"
24 mbedtls_entropy_context entropy;
30 mbedtls_entropy_init( &entropy );
33 mbedtls_entropy_func, &entropy,
38 mbedtls_entropy_free( &entropy );
41 mbedtls_entropy_init( &entropy );
44 mbedtls_entropy_func, &entropy,
49 mbedtls_entropy_free( &entropy );
56 mbedtls_entropy_free( &entropy );
63 mbedtls_entropy_context entropy;
[all …]
/external/rappor/client/javatest/com/google/rappor/
DHmacDrbgTest.java29 byte[] entropy = in testHmacDrbgNistCase0()
38 HmacDrbg drbg = new HmacDrbg(Bytes.concat(entropy, nonce), null); in testHmacDrbgNistCase0()
48 byte[] entropy = in testHmacDrbgNistCase1()
57 HmacDrbg drbg = new HmacDrbg(Bytes.concat(entropy, nonce), null); in testHmacDrbgNistCase1()
67 byte[] entropy = in testHmacDrbgNistCase2()
76 HmacDrbg drbg = new HmacDrbg(Bytes.concat(entropy, nonce), null); in testHmacDrbgNistCase2()
86 byte[] entropy = in testHmacDrbgNistCase3()
95 HmacDrbg drbg = new HmacDrbg(Bytes.concat(entropy, nonce), null); in testHmacDrbgNistCase3()
105 byte[] entropy = in testHmacDrbgNistCase4()
114 HmacDrbg drbg = new HmacDrbg(Bytes.concat(entropy, nonce), null); in testHmacDrbgNistCase4()
[all …]
/external/mbedtls/include/mbedtls/
Dentropy.h2 * \file entropy.h
4 * \brief Entropy accumulator implementation
45 /** Critical entropy source failure. */
69 #define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources …
75 #define MBEDTLS_ENTROPY_BLOCK_SIZE 64 /**< Block size of entropy accumulator (SHA-512) */
77 #define MBEDTLS_ENTROPY_BLOCK_SIZE 32 /**< Block size of entropy accumulator (SHA-256) */
83 #define MBEDTLS_ENTROPY_SOURCE_STRONG 1 /**< Entropy source is strong */
84 #define MBEDTLS_ENTROPY_SOURCE_WEAK 0 /**< Entropy source is weak */
91 * \brief Entropy poll callback pointer
105 * \brief Entropy source state
[all …]
Dctr_drbg.h53 /** The entropy source failed. */
57 /** The input (entropy + additional data) is too large. */
94 * \brief The amount of entropy used per seed by default, in bytes.
98 /** This is 48 bytes because the entropy module uses SHA-512
105 /** This is 32 bytes because the entropy module uses SHA-256
150 /** The default length of the nonce read from the entropy source.
152 * This is \c 0 because a single read from the entropy source is sufficient
158 /** The default length of the nonce read from the entropy source.
160 * This is half of the default entropy length because a single read from
161 * the entropy source does not provide enough material to form a nonce.
[all …]
/external/openthread/third_party/mbedtls/repo/include/mbedtls/
Dentropy.h2 * \file entropy.h
4 * \brief Entropy accumulator implementation
51 /** Critical entropy source failure. */
75 #define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources …
81 #define MBEDTLS_ENTROPY_BLOCK_SIZE 64 /**< Block size of entropy accumulator (SHA-512) */
83 #define MBEDTLS_ENTROPY_BLOCK_SIZE 32 /**< Block size of entropy accumulator (SHA-256) */
89 #define MBEDTLS_ENTROPY_SOURCE_STRONG 1 /**< Entropy source is strong */
90 #define MBEDTLS_ENTROPY_SOURCE_WEAK 0 /**< Entropy source is weak */
97 * \brief Entropy poll callback pointer
111 * \brief Entropy source state
[all …]
Dctr_drbg.h56 /** The entropy source failed. */
60 /** The input (entropy + additional data) is too large. */
97 * \brief The amount of entropy used per seed by default, in bytes.
101 /** This is 48 bytes because the entropy module uses SHA-512
108 /** This is 32 bytes because the entropy module uses SHA-256
153 /** The default length of the nonce read from the entropy source.
155 * This is \c 0 because a single read from the entropy source is sufficient
161 /** The default length of the nonce read from the entropy source.
163 * This is half of the default entropy length because a single read from
164 * the entropy source does not provide enough material to form a nonce.
[all …]
/external/arm-trusted-firmware/services/std_svc/trng/
Dtrng_entropy_pool.c14 * # Entropy pool
15 * Note that the TRNG Firmware interface can request up to 192 bits of entropy
18 * 192 bits of entropy, we don't have to throw out the leftover 1-63 bits of
19 * entropy.
22 static uint64_t entropy[WORDS_IN_POOL]; variable
23 /* index in bits of the first bit of usable entropy */
25 /* then number of valid bits in the entropy pool */
30 #define BITS_PER_WORD (sizeof(entropy[0]) * 8)
40 * Fill the entropy pool until we have at least as many bits as requested.
41 * Returns true after filling the pool, and false if the entropy source is out
[all …]
/external/cronet/components/metrics/
Dentropy_state.h18 // A class to get entropy source values from the PrefService.
22 // the entropy source value from this helper class.
34 // Returns the high entropy source for this client, which is composed of a
35 // client ID and the low entropy source. This is intended to be unique for
40 // Returns the low entropy source that is used to randomize field trials on
45 // Returns the pseudo low entropy source for this client. Generates a new
50 // Returns the old low entropy source for this client. Does not generate a new
55 // The argument used to generate a non-identifying entropy source. We want no
56 // more than 13 bits of entropy, so use this max to return a number in the
57 // range [0, 7999] as the entropy source (12.97 bits of entropy).
[all …]
/external/boringssl/src/crypto/fipsmodule/rand/
Drand.c36 // entropy which is accessed via |CRYPTO_sysrand[_for_seed]|. (If the operating
37 // system entropy source fails, it's up to |CRYPTO_sysrand| to abort the
46 // (We assume that the OS entropy is safe from fork()ing and VM duplication.
174 // In passive entropy mode, entropy is supplied from outside of the module via
179 // bytes contains entropy suitable for seeding a DRBG.
186 // obtained via a method other than from the kernel. In these cases entropy
194 void RAND_load_entropy(const uint8_t *entropy, size_t entropy_len, in RAND_load_entropy() argument
204 OPENSSL_memcpy(&buffer->bytes[buffer->bytes_valid], entropy, entropy_len); in RAND_load_entropy()
239 // rand_get_seed fills |seed| with entropy. In some cases, it will additionally
240 // fill |additional_input| with entropy to supplement |seed|. It sets
[all …]
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/rand/
Drand.c36 // entropy which is accessed via |CRYPTO_sysrand[_for_seed]|. (If the operating
37 // system entropy source fails, it's up to |CRYPTO_sysrand| to abort the
46 // (We assume that the OS entropy is safe from fork()ing and VM duplication.
174 // In passive entropy mode, entropy is supplied from outside of the module via
179 // bytes contains entropy suitable for seeding a DRBG.
186 // obtained via a method other than from the kernel. In these cases entropy
194 void RAND_load_entropy(const uint8_t *entropy, size_t entropy_len, in RAND_load_entropy() argument
204 OPENSSL_memcpy(&buffer->bytes[buffer->bytes_valid], entropy, entropy_len); in RAND_load_entropy()
239 // rand_get_seed fills |seed| with entropy. In some cases, it will additionally
240 // fill |additional_input| with entropy to supplement |seed|. It sets
[all …]
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/rand/
Dinternal.h44 // CRYPTO_get_seed_entropy writes |out_entropy_len| bytes of entropy, suitable
46 // entropy came directly from the CPU and zero if it came from the OS. It
47 // actively obtains entropy from the CPU/OS and so should not be called from
52 // RAND_load_entropy supplies |entropy_len| bytes of entropy to the module. The
53 // |from_cpu| parameter is true iff the entropy was obtained directly from the
55 void RAND_load_entropy(const uint8_t *entropy, size_t entropy_len,
59 // when the module has stopped because it has run out of entropy.
64 // CRYPTO_sysrand fills |len| bytes at |buf| with entropy from the operating
68 // CRYPTO_sysrand_for_seed fills |len| bytes at |buf| with entropy from the
74 // CRYPTO_init_sysrand initializes long-lived resources needed to draw entropy
[all …]
Drand.c37 // entropy which is accessed via |CRYPTO_sysrand[_for_seed]|. (If the operating
38 // system entropy source fails, it's up to |CRYPTO_sysrand| to abort the
47 // (We assume that the OS entropy is safe from fork()ing and VM duplication.
181 // In passive entropy mode, entropy is supplied from outside of the module via
186 // bytes contains entropy suitable for seeding a DRBG.
199 void RAND_load_entropy(const uint8_t *entropy, size_t entropy_len, in RAND_load_entropy() argument
209 OPENSSL_memcpy(&buffer->bytes[buffer->bytes_valid], entropy, entropy_len); in RAND_load_entropy()
243 // rand_get_seed fills |seed| with entropy and sets |*out_used_cpu| to one if
244 // that entropy came directly from the CPU and zero otherwise.
254 uint8_t entropy[CTR_DRBG_ENTROPY_LEN * BORINGSSL_FIPS_OVERREAD]; in rand_get_seed() local
[all …]

12345678910>>...51