[PATCH] Adding diversity for security

Tom Roeder tmroeder at google.com
Tue Oct 15 11:06:10 PDT 2013

  LGTM now, other than a minor comment fix. The crypto RNG implementation now looks to be a special case of CTR_DRBG. However, I'm new to LLVM, so someone other than me should still look at the code and approve it.

  CC'ing Nadav as the owner of the X86 backend: Nadav, can you please look at this?



Comment at: lib/Support/RandomNumberGenerator.cpp:141
@@ -140,3 +140,3 @@
     unsigned char Temp[SEEDLEN];
     for (unsigned i = 0; i < SEEDLEN / AES_BLOCK_SIZE; ++i) {
       // Increment 128bit V
This code depends on the fact that AES_BLOCK_SIZE divides SEEDLEN exactly. This is probably OK to assume, but it should be documented in a comment on the definition of SEEDLEN.


More information about the llvm-commits mailing list