Commit Graph

8 Commits

Author SHA1 Message Date
surtur 7eaaef2fdb
fortuna: handle reseeds+clear pools for seed
* actually clear out entropy of the pools before a reseed
* correctly prepare the seed for the reseed
* add a couple of helper methods to Pool that assist with getting
  length, retrieving and clearing of the collected entropy
* catch exceptions in main(), handle them gracefully
2021-12-13 05:11:17 +01:00
surtur b55ca33e24
chore(fortuna): add random_data() checks, batch 1 2021-12-12 06:14:58 +01:00
surtur 053d2187a2
chore(accumulator): make use of init_pool_num 2021-12-09 14:11:39 +01:00
surtur 9f799c83a9
fortuna: add incr_reseed_ctr 2021-12-07 15:46:01 +01:00
surtur b96ce5d644
fortuna: wrap pool initialization in a try-catch 2021-12-07 02:48:37 +01:00
surtur a1cbbb209e
handle PRNG state in R_state + accumulator basis
* handle the PRNG state with R_state nested class
* add a private property R holding PRNG state to Fortuna
* add R_state properties as defined in Cryptography Engineering:
  * a generator instance
  * a reseed counter
  * 32 pools that the collected entropy is to be distributed over

* add initial definition of the Pool object and its initialization

* attempt to initialize PRNG in Fortuna constructor. wrap the
  initialization call in a try-catch block like a cultured person
* erase the string used to print data from random_data() after it's been
  used
2021-12-04 00:40:39 +01:00
surtur 225952a7e2
fix(fortuna): add end-of-namespace comment 2021-11-19 20:59:12 +01:00
surtur ea11801789
add fortuna class 2021-11-10 23:58:42 +01:00