Home
last modified time | relevance | path

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

12345678910>>...40

/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/rappor/client/javatest/com/google/android/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/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/boringssl/src/crypto/fipsmodule/rand/
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.
175 // In passive entropy mode, entropy is supplied from outside of the module via
180 // bytes contains entropy suitable for seeding a DRBG.
187 // obtained via a method other than from the kernel. In these cases entropy
195 void RAND_load_entropy(const uint8_t *entropy, size_t entropy_len, in RAND_load_entropy() argument
205 OPENSSL_memcpy(&buffer->bytes[buffer->bytes_valid], entropy, entropy_len); in RAND_load_entropy()
240 // rand_get_seed fills |seed| with entropy and sets
241 // |*out_want_additional_input| to one if that entropy came directly from the
[all …]
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 // |want_additional_input| parameter is true iff the entropy was obtained from
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 …]
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/rand/
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()
246 // in order to obtain entropy from the CPU or OS.
254 // rand_get_seed fills |seed| with entropy and sets |*out_used_cpu| to one if
255 // that entropy came directly from the CPU and zero otherwise.
[all …]
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
54 // RAND_load_entropy supplies |entropy_len| bytes of entropy to the module. The
55 // |from_cpu| parameter is true iff the entropy was obtained directly from the
57 void RAND_load_entropy(const uint8_t *entropy, size_t entropy_len,
61 // when the module has stopped because it has run out of entropy.
67 // CRYPTO_sysrand fills |len| bytes at |buf| with entropy from the operating
72 // CRYPTO_init_sysrand initializes long-lived resources needed to draw entropy
76 // CRYPTO_sysrand_for_seed fills |len| bytes at |buf| with entropy from the
[all …]
/external/wpa_supplicant_8/src/crypto/
Drandom.c8 * This random number generator is used to provide additional entropy to the
62 static unsigned int entropy = 0; variable
137 if (entropy > MIN_COLLECT_ENTROPY && (count & 0x3ff) != 0) { in random_add_randomness()
139 * No need to add more entropy at this point, so save CPU and in random_add_randomness()
144 wpa_printf(MSG_EXCESSIVE, "Add randomness: count=%u entropy=%u", in random_add_randomness()
145 count, entropy); in random_add_randomness()
154 entropy++; in random_add_randomness()
165 wpa_printf(MSG_MSGDUMP, "Get randomness: len=%u entropy=%u", in random_get_bytes()
166 (unsigned int) len, entropy); in random_get_bytes()
180 /* Mix in additional entropy extracted from the internal pool */ in random_get_bytes()
[all …]
/external/libaom/libaom/av1/encoder/
Dtxb_rdopt.h43 * \param[in] txb_ctx Context info for entropy coding transform block
45 * \param[out] rate_cost The entropy cost of coding the transform block
58 /*!\brief Compute the entropy cost of coding coefficients in a transform block.
71 * \param[in] txb_ctx Context info for entropy coding transform
81 /*!\brief Estimate the entropy cost of coding a transform block using Laplacian
86 * This function compute the entropy costs of the end of block position (eob)
89 * Then using \ref av1_cost_coeffs_txb_estimate to estimate the entropy costs
92 * In the end, the function returns the sum of entropy costs of end of block
106 * \param[in] txb_ctx Context info for entropy coding transform block
113 * \return int Estimated entropy cost of coding the transform
[all …]
Dencodetxb.h40 * rate-distortion optimization and entropy coding of transform coefficients.
56 * entropy coding.
61 * the bitstream using entropy coding.
78 * \param[in] w Entropy coding write pointer
94 * macroblock into the bitstream using entropy coding.
107 * \param[in] w Entropy coding write pointer
129 /*!\brief Update the probability model (cdf) and the entropy context related to
136 * model and entropy context properly.
149 /*!\brief Update the probability model (cdf) and the entropy context related to
161 * The entropy context of this transform block will be updated.
[all …]
/external/ms-tpm-20-ref/TPMCmd/Platform/src/
DEntropy.c49 // This is the last 32-bits of hardware entropy produced. We have to check to
89 // This function is used to get available hardware entropy. In a hardware
91 // to get entropy.
93 // < 0 hardware failure of the entropy generator, this is sticky
94 // >= 0 the returned amount of entropy (bytes)
98 unsigned char *entropy, // output buffer in _plat__GetEntropy() argument
107 // Seed the platform entropy source if the entropy source is software. There in _plat__GetEntropy()
113 // entropy. Its primary purpose to make sure that different instances of the in _plat__GetEntropy()
116 // proper entropy using their platform-specific means. in _plat__GetEntropy()
141 // lot of entropy so, to add a bit more, XOR the current time value into in _plat__GetEntropy()
[all …]
/external/ms-tpm-20-ref/TPMCmd/tpm/include/prototypes/
DCryptRand_fp.h45 // indefinitely long in the call to get entropy from the platform
51 // TRUE(1) requested entropy returned
52 // FALSE(0) entropy Failure
56 // entropy
57 BYTE *entropy // OUT: buffer to return collected entropy
69 // entropy is provided, it is used in lieu of using hardware entropy.
70 // Note: the provided entropy must be the required size.
74 // FALSE(0) reseed failed, probably due to the entropy generation
78 DRBG_SEED *providedEntropy, // IN: entropy
94 // This function is used to cause a reseed. A DRBG_SEED amount of entropy is
[all …]
/external/arm-trusted-firmware/plat/arm/board/juno/
Djuno_stack_protector.c15 uint64_t entropy; in plat_get_stack_protector_canary() local
17 if (!plat_get_entropy(&entropy)) { in plat_get_stack_protector_canary()
18 ERROR("Not enough entropy to initialize canary value\n"); in plat_get_stack_protector_canary()
22 if (sizeof(entropy) == sizeof(u_register_t)) { in plat_get_stack_protector_canary()
23 return entropy; in plat_get_stack_protector_canary()
26 return (entropy & 0xffffffffULL) ^ (entropy >> 32); in plat_get_stack_protector_canary()
/external/python/pyopenssl/src/OpenSSL/
Drand.py8 def add(buffer, entropy): argument
12 The *entropy* argument is (the lower bound of) an estimate of how much
21 :param entropy: The entropy (in bytes) measurement of the buffer.
28 if not isinstance(entropy, int):
29 raise TypeError("entropy must be an integer")
31 _lib.RAND_add(buffer, len(buffer), entropy)
/external/ms-tpm-20-ref/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/platform/
DEntropy.c52 // This is the last 32-bits of hardware entropy produced. We have to check to
81 // This function is used to get available hardware entropy. In a hardware
83 // to get entropy.
85 // < 0 hardware failure of the entropy generator, this is sticky
86 // >= 0 the returned amount of entropy (bytes)
90 unsigned char *entropy, // output buffer in _plat__GetEntropy() argument
114 // entropy so, to add a bit more, XOR the current time value into the in _plat__GetEntropy()
115 // returned entropy value. in _plat__GetEntropy()
121 // Only provide entropy 32 bits at a time to test the ability in _plat__GetEntropy()
124 memcpy(entropy, &rndNum, ret); in _plat__GetEntropy()
/external/scapy/scapy/contrib/
Dpnio_rtc.py307 # get data locations and entropy of bytes
312 # Try to find at least 3 high entropy successive bytes (the CRC)
314 entropy = dict(entropies[comm]) # Convert tuples to key => value
320 locations[comm][i], entropy
326 def analyse_one_profisafe_location(location, entropy): argument
330 :param entropy: the entropy of each byte of the packet data
337 # Limit for a CRC is set to 6 bit of entropy min
338 if j in entropy and entropy[j] >= 6:
342 # PROFISafe profiles must end with at least 3 bytes of high entropy
354 """Analyse a packet list to find the entropy of each data byte
[all …]
/external/zstd/lib/decompress/
Dzstd_ddict.c40 ZSTD_entropyDTables_t entropy; member
75 dctx->LLTptr = ddict->entropy.LLTable; in ZSTD_copyDDictParameters()
76 dctx->MLTptr = ddict->entropy.MLTable; in ZSTD_copyDDictParameters()
77 dctx->OFTptr = ddict->entropy.OFTable; in ZSTD_copyDDictParameters()
78 dctx->HUFptr = ddict->entropy.hufTable; in ZSTD_copyDDictParameters()
79 dctx->entropy.rep[0] = ddict->entropy.rep[0]; in ZSTD_copyDDictParameters()
80 dctx->entropy.rep[1] = ddict->entropy.rep[1]; in ZSTD_copyDDictParameters()
81 dctx->entropy.rep[2] = ddict->entropy.rep[2]; in ZSTD_copyDDictParameters()
111 /* load entropy tables */ in ZSTD_loadEntropy_intoDDict()
113 &ddict->entropy, ddict->dictContent, ddict->dictSize)), in ZSTD_loadEntropy_intoDDict()
[all …]
/external/kernel-headers/original/uapi/linux/
Drandom.h17 /* Get the entropy count. */
20 /* Add to (or subtract from) the entropy count. (Superuser only.) */
23 /* Get the contents of the entropy pool. (Superuser only.) */
27 * Write bytes into the entropy pool and add to the entropy count.
32 /* Clear entropy count to 0. (Superuser only.) */
35 /* Clear the entropy pool and associated counters. (Superuser only.) */
/external/ms-tpm-20-ref/Samples/Nucleo-TPM/Shared/Platform/src/
DEntropy.c48 // This is the last 32-bits of hardware entropy produced. We have to check to
63 // This function is used to get available hardware entropy. In a hardware
65 // to get entropy.
66 // If the caller does not ask for any entropy, then this is a startup indication
70 // < 0 hardware failure of the entropy generator, this is sticky
71 // >= 0 the returned amount of entropy (bytes)
75 unsigned char *entropy, // output buffer in _plat__GetEntropy() argument
99 memcpy(&entropy[n], &random32bit, MIN(sizeof(random32bit), amount - n)); in _plat__GetEntropy()
/external/boringssl/src/util/fipstools/acvp/acvptool/testmodulewrapper/
Dhmac_drbg.go27 func NewHMACDRBG(entropy, nonce, personalisation []byte) *HMACDRBGSHA256 { argument
29 ret.init(entropy, nonce, personalisation)
33 func (drbg *HMACDRBGSHA256) init(entropy, nonce, personalisation []byte) {
41 seed := make([]byte, 0, len(entropy)+len(nonce)+len(personalisation))
42 seed = append(seed, entropy...)
76 func (drbg *HMACDRBGSHA256) Reseed(entropy, additionalInput []byte) {
77 buf := make([]byte, 0, len(entropy)+len(additionalInput))
78 buf = append(buf, entropy...)

12345678910>>...40