w3f / bls

Aggregatable BLS sigantures
65 stars 15 forks source link

make thread_rng optional on std feature #58

Closed drskalman closed 1 year ago

drskalman commented 1 year ago

[08:07:11] Syed​> Basti.await: so does this mean that I can have application crypto which depends on std and threadrng? [08:07:30] Basti.await​> No
[08:07:37] Basti.await​> There are host functions for doing this [08:08:05] Basti.await​> Like sp_io::offchain::random_seed() [edited] [08:08:12] Basti.await​> That gives you a random seed [08:08:49] Basti.await​> Or sp_io::crypto::ed25519_sign() [08:08:54] Basti.await​> To sign some message
[08:09:26] Syed​> so to be clear the crypto provider library (ecdsa, bls etc) can not depends on threandrng? right? [08:10:10] Basti.await​> Yes 🙏 (1) [08:10:55] Basti.await​> The rand crate is generic and you should be able to use random_seed() to init some distribution to give you randomness, similar to thread_rng 👍 (1)

drskalman commented 1 year ago

This is done. sign is using SeedableRNG with deterministic seed dependening on private key and all previous signing activity.