File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,8 @@ be achieved by adding a section like this:
53
53
}
54
54
```
55
55
56
- On the host side, firecracker uses [ ` OsRng ` ] [ 2 ] to get random bytes from the
57
- host kernel. The [ implementation] [ 3 ] of ` OsRng ` on Linux uses the
58
- ` getrandom(2) ` system call when available, otherwise it falls back to
59
- ` /dev/urandom ` after successfully polling ` /dev/random ` .
56
+ On the host side, Firecracker relies on [ ` aws-lc-rs ` ] [ 2 ] to retrieve the random bytes.
57
+ ` aws-lc-rs ` uses the [ ` AWS-LC ` cryptographic library] [ 3 ] .
60
58
61
59
## Prerequisites
62
60
@@ -66,5 +64,5 @@ kernel configuration option is `CONFIG_HW_RANDOM_VIRTIO` (which depends on
66
64
` CONFIG_HW_RANDOM ` and ` CONFIG_VIRTIO ` ).
67
65
68
66
[ 1 ] : https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html#x1-3050004
69
- [ 2 ] : https://docs.rs/rand /latest/rand/rngs/struct.OsRng .html
70
- [ 3 ] : https://docs.rs/getrandom/latest/getrandom/
67
+ [ 2 ] : https://docs.rs/aws-lc-rs /latest/aws_lc_rs/index .html
68
+ [ 3 ] : https://github.com/aws/aws-lc
Original file line number Diff line number Diff line change @@ -18,9 +18,8 @@ The Linux kernel exposes three main `RNG` interfaces to userspace: the
18
18
` /dev/random ` and ` /dev/urandom ` special devices, and the ` getrandom ` syscall,
19
19
which are described in the [ random(7) man page] [ 1 ] . Moreover, Firecracker
20
20
supports the [ ` virtio-rng ` ] ( ../entropy.md ) device which can provide additional
21
- entropy to guest VMs. It draws its random bytes from the host kernel via
22
- ` getrandom ` or ` /dev/urandom ` after ensuring that the entropy pool has been
23
- initialized.
21
+ entropy to guest VMs. It draws its random bytes from the [ ` aws-lc-rs ` ] [ 8 ] crate
22
+ which wraps the [ ` AWS-LC ` cryptographic library] [ 9 ] .
24
23
25
24
Traditionally, ` /dev/random ` has been considered a source of “true”
26
25
randomness, with the downside that reads block when the pool of entropy
@@ -237,3 +236,5 @@ int main(int argc, char ** argv) {
237
236
[5]: https://elixir.bootlin.com/linux/v4.14.295/source/drivers/char/random.c#L1355
238
237
[6]: https://elixir.bootlin.com/linux/v5.10.147/source/drivers/char/random.c#L1360
239
238
[7]: https://elixir.bootlin.com/linux/v4.14.295/source/drivers/char/random.c#L1351
239
+ [8]: https://docs.rs/aws-lc-rs/latest/aws_lc_rs/index.html
240
+ [9]: https://github.com/aws/aws-lc
You can’t perform that action at this time.
0 commit comments