Does combining a non-cryptographically secure string with a cryptographically secure string result in a cryptographically secure string?

I’m using php, but the general question applies to any confirmed cryptographically secure pseudo-random string concatenated with a non-cryptographically secure string.
I know random_bytes generates a cryptographically secure string
I know … Continue reading Does combining a non-cryptographically secure string with a cryptographically secure string result in a cryptographically secure string?

Simulating a dice throw with threadlocalrandom does not converge to the expected value [closed]

I was trying to verify the expected value formula in java.
I did something very trivial, I simulated the roll of a dice, but I mapped each side to a specific value. So each value has probability of 1/6.
The expected value was determined as… Continue reading Simulating a dice throw with threadlocalrandom does not converge to the expected value [closed]

Is there a way to programatically generate new hash functions that are secure?

Is it possible to programmatically generate different hash functions? Of course, it is. We can simply tweak the numerical parameters of the hash function. But is there a known way to generate secure hash functions programmatically? I got a… Continue reading Is there a way to programatically generate new hash functions that are secure?