sfackler / rust-openssl

OpenSSL bindings for Rust
1.37k stars 739 forks source link

Add bindings for RAND_seed() and RAND_add() to reseed random generator #2232

Open Coconop opened 4 months ago

Coconop commented 4 months ago

When underlying system entropy source is not good enough, it is common practice to add/mix it with your own entropy source. The C library provides API (also cf associated doc) for this purpose but the current Rust wrapper does not.

Is it possible to add Rust bindings to to RAND_add() and RAND_seed() ?

Skepfyr commented 4 months ago

It looks like these function do internal locking, which means that it's plausible we could implement them safely. I will warn you that it's unlikely anyone else will add these functions, if you want them then you'll probably have to write the PR yourself.

Coconop commented 3 months ago

Thanks for the reply. I'm kinda new to Rust so I'll probably wait a bit before contributing to this project.