← Back to context

Comment by somat

7 hours ago

You could do what openbsd did and tie all the traditional weak psudorandom interfaces into a cryptographically secure one. it will still match the drand48() interface. I still don't think I would use them for secure things but now rand() is actually random. http://man.openbsd.org/drand48

Another pet peeve is when people use the rand() when they want hash() but I will leave that rant for another day.

Per the manpage you linked, openbsd's behavior does not match the drand48() interface, since the drand48() interface requires determinism.

I'm interested in that rant (at $WORK we adopted hash() for almost everything, and I'm curious to hear other perspectives).