Lines Matching defs:entropy
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 {
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-boot-test: could not name entropy_vmo (data lost)\n");
68 // Run the entropy collector test.
70 const char* src_name = cmdline_get("kernel.entropy-test.src");
75 entropy::Collector* collector = nullptr;
76 entropy::Collector* candidate;
79 // TODO(andrewkrieger): find a nicer way to enumerate all entropy collectors
94 // TODO(andrewkrieger): add other entropy collectors.
97 printf("entropy-boot-test: unrecognized source \"%s\"\n", src_name);
98 printf("entropy-boot-test: skipping test.\n");
102 entropy_len = cmdline_get_uint64("kernel.entropy-test.len", sizeof(entropy_buf));
105 printf("entropy-boot-test: only recording %zu bytes (try defining "
114 printf("entropy-boot-test: source only returned %zu bytes.\n", result);
117 printf("entropy-boot-test: successful draw in %" PRIu64 " nanoseconds.\n", end - start);
129 } // namespace entropy
134 LK_INIT_HOOK(setup_entropy_vmo, crypto::entropy::SetupEntropyVmo,