« first day (2575 days earlier)      last day (2096 days later) » 

10:34 AM
@FutureSecurity eprint.iacr.org/2014/167 contains a formal definition
 
The International Stamped Time Server (ISTS) broadcasts a time stamp integrity-protected with RSA-4096 public key (n, e). But mere days after it starts operation, hackers announce they pwned it by rigging the RSA cryptoengine, and publish a valid stamp for year 9999 as a proof. You wrote the key generator and supervised key insertion in the cryptoengine, and are the target of suspicion. Find how the hackers proceeded, and the fastest they could do.
ISTS radioes a 512-byte s changing every minute. Users compute r = s^3 mod n (with big-endian convention), split r into t || h with t 448-byte and h 64-byte, and check that h = SHA512(t). Time t starts with the UTC date in ASCII as 2018-07-31 12:25. t further contains the date and time in a variety of other scales (TAI, GPS, religious and national calendars..) with all bits precisely defined. That's a simple form of RSA signature with message recovery, and public exponent 3.
ISTS computes s from t using a third-party cryptoengine, which you initialized with a private key (n, e, d) you generated. The cryptoengine is battery-powered, communicates thru optical fiber, and is housed in a Tempest safe; you checked that before key insertion, sealed the safe, which stayed that way.
After key setup the device's specification is that it accepts t (a little in advance), computes h = SHA512(t), s = (t || h)^d mod n, then checks s^3 mod n = t || SHA512(t) before s is output, all in constant time.
On top of that, s^3 mod n = t || SHA512(t) and t are re-cheked before broadcast, and s is released when the UTC minute changes as determined by a stable atomic clock. Every communication on the optical fiber after key insertion was logged, and checks, with t of correct content.
 
10:57 AM
@SEJPM: thank you for the edits!
 
 
9 hours later…
7:29 PM
PRP: Family of {0, 1}^n → {0, 1}^n
PRF: Family of {0, 1}^* → {0, 1}^n
PRG: Function of {0, 1}^k → {0, 1}^*
This was my understanding of the three. * superscript meaning zero or more. n and k being some constant.
 
@FutureSecurity PRPs and PRFs take keys
also PRFs and PRGs usually only output / take a fixed length
which is however usually larger than the input / output length
(at least in the formal definitions)
 
Can a PRF normally accept variable length inputs?
 
@FutureSecurity most definitions I have seen only let them take a fixed length input
however that length is usually polynomial in the output length
 
Constant length PRG output is very easy to accept. PRF is a little harder. Isn't HMAC a PRF? I can see defining it in the context of one paper to be a specific length but I do not know what kind of notation would be needed for a universal definition.
I mean without a Kleene star. Assuming it's regular language notation used in these definitions.
Or maybe (0|1)^{0,m} or something similar. m being the maximum input length.
 
7:47 PM
@FutureSecurity formally usually the input length is fixed
I suppose the usual work-around is to consider "padding"
also I'm confident you can build a variable-length PRF from a fixed-length one
(even though I don't know right now how)
 
k_{i+1} = f(k_i, m_i) maybe? Sort of like Merkle-Damgard. f being a member of the PRF F.
Thanks for the effort to help btw. That paper you linked says a PRF has the form F: {0, 1}^l × {0, 1}^m → {0,1}^m. It uses F as a function where the first parameter is the key and the second the message. I don't know why m is used twice.
 
8:19 PM
Ahah. Unrelated to that last point, but I realized I'm probably conflating PRG and CSPRNG. That doesn't resolve all my unknowns. Just another probable error I probably need to correct.
Wikipedia, which I'm not using as an authoritative source, says "The guarantee of a PRG is that a single output appears random if the input was chosen at random. On the other hand, the guarantee of a PRF is that all its outputs appear random, regardless of how the corresponding inputs were chosen, as long as the function was drawn at random from the PRF family." In that context PRG does not sound like a PRNG.
 

« first day (2575 days earlier)      last day (2096 days later) »