microsoft / microsoft/litebox

Use AES-CTR DRBG as a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG)

Open
#593 3 comments 1 reaction 2 assignees View on GitHub

@sangho2 is already working on this.

Since Feb 1, 2026.

target-lvbs
Dominant language
Rust
Stars
2.7k
Forks
144
Avg merge
12h 21m
Merged PRs (30d)
146

Description

As a CSPRNG, we should use AES-CTR DRBG (NIST SP 800-90A standard) which is approved by Microsoft.
Regarding entropy sources, we should access as many sources as possible like `RDSEED` (x86_64), TPM (GetRandom), and more.

Minimal feature set:
* 256-bit AES
* Entropy source (RDSEED)
* Nonce (from TPM). For now, just have a memory buffer and interface to initialize it.
* Derivation function
* No personalization
* Pass NIST test cases

There are `drbg` and `aes_ctr_drbg` crates, but we'd like to implement a simple one from scratch with the above features.

This CSPRNG replaces `litebox_platform_lvbs/src/host/lvbs_impl.rs`'s `litebox::platform::CrngProvider::fill_bytes_crng`.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.