Skip to content

TJEC and AES128-CTR-DRBG random source - #52

Merged
oberrow merged 6 commits into
OBOS-dev:masterfrom
MarcasRealAccount:random
Jan 9, 2026
Merged

oberrow merged 6 commits into
OBOS-dev:masterfrom
MarcasRealAccount:random

Conversation

@MarcasRealAccount

Copy link
Copy Markdown
Contributor

This Pull Request replaces the Mersenne Twister random source for a better combination of Time Jitter Entropy Collector in conjunction with AES128 in Counter mode as a Deterministic Random Bit Generator.
The following options are added
tjec-random-access: Makes the underlying memory accessing randomized using a xoshiro128** prng.
tjec-max-memory-size=<byte count>: Allows the TJEC-Memory to be at most byte count bytes rounded up to nearest power of two.
tjec-no-fips: Makes TJEC only retrieve 256 bits of potential entropy per 256 bits generated.
tjec-no-lag-predictor: Disables the LAG Predictor health check.
tjec-max-acc-loop-bits=<1-8>: Specifies a maximum number of random additional memory accesses to make in 2^k, default is 7 or 128.
tjec-max-hash-loop-bits=<1-8>: Specifies a maximum number of random additional hash iterations to make in 2^k, default is 3 or 8.
tjec-osr=<1-255>: Specifies the over sampling ratio, i.e. how many multiples of 256 bits of potential entropy to collect per 256 bits generated.

@oberrow

oberrow commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator

After a quick read, this looks fine. My only comment is that if you added new kernel command line options, is that you should add them to the usage message in cmdline.c
I will be doing a more thorough review later.

Comment thread src/oboskrnl/contrib/tjec.c Resolved
Comment thread src/oboskrnl/contrib/tjec.c Resolved
Comment thread src/oboskrnl/contrib/tjec.c Resolved
Comment thread src/oboskrnl/vfs/dummy_devices.c Resolved
Comment thread src/oboskrnl/contrib/tjec.c Resolved
@oberrow
oberrow merged commit 6b8ba64 into OBOS-dev:master Jan 9, 2026
1 check passed
@oberrow

oberrow commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants