In cryptography, the security parameter is a variable that measures the input size of the computational problem. Both the resource requirements of the cryptographic algorithm or protocol as well as the adversary's probability of breaking security are expressed in terms of the security parameter.
The security parameter is usually expressed in unary representation (for example, a security parameter of n is expressed as a string of n 1s) so that the time complexity of the cryptographic algorithm is polynomial in the size of the input. For example, in the RSA cryptosystem, the security parameter k denotes the length in bits of the modulus n; the positive integer n must therefore be a number in the set {0, …, 2k - 1}.