News for hackers. Stuff that matters.
Re:The getrandom(2) system call was requested by the LibreSS... by tptacek on Thursday July 17, 2014 @03:44PM (#8049754)
I'm not really thrilled with the idea that you should use urandom to seed a CSPRNG; urandom should be your only CSPRNG. This most recent libressl kerfuffle is an illustration of why userspace CSPRNGs are a bad idea.
Re:The getrandom(2) system call was requested by the LibreSS... by agwa on Thursday July 17, 2014 @03:53PM (#8049799)
When I said "seed a CSPRNG" I was talking about the kernel seeding its own CSPRNG. I agree that just using the kernel's CSPRNG is the sanest solution to this mess.
Re:The getrandom(2) system call was requested by the LibreSS... by giovannibajo1 on Friday July 18, 2014 @03:58AM (#8052093)
> I agree that just using the kernel's CSPRNG is the sanest solution to this mess.

well, you agree up to the point you actually need to convert your words into facts, at that point you don't agree anymore :)

https://github.com/AGWA/git-crypt/commit/34432e915e8415b112c...

Re:The getrandom(2) system call was requested by the LibreSS... by agwa on Friday July 18, 2014 @08:04PM (#8056190)
Oh boy, I should have seen this one coming :-)

By "this mess" I meant the LibreSSL fork/chroot mess. I think crypto libraries should just use whatever the OS provides and not try to implement their own CSPRNGs. But git-crypt is a cross-platform application, not a crypto library. Implementing my own cross-platform wrapper around OS CSPRNGs would be decidedly less sane (and more error-prone) than just using the crypto library's CSPRNG, even if I disagree with how the library has done things.

Re:The getrandom(2) system call was requested by the LibreSS... by Terr_ on Thursday July 17, 2014 @07:38PM (#8050874)
I know you said "CS-", but seed-able PRNGs in user-space can be immensely useful in tons of other situations, allowing things to be debugged, replayed, and synchronized.

So even if you convince to use urandom for their crypto needs on *nix platforms, it'll still have to be easy to seed one in userspace if someone really wanted to.

Re:The getrandom(2) system call was requested by the LibreSS... by derefr on Thursday July 17, 2014 @08:16PM (#8051011)
What about a non-global blocks-until-seeded CS-PRNG character device? I.e. you open an rw file descriptor to /dev/csprng, write(2) your seed to it, and then read(2) bytes from it. Open another file descriptor, and you get another CSPRNG that wants a separate seed.

This way, you could, say, somewhat simulate the behaviour of ZeroVM with Docker containers, by having the CSPRNG seed be a configuration parameter passed to `docker run`.

Re:The getrandom(2) system call was requested by the LibreSS... by flaviu1 on Thursday July 17, 2014 @08:33PM (#8051072)
What if you want reproducible random numbers, such as in, I dunno, AES? That limitation would prevent any sort of decrypting things.
Re:The getrandom(2) system call was requested by the LibreSS... by nitrogen on Friday July 18, 2014 @01:57AM (#8051870)
That's not what tptacek means when he says "[user space] CSPRNG", and is more appropriately called a keystream generator, not a CSPRNG, and the input is more appropriately called a key, not a seed.