ultramancool

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by ultramancool

  1. That's not that good.

    You are grabbing huge amounts of data from /dev/random when you only need 256 BITS and then you almost throw away a lot of those bits by encoding the data twice. Luckily BTSync saves you by hashing the long string it gets from you down to 256 bits.

    All you need to do is this ...

    head -c 32 /dev/random | base64

    This does usually take a little while to run because Linux very carefully underestimates the amount of randomness available in it's pool. You're probably more than safe enough using /dev/urandom in reality.

    All good and true.

    Though actually, my preferred method is to provide lots of real random data to a hash command perhaps like this:

    cat /var/log/syslog.0 | sha256sum - | xxd -r -p | base64

    You just went fucking batshit, /dev/urandom is _much_ more secure and has much higher entropy than your syslog. Maybe this could be used as one source of entropy, but using it as the sole source is a terrible idea. Remember that the kernel already takes disk writes into account in its entropy gathering.