If I have a "truly random number" $K$ of $L$ bits (whatever "truly random" means... is it a value from a normal distribution a truly random number, or only uniform distributions are considered "truly random"?), and a "truly random number" $T$ of $M \le L$ bits,
which arithmetic/bitwise algorithms among $K$ and $T$ can generate new truly random numbers? If $M=L$, is $K + T$ or $K\ xor\ T$ a truly random number? or if $M\lt L$, do methods like HKDF-expand-label
, HKDF-extract
, or just sha256
over $K$ and $T$ generate truly random numbers? (for example, dividing $K$ in $L/M$ blocks of $M$ bits, apply some of these methods and concat their outputs).
I would like to know more about which properties are required for a deterministic algorithm to yield truly random numbers provided its inputs are truly random numbers.
A couple of guesses (assuming $M=L$ for simplicity), $K + T$ is a truly random number, but $K\ bitwise\_and\ T$ is not.
NOTE: My question is on the context of one-time pad ciphers. I want to store the cipher text and $K$ separately, and transfer it over a secure-channel only when decryption is required, but instead of transferring $K$ itself, which could be very long since it must match the plaintext length (which can be very long), I'm thinking on calculating $K$ by derivation from $J$ (of size $L$) and $T$ of size $M$, both being random numbers. $J$ is stored client-side, $T$ is stored server-side and fetched over a secure channel, and $K$ is finally derivated client-side and discarded from memory immediately after decryption. My question above is finally about which derivation function to use so that $K$ is indistinguishable from a truly random number assuming $J$ and $T$ are truly random numbers.