Merge changes from topic "keystore-niap"

* changes:
  Increase the master key size to 256 bits
  Use vector to pass around keys
  Use SHA256 for 32 byte keys
  Replace Entropy with RAND_bytes