Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

sysrand looks scary and is unused- delete? #60

Open
TomMD opened this issue Jan 6, 2016 · 2 comments
Open

sysrand looks scary and is unused- delete? #60

TomMD opened this issue Jan 6, 2016 · 2 comments
Labels

Comments

@TomMD
Copy link

TomMD commented Jan 6, 2016

cryptonite_sysrand_init is not called anywhere afaict and it looks scarily wrong (out arg buf is unused, it just hashes the time and tosses the result).

@vincenthz
Copy link
Member

It's not finished, and currently unused; it's supposed to provide to a non-constant memory initialization for the sysran buffer (which would then be xor-combined to cpu entropy generator), based on a "random" set of properties and system related identifications/state.

It's here to create """some entropy""" in case of a catastrophic failure of cpu's based rng (says someone patch the microcode to return 0 or something constant/guessable).

In a everything-is-working-as-usual scenario, I don't think it's very useful but I can't think of any downside (except performance); i.e. worst case, everything that is used is guessable, and the xor operation provides no additional security.

@vincenthz
Copy link
Member

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

No branches or pull requests

2 participants