13:56
@MaartenBodewes What's wrong with rounding errors? The exact bit-for-bit outputs of all basic arithmetic operations (+, -, *, /, sqrt) are precisely defined for all inputs except NaN (and whether the output is a NaN or not, and what kind, is also precisely defined, just not the bits of the NaN payload). This has even been seen in crypto implementations like the first implementations of Poly1305.
@fectin If you do this in binary64 floating-point arithmetic (or x86 80-bit floating-point arithmetic, or binary128, or double-binary64) when the input is restricted to be an integer in [0, 2^31), the effect will be exactly the same as multiplying by two; the fact that you took an intermediate detour through some floating-point numbers in [0,1] is immaterial. Do you think 2*x makes a good PRNG?
@fectin If you do this in binary32 arithmetic, then the result is 2*round(x) where round(x) is the binary32 floating-point number nearest to x, with ties broken toward even. Again the detour through [0,1] is immaterial.
The problem you're tripping over here is not that rounding errors are unpredictable; quite the reverse: under the false (but distressingly popular) premise that floating-point arithmetic is black magic, you've done some things that sound like random black magic in your head, and ended up with something trivially predictable because floating-point arithmetic is not, in fact, black magic, but actually a very predictable reliable computational system.
2 hours later…
16:12
@SqueamishOssifrage agreed. In fact, if you re-read, you’ll see that I discovered this when I looked back at it. Fortunately, I was just looking for a repeatably-seedable hash with decent distribution and low predictability. That’s a much lower bar than “secure”.
17:13
@SqueamishOssifrage Sure, the rounding errors are well defined. It is really more of a problem when floating point is used to perform calculations where both the input / output are integers. Much better to use integer calculations where possible for that.
@SqueamishOssifrage I'll check how much the related key attacks apply when e.g. part of the key is simply set to zero. Of course the attack would only be interesting if the attack would downgrade the security more than that the reduction of randomness does in the first place. Do you have a reference that shows the relation? But you are right, I should definitely not make overly broad statements like that.
17:35
@MaartenBodewes I doubt whether there is a reference for specifically the subspace you recommended. But that's not because it's secure; it's just that nobody would bother studying it. The security contract for a PRP is that the key must be chosen uniformly at random. No uniform random key, no security contract. End of story. Any specific attacks in the literature on particular violations of the contract are mainly of academic interest; point is: you're in breach of the contract.
1 hour later…
1 hour later…
20:03
https://crypto.stackexchange.com/a/98961/100506
> ... we are not able to compare distance in any way in Fp.
https://en.wikipedia.org/wiki/Field_norm#Finite_fields
Perhaps I didn't read the content hard enough but the statement that there is no notion of distance over finite fields seems to be false since it appears that one can in fact define a norm over a finite field?
> ... we are not able to compare distance in any way in Fp.
https://en.wikipedia.org/wiki/Field_norm#Finite_fields
Perhaps I didn't read the content hard enough but the statement that there is no notion of distance over finite fields seems to be false since it appears that one can in fact define a norm over a finite field?
« first day (3892 days earlier) ← previous day next day → last day (1015 days later) »
Transcript for
Mar8
Mar '229
Mar10
The Side Channel
Mostly randomly generated noise. – crypto.stackexchange.com