What is Key generation?
'''Key generation''' is the process of generating [[Key (cryptography)|keys]] for [[cryptography]]. The key is used to [[Encryption|encrypt]] and decrypt data whatever the data is being encrypted or decrypted. Modern cryptographic systems include [[symmetric-key algorithm]]s (such as [[Data Encryption Standard|DES]] and [[Advanced Encryption Standard|AES]]) and [[Public-key cryptography|public-key algorithms]] (such as [[RSA]]). Symmetric-key algorithms use a [[Symmetric-key algorithm|single shared key]]; keeping data secret requires keeping this key secret. Public-key algorithms use a [[Public-key cryptography|public key]] and a [[Public-key cryptography|private key]]. The public key is made available to anyone (often by means of a [[Public key certificate|digital certificate]]). A sender will encrypt data with the public key; only the holder of the private key can decrypt this data. Since public-key algorithms tend to be much slower than symmetric-key algorithms, modern systems such as [[Transport Layer Security|TLS]] and its predecessor [[Secure Sockets Layer|SSL]] as well as the [[Secure Shell|SSH]] use a combination of the two in which: # One party receives the other's public key, and encrypts a small piece of data (either a symmetric key or some data that will be used to generate it). # The remainder of the conversation (the remaining party) uses a (typically faster) symmetric-key algorithm for encryption. The simplest method to read encrypted data is a [[brute force attack]]–simply attempting every number, up to the maximum length of the key. Therefore, it is important to use a sufficiently long [[Key size|key length]]; longer keys take [[Exponential function|exponentially]] longer time to attack, making a [[brute force attack]] invisible and impractical. Currently, commonly used key lengths are: # 128-[[bit]]s for symmetric key algorithms. # 1024-[[bit]]s for public-key algorithms. == Key generation algorithms == In computer [[cryptography]] keys are integers. In some cases keys are randoml