/fuchsia/zircon/kernel/lib/crypto/ |
H A D | global_prng.cpp | 18 #include <lib/crypto/entropy/collector.h> 19 #include <lib/crypto/entropy/jitterentropy_collector.h> 20 #include <lib/crypto/entropy/hw_rng_collector.h> 21 #include <lib/crypto/entropy/quality_test.h> 42 // of entropy, and false otherwise. 45 // we decide we don't need it for getting entropy from elsewhere. 47 const char* entropy = cmdline_get("kernel.entropy-mixin"); local 48 if (!entropy) { 53 const size_t hex_len = fbl::min(strlen(entropy), kMaxEntropyArgumentLe [all...] |
H A D | rules.mk | 23 include $(LOCAL_DIR)/entropy/rules.mk
|
/fuchsia/zircon/kernel/lib/crypto/include/lib/crypto/entropy/ |
H A D | quality_test.h | 14 namespace entropy { namespace in namespace:crypto 28 } // namespace entropy
|
H A D | hw_rng_collector.h | 9 #include <lib/crypto/entropy/collector.h> 15 namespace entropy { namespace in namespace:crypto 17 // An implementation of crypto::entropy::Collector that uses hw_rng_draw_entropy 18 // as its entropy source. Currently, this is only supported on x86. 28 // Inherited from crypto::entropy::Collector; see comments there. 47 } // namespace entropy
|
H A D | jitterentropy_collector.h | 9 #include <lib/crypto/entropy/collector.h> 16 namespace entropy { namespace in namespace:crypto 18 // An implementation of crypto::entropy::Collector that uses jitterentropy as 19 // its entropy source. Ultimately, the entropy is derived from variations in 60 } // namespace entropy
|
H A D | collector.h | 15 namespace entropy { namespace in namespace:crypto 24 // Fills |len| bytes of memory at |buf| with random data from this entropy 25 // collector's entropy source. The bytes that are returned may not be 28 // collect a certain amount of entropy. 32 // DrawEntropy() to get approximately |bits| bits of entropy. Note: |bits| 37 // Initialize this entropy collector. |name| is used for debugging and 39 // |entropy_per_1000_bytes| is the (approximate) amount of min-entropy in 40 // each 1000 bytes of data returned by the entropy source. The amount of 41 // entropy in a byte from the entropy sourc [all...] |
/fuchsia/zircon/kernel/lib/crypto/entropy/ |
H A D | collector.cpp | 7 #include <lib/crypto/entropy/collector.h> 13 namespace entropy { namespace in namespace:crypto 29 // requested amount of entropy. 34 } // namespace entropy
|
H A D | quality_test.cpp | 7 #include <lib/crypto/entropy/quality_test.h> 12 #include <lib/crypto/entropy/collector.h> 13 #include <lib/crypto/entropy/hw_rng_collector.h> 14 #include <lib/crypto/entropy/jitterentropy_collector.h> 23 namespace entropy { namespace in namespace:crypto 43 printf("entropy-boot-test: Failed to create entropy_vmo (data lost)\n"); 49 printf("entropy-boot-test: Failed to write to entropy_vmo (data lost)\n"); 54 printf("entropy-boot-test: partial write to entropy_vmo (data lost)\n"); 58 constexpr const char *name = "debug/entropy.bin"; 62 printf("entropy [all...] |
H A D | hw_rng_collector.cpp | 7 #include <lib/crypto/entropy/hw_rng_collector.h> 14 namespace entropy { namespace in namespace:crypto 43 } // namespace entropy
|
H A D | jitterentropy_collector.cpp | 7 #include <lib/crypto/entropy/jitterentropy_collector.h> 19 namespace entropy { namespace in namespace:crypto 64 // entropy estimate is safe enough. 68 // 0.58 bits of min-entropy on the rpi3 and 0.5 bits on qemu-arm64. A safety 69 // factor of 0.9 gives us 0.50 * 0.9 * 1000 == 450 bits of entropy per 1000 104 } // namespace entropy
|
H A D | collector_unittest.cpp | 7 #include <lib/crypto/entropy/collector.h> 12 namespace entropy { namespace in namespace:crypto 31 "bad entropy estimate (entropy per 1000 bytes = 1, bits = 0"); 33 "bad entropy estimate (entropy per 1000 bytes = 1, bits = 1"); 35 "bad entropy estimate (entropy per 1000 bytes = 1, bits = 2"); 37 "bad entropy estimate (entropy pe [all...] |
/fuchsia/zircon/scripts/entropy-test/jitterentropy/ |
H A D | test-basic-config | 44 "$ZIRCONDIR"/scripts/entropy-test/repeat-boot-test -h -h 110 "$ZIRCONDIR"/scripts/entropy-test/repeat-boot-test \
|
H A D | test-tunable-config | 39 "$ZIRCONDIR"/scripts/entropy-test/repeat-boot-test -h -h 126 "$ZIRCONDIR"/scripts/entropy-test/repeat-boot-test \
|
/fuchsia/zircon/third_party/ulib/uboringssl/crypto/fipsmodule/rand/ |
H A D | rand.c | 35 // entropy which is accessed via |CRYPTO_sysrand|. (If the operating system 36 // entropy source fails, it's up to |CRYPTO_sysrand| to abort the process���we 45 // (We assume that the OS entropy is safe from fork()ing and VM duplication. 189 uint8_t entropy[CTR_DRBG_ENTROPY_LEN * FIPS_OVERREAD]; local 191 if (!hwrand(entropy, sizeof(entropy))) { 192 CRYPTO_sysrand(entropy, sizeof(entropy)); 198 if (CRYPTO_memcmp(state->last_block, entropy, CRNGT_BLOCK_SIZE) == 0) { 203 for (size_t i = CRNGT_BLOCK_SIZE; i < sizeof(entropy); [all...] |
H A D | internal.h | 33 // CRYPTO_sysrand fills |len| bytes at |buf| with entropy from the operating 59 // entropy in |entropy| and, optionally, a personalization string up to 63 const uint8_t entropy[CTR_DRBG_ENTROPY_LEN], 67 // CTR_DRBG_reseed reseeds |drbg| given |CTR_DRBG_ENTROPY_LEN| bytes of entropy 68 // in |entropy| and, optionally, up to |CTR_DRBG_ENTROPY_LEN| bytes of 71 const uint8_t entropy[CTR_DRBG_ENTROPY_LEN],
|
H A D | ctrdrbg.c | 31 const uint8_t entropy[CTR_DRBG_ENTROPY_LEN], 39 OPENSSL_memcpy(seed_material, entropy, CTR_DRBG_ENTROPY_LEN); 103 const uint8_t entropy[CTR_DRBG_ENTROPY_LEN], 114 OPENSSL_memcpy(entropy_copy, entropy, CTR_DRBG_ENTROPY_LEN); 119 entropy = entropy_copy; 122 if (!ctr_drbg_update(drbg, entropy, CTR_DRBG_ENTROPY_LEN)) { 30 CTR_DRBG_init(CTR_DRBG_STATE *drbg, const uint8_t entropy[CTR_DRBG_ENTROPY_LEN], const uint8_t *personalization, size_t personalization_len) argument 102 CTR_DRBG_reseed(CTR_DRBG_STATE *drbg, const uint8_t entropy[CTR_DRBG_ENTROPY_LEN], const uint8_t *additional_data, size_t additional_data_len) argument
|
/fuchsia/zircon/system/utest/entropy/ |
H A D | rules.mk | 12 $(LOCAL_DIR)/entropy.cpp 14 MODULE_NAME := entropy-test
|
/fuchsia/zircon/third_party/ulib/uboringssl/include/openssl/ |
H A D | rand.h | 46 // |RAND_set_urandom_fd| does not buffer any entropy, so it is safe to call 88 OPENSSL_EXPORT void RAND_add(const void *buf, int num, double entropy); 106 void (*add) (const void *buf, int num, double entropy);
|
/fuchsia/zircon/kernel/vm/ |
H A D | vm.cpp | 97 uchar entropy; local 98 crypto::GlobalPRNG::GetInstance()->Draw(&entropy, sizeof(entropy)); 101 size_t page_count = entropy % 16; 176 size_t entropy; local 177 crypto::GlobalPRNG::GetInstance()->Draw(&entropy, sizeof(entropy)); 179 size_t random_size = PAGE_ALIGN(entropy % (64ULL * GB));
|
H A D | vm_address_region.cpp | 1015 uint8_t entropy; local 1016 aspace_->AslrPrng().Draw(&entropy, sizeof(entropy)); 1017 alloc_before = entropy & 1; 1018 num_gap_pages = (entropy >> 1) + 1;
|
/fuchsia/zircon/scripts/entropy-test/ |
H A D | repeat-boot-test | 9 # Run multiple early-boot entropy collector tests, with different kernel cmdlines. 32 echo " -s <source> : entropy source to test: hw_rng, jitterentropy" >&2 109 echo "choose entropy source:" >&2 158 scripts/entropy-test/make-parallel -l "$BUILD_LEN" $BUILD_ARGS "$BUILD_PROJECT" 182 if "$ZIRCONDIR"/scripts/entropy-test/run-boot-test -a "$ARCH" -c "$CMDLINE" -l "$LEN" \
|
H A D | run-boot-test | 9 # Runs a single instance of the early boot entropy collection test. 11 # This script assumes that Zircon has already been built to support entropy quality tests (i.e with 13 # qemu or via netboot, then it extracts the entropy file once the boot-time test completes. Usually 21 # This script saves the captured entropy in a file named 'entropy.#########.bin' (to facilitate 23 # 'entropy.#########.meta', recording certain test parameters. See the source below for more 37 echo "-l <len> : entropy test length (bytes to collect)" >&2 97 # handle entropy-test specific cmdline args 98 CMDLINE+="kernel.entropy-test.src=$SRC " 99 if [[ -n $LEN ]]; then CMDLINE+="kernel.entropy [all...] |
/fuchsia/zircon/third_party/lib/jitterentropy/ |
H A D | rules.mk | 17 # is a significant difference in entropy quality, replace the relevant C code by
|
/fuchsia/zircon/kernel/lib/userboot/ |
H A D | userboot.cpp | 37 #include <lib/crypto/entropy/quality_test.h> 336 if (crypto::entropy::entropy_was_lost) { 340 crypto::entropy::entropy_vmo,
|
/fuchsia/zircon/scripts/ |
H A D | run-zircon | 456 # Add entropy to the kernel 457 CMDLINE+="kernel.entropy-mixin=$(head -c 32 /dev/urandom | shasum -a 256 | awk '{ print $1 }') "
|