Skip to content

Allow custom random generator with crypto

tusooa requested to merge tusooa/14-crypto-custom-random-gen into servant

https://lily.kazv.moe/kazv/libkazv/-/issues/14

  • Add rng Deps to the store made by Sdk
  • Add functions to create an Sdk with custom rng (withRNG() enhancer)
  • Add constructors for Crypto, Session, etc. that takes custom random data
  • Inside Crypto, add functions that takes custom random data to process
    • Create new one-time keys
    • Create outbound sessions
    • Rotate megolm sessions
    • Encrypt events (olm)
  • In client, refactor actions to take custom random data, and generate those in Client auto random = genRandom(CryptoConstants::xXXRandomLength); m_ctx.dispatch(XXXAction{..., random});
  • Remove non-deterministic functions from kazvcrypto
Edited by tusooa

Merge request reports

Loading