# Intuition for random variables in cryptography

I have a simple question about the use of random variables for encryption schemes, to make sure my intuition is correct.

We say $P(K = k)$ to represent the probability that a particular key $k$ is chosen by the probabilistic algorithm Gen. Formally, $K$ is a random variable that denotes the value of the key.

So the expression $K = k$ denotes an event: specifically, a subset of the sample space. But all the keys are unique, so is this event really a set of size one? And is it then just an elementary event?

Then, why can't we just say $P(k)$ to denote the probability of $k$ being output? Do we use the random variable to be more explicit and clear?

-

We use the random variable to indicate the "by what" part of "the probability of $k$ being output".
So, the probability of $k$ being output by $Gen$? –  Sam Oct 16 '13 at 12:46
Yes. ${}{}{}\;$ –  Ricky Demer Oct 16 '13 at 17:37