Name a well-known and standardized function $F : \{0,1\}^{256} × \{0,1\}^{128} → \{0,1\}^{128}$ that is believed to be a pseudorandom permutation.

I was thinking SHA256, but I am not sure. Can someone clarify this please?

  • 1
    $\begingroup$ Welcome to crypto.stackexchange - Here's a hint: $F$ takes 2 arguments, one of which is 256 bits in size, and the other is 128 bits in size. What common type of algorithm uses two inputs of those size and is invertible? $\endgroup$ – Ella Rose May 2 '19 at 16:28
  • $\begingroup$ @EllaRose, is it a hash function? sorry i don't know $\endgroup$ – user0x777fffffff May 2 '19 at 16:44
  • 3
    $\begingroup$ Hint: hash functions typically are not modeled as pseudorandom permutations... $\endgroup$ – poncho May 2 '19 at 18:32
  • 4
    $\begingroup$ Counting the number of input arguments to the sha256 function is not hard. This homework question is answerable by looking at function signatures in a cryptography API without knowing anything about cryptography. Crypto stack exchange expects you to show some effort. Call it "proof of work". You're trying to get answers without opening the book. $\endgroup$ – Z.T. May 2 '19 at 19:17
  • $\begingroup$ Hint: it is also defined for 128, 192 and 256 bit keys. $\endgroup$ – Frank Denis May 3 '19 at 8:26

An $n$-bit hash function is typically defined as $F:\{0,1\}^\ast\rightarrow\{0,1\}^n$. Furthermore, hashes are not classified as pseudorandom permutations. What you are likely looking for is a block cipher. A block cipher with block size $n$ and key size $k$ would be $F:\{0,1\}^n\times\{0,1\}^k\rightarrow\{0,1\}^n$. Can you think of a popular cipher which has a 128-bit block size and takes a 256-bit key? Hint:

It's a NIST standard.

You may want to read about the differences between a PRP and a PRF.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.