/external/libjpeg-turbo/ |
D | jcphuff.c | 13 * This file contains Huffman entropy encoding routines for progressive JPEG. 76 /* Expanded entropy encoder object for progressive Huffman encoding. */ 207 phuff_entropy_ptr entropy = (phuff_entropy_ptr)cinfo->entropy; in start_pass_phuff() local 212 entropy->cinfo = cinfo; in start_pass_phuff() 213 entropy->gather_statistics = gather_statistics; in start_pass_phuff() 222 entropy->pub.encode_mcu = encode_mcu_DC_first; in start_pass_phuff() 224 entropy->pub.encode_mcu = encode_mcu_AC_first; in start_pass_phuff() 226 entropy->AC_first_prepare = jsimd_encode_mcu_AC_first_prepare; in start_pass_phuff() 228 entropy->AC_first_prepare = encode_mcu_AC_first_prepare; in start_pass_phuff() 231 entropy->pub.encode_mcu = encode_mcu_DC_refine; in start_pass_phuff() [all …]
|
D | jcarith.c | 11 * 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 …]
|
D | jdarith.c | 11 * 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 …]
|
D | jdphuff.c | 11 * 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 …]
|
D | jdhuff.c | 12 * 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 …]
|
D | jchuff.c | 14 * This file contains Huffman entropy encoding routines. 68 /* Expanded entropy encoder object for Huffman encoding. 166 huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy; in start_pass_huff() local 172 entropy->pub.encode_mcu = encode_mcu_gather; in start_pass_huff() 173 entropy->pub.finish_pass = finish_pass_gather; in start_pass_huff() 178 entropy->pub.encode_mcu = encode_mcu_huff; in start_pass_huff() 179 entropy->pub.finish_pass = finish_pass_huff; in start_pass_huff() 182 entropy->simd = jsimd_can_huff_encode_one_block(); in start_pass_huff() 198 if (entropy->dc_count_ptrs[dctbl] == NULL) in start_pass_huff() 199 entropy->dc_count_ptrs[dctbl] = (long *) in start_pass_huff() [all …]
|
/external/rappor/client/javatest/com/google/android/rappor/ |
D | HmacDrbgTest.java | 29 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/ |
D | trng_entropy_pool.c | 14 * # 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/llvm-project/compiler-rt/test/sanitizer_common/TestCases/NetBSD/ |
D | md4.cpp | 14 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test1() local 18 MD4Update(&ctx, entropy, __arraycount(entropy)); in test1() 29 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test2() local 33 MD4Update(&ctx, entropy, __arraycount(entropy)); in test2() 42 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test3() local 45 MD4Update(&ctx, entropy, __arraycount(entropy)); in test3() 73 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test6() local 76 char *p = MD4Data(entropy, __arraycount(entropy), digest); in test6() 83 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test7() local 85 char *p = MD4Data(entropy, __arraycount(entropy), NULL); in test7()
|
D | md5.cpp | 14 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test1() local 18 MD5Update(&ctx, entropy, __arraycount(entropy)); in test1() 29 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test2() local 33 MD5Update(&ctx, entropy, __arraycount(entropy)); in test2() 42 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test3() local 45 MD5Update(&ctx, entropy, __arraycount(entropy)); in test3() 73 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test6() local 76 char *p = MD5Data(entropy, __arraycount(entropy), digest); in test6() 83 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test7() local 85 char *p = MD5Data(entropy, __arraycount(entropy), NULL); in test7()
|
D | md2.cpp | 14 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test1() local 18 MD2Update(&ctx, entropy, __arraycount(entropy)); in test1() 29 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test2() local 33 MD2Update(&ctx, entropy, __arraycount(entropy)); in test2() 42 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test3() local 45 MD2Update(&ctx, entropy, __arraycount(entropy)); in test3() 73 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test6() local 76 char *p = MD2Data(entropy, __arraycount(entropy), digest); in test6() 83 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test7() local 85 char *p = MD2Data(entropy, __arraycount(entropy), NULL); in test7()
|
D | sha1.cpp | 11 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test1() local 15 SHA1Update(&ctx, entropy, __arraycount(entropy)); in test1() 47 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test2() local 51 local_SHA1Update(&ctx, entropy, __arraycount(entropy)); in test2() 62 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test3() local 66 SHA1Update(&ctx, entropy, __arraycount(entropy)); in test3() 75 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test4() local 78 SHA1Update(&ctx, entropy, __arraycount(entropy)); in test4() 124 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test9() local 127 char *p = SHA1Data(entropy, __arraycount(entropy), digest); in test9() [all …]
|
D | rmd160.cpp | 11 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test1() local 15 RMD160Update(&ctx, entropy, __arraycount(entropy)); in test1() 26 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test2() local 30 RMD160Update(&ctx, entropy, __arraycount(entropy)); in test2() 39 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test3() local 42 RMD160Update(&ctx, entropy, __arraycount(entropy)); in test3() 88 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test8() local 91 char *p = RMD160Data(entropy, __arraycount(entropy), digest); in test8() 98 uint8_t entropy[] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 }; in test9() local 100 char *p = RMD160Data(entropy, __arraycount(entropy), NULL); in test9()
|
D | sha2.cpp | 51 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test1() local 55 SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy)); in test1() 66 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test2() local 70 SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy)); in test2() 79 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test3() local 82 SHA_Update(SHASIZE)(&ctx, entropy, __arraycount(entropy)); in test3() 128 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test8() local 131 char *p = SHA_Data(SHASIZE)(entropy, __arraycount(entropy), digest); in test8() 138 uint8_t entropy[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; in test9() local 140 char *p = SHA_Data(SHASIZE)(entropy, __arraycount(entropy), NULL); in test9()
|
/external/boringssl/src/crypto/fipsmodule/rand/ |
D | internal.h | 44 // 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 …]
|
D | rand.c | 37 // 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 …]
|
/external/wpa_supplicant_8/src/crypto/ |
D | random.c | 8 * 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/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/rand/ |
D | rand.c | 36 // 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. 181 uint8_t entropy[CTR_DRBG_ENTROPY_LEN * FIPS_OVERREAD]; in rand_get_seed() local 183 int used_rdrand = have_rdrand() && rdrand(entropy, sizeof(entropy)); in rand_get_seed() 185 CRYPTO_sysrand_for_seed(entropy, sizeof(entropy)); in rand_get_seed() 191 if (CRYPTO_memcmp(state->last_block, entropy, CRNGT_BLOCK_SIZE) == 0) { in rand_get_seed() 196 for (size_t i = CRNGT_BLOCK_SIZE; i < sizeof(entropy); in rand_get_seed() 198 if (CRYPTO_memcmp(entropy + i - CRNGT_BLOCK_SIZE, entropy + i, in rand_get_seed() 205 entropy + sizeof(entropy) - CRNGT_BLOCK_SIZE, in rand_get_seed() [all …]
|
D | internal.h | 39 // CRYPTO_sysrand fills |len| bytes at |buf| with entropy from the operating 44 // CRYPTO_init_sysrand initializes long-lived resources needed to draw entropy 48 // CRYPTO_sysrand_for_seed fills |len| bytes at |buf| with entropy from the 53 // CRYPTO_sysrand_if_available fills |len| bytes at |buf| with entropy from the 54 // operating system, or early /dev/urandom data, and returns 1, _if_ the entropy 94 // entropy in |entropy| and, optionally, a personalization string up to 98 const uint8_t entropy[CTR_DRBG_ENTROPY_LEN], 102 // CTR_DRBG_reseed reseeds |drbg| given |CTR_DRBG_ENTROPY_LEN| bytes of entropy 103 // in |entropy| and, optionally, up to |CTR_DRBG_ENTROPY_LEN| bytes of 106 const uint8_t entropy[CTR_DRBG_ENTROPY_LEN],
|
/external/ms-tpm-20-ref/TPMCmd/Platform/src/ |
D | Entropy.c | 49 // 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/arm-trusted-firmware/plat/arm/board/juno/ |
D | juno_stack_protector.c | 16 uint64_t entropy; in plat_get_stack_protector_canary() local 18 if (!juno_getentropy(&entropy)) { in plat_get_stack_protector_canary() 19 ERROR("Not enough entropy to initialize canary value\n"); in plat_get_stack_protector_canary() 23 if (sizeof(entropy) == sizeof(u_register_t)) { in plat_get_stack_protector_canary() 24 return entropy; in plat_get_stack_protector_canary() 27 return (entropy & 0xffffffffULL) ^ (entropy >> 32); in plat_get_stack_protector_canary()
|
/external/ms-tpm-20-ref/TPMCmd/tpm/include/prototypes/ |
D | CryptRand_fp.h | 45 // 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/python/pyopenssl/src/OpenSSL/ |
D | rand.py | 8 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/ |
D | Entropy.c | 52 // 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/ |
D | pnio_rtc.py | 307 # 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 …]
|