Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vfs/xoroshiro: add PRNG plugin using Xoroshiro128+ #5407

Open
cnuke opened this issue Dec 16, 2024 · 1 comment
Open

vfs/xoroshiro: add PRNG plugin using Xoroshiro128+ #5407

cnuke opened this issue Dec 16, 2024 · 1 comment
Labels

Comments

@cnuke
Copy link
Member

cnuke commented Dec 16, 2024

No description provided.

@cnuke cnuke added the feature label Dec 16, 2024
cnuke added a commit to cnuke/genode that referenced this issue Dec 16, 2024
This plugin provides a PRNG based on the Xoroshiro128+ algorithm
that reseeds itself after a specific amount of state was consumed.

For more detailed information please take a look at its README in
'repos/os/src/lib/vfs/xoroshiro/README'.

Fixes genodelabs#5407.
cnuke added a commit to cnuke/genode that referenced this issue Dec 16, 2024
cnuke added a commit to cnuke/genode that referenced this issue Dec 16, 2024
This plugin provides a PRNG based on the Xoroshiro128+ algorithm
that reseeds itself after a specific amount of state was consumed.

For more detailed information please take a look at its README in
'repos/os/src/lib/vfs/xoroshiro/README'.

Fixes genodelabs#5407.
@cnuke
Copy link
Member Author

cnuke commented Dec 16, 2024

Commit 4ce1402 provides the plugin, the already available implementation in lx_emul/random.cc (*) served as a blue-print. Consolidating both implementations would be a follow-up task.

(*) Commit 33aa1ed address what looks like a copy & paste error in the original implementation. EDIT: missed the implicit reset during reseed.

My primary reason for creating the plugin is getting rid of the sub-init in the various web-browser packages where the jitter_sponge component was utilized because accessing vfs_jitterentropy directly was to slow IIRC.
The vfs_xoroshiro.run run-script allows for primitive testing and on my machine (T470p, 7440HQ) using base-linux in VBox6 yields around ~300 MiB/s when using vfs_jitterentropy and 1800 MiB/s when using vfs_zero.

Since I have not performed any analysis I cannot comment on security-related properties of the implementation or rather the algorithm itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant