Commit Graph

12 Commits

Author SHA1 Message Date
surtur ebcc4f87d5
pool: move logic to the source file
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-10 05:07:18 +01:00
surtur 4b216a6f6e
refactor: clang-format
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-10 04:25:03 +01:00
surtur 67c2462c3a
fix: -Wtype-limits x2
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-09 12:31:16 +01:00
surtur 69cc71c749
pool: no copy constructor
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-03 02:49:23 +01:00
surtur 6d3059f39a
pool: make ctor,dtor noexcept
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-02 08:05:37 +01:00
surtur 04bbf16731
pool: set_s -> append_s as it fits better
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-13 05:24:59 +01:00
surtur af1b4cf5ad
pool: make get_id const as it just reads
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-13 05:24:17 +01:00
surtur 7eaaef2fdb
fortuna: handle reseeds+clear pools for seed
All checks were successful
continuous-integration/drone/push Build is passing
* 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 65c476dbd6
add Util class + perform general refactor
All checks were successful
continuous-integration/drone/push Build is passing
* rm duplicate do_sha() code, consolidate in Util
* make reseed() public so that it can be called from outside
* rm reseed() from do_crypto() where it has no place
2021-12-13 05:10:07 +01:00
surtur 2d20242b3e
accumulator(pool): (partly) implement add_entropy
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-11 02:53:47 +01:00
surtur 33f6620662
chore(pool): stop spamming at initialization
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-08 03:40:08 +01:00
surtur a1cbbb209e
handle PRNG state in R_state + accumulator basis
All checks were successful
continuous-integration/drone/push Build is passing
* 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