This is a setup to produce a secret key for symmetrical encryption with TweetNaCl:
1) K1 consists of 32 random bytes
2) K2 consists of 32 random bytes
(By "random" I mean "obtained from /dev/urandom")
3) KC is the concatenation of K1 and K2
4) K consists of the first 32 bytes of the SHA-512 sum of KC
Questions:
a) Is it safe to use K as a secret key? ("safe" meaning "as safe as using 32 random bytes"; it is assumed that K1, K2 and K are kept secret)
b) If an attacker gets his hands on K1 or K2 (but not on both), does he obtain any real advantage?
Rationale: keep K1 and K2 in separate media (e.g., K1 on a pen and K2 on disk)