Skip to main content
3 of 4
added 179 characters in body; edited tags; edited title
D.W.
  • 36.7k
  • 13
  • 105
  • 193

Why does key generation take an input $1^k$, and how do I represent it in practice?

In my lecture, the lecturer said:

Let $K$ be the key generation algorithm. Given a security parameter represented in unary, $1^k$, $K(1^k)$ will output a keypair $(pk; sk)$, known as the public key and the private (or secret) key, respectively.

My question is: When I want to implement the cryptosystem, how should I represent this $1^k$? When I implement the key generation procedure, do I literally require callers to pass me a string of $k$ one-bits that the procedure will never use? And, if so, why is it there in the first place?

juaninf
  • 2.8k
  • 3
  • 19
  • 28