key length

The size of a cryptographic key in bits, which sets how many possible keys an attacker would have to try.

In more detail

Each extra bit doubles the work of a brute-force search, but lengths are only comparable within one kind of algorithm. A 128-bit AES key is already beyond brute force and 256 bits adds margin, while RSA needs at least 2048 bits, with NIST expecting 3072 bits after 2030, and elliptic curves reach similar strength with 256-bit keys. Short keys, such as 1024-bit RSA, should be replaced.

Examples

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072 -out rsa.key
Public-Key: (1024 bit)

Related terms

Taught in

References