Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Key generation
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Process of generating keys in cryptography}} '''Key generation''' is the process of generating keys in [[cryptography]]. A key is used to encrypt and decrypt whatever data is being encrypted/decrypted. A device or program used to generate keys is called a key generator or [[Key generator|keygen]]. ==Generation in cryptography== 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 (algorithm)|RSA]]). Symmetric-key algorithms use a single shared key; keeping data secret requires keeping this key secret. Public-key algorithms use a [[public key]] and a [[private key]]. The public key is made available to anyone (often by means of a [[digital certificate]]). A sender encrypts data with the receiver's 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 [[Secure Shell|SSH]] use a combination of the two: one party receives the other's public key, and encrypts a small piece of data (either a symmetric key or some data used to generate it). The remainder of the conversation uses a (typically faster) symmetric-key algorithm for encryption. Computer cryptography uses [[integer]]s for keys. In some cases, keys are randomly generated using a ''[[random number generator]] (RNG)'' or ''[[pseudorandom number generator]] (PRNG)''. A PRNG is a [[computer]] [[algorithm]] that produces data that appears random under analysis. PRNGs that use system entropy to [[Random seed|seed]] data generally produce better results, since this makes the initial conditions of the PRNG much more difficult for an attacker to guess. Another way to generate randomness is to utilize information outside the system. [[Veracrypt]] (a disk encryption software) utilizes user mouse movements to generate unique seeds, in which users are encouraged to move their mouse sporadically.<ref>{{Cite web |title=VeraCrypt - Random Number Generator |url=https://veracrypt.eu/en/Random%20Number%20Generator.html |access-date=2025-05-14 |website=veracrypt.eu}}</ref> In other situations, the key is derived deterministically using a [[passphrase]] and a [[key derivation function]]. Many modern protocols are designed to have [[forward secrecy]], which requires generating a fresh new shared key for each session. Classic cryptosystems invariably generate two identical keys at one end of the communication link and somehow transport one of the keys to the other end of the link. However, it simplifies [[key management]] to use [[Diffie–Hellman key exchange]] instead. The simplest method to read encrypted data without actually decrypting it 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 length]]; longer keys take exponentially longer to attack, rendering a brute-force attack impractical. Currently, key lengths of [[128-bit|128 bit]]s (for symmetric key algorithms) and 2048 bits (for public-key algorithms) are common. ==Generation in physical layer== ===Wireless channels=== A wireless channel is characterized by its two end users. By transmitting pilot signals, these two users can estimate the channel between them and use the channel information to generate a key which is secret only to them.<ref>{{cite journal|author1=Chan Dai Truyen Thai |author2=Jemin Lee |author3=Tony Q. S. Quek |title=Physical-Layer Secret Key Generation with Colluding Untrusted Relays|journal=IEEE Transactions on Wireless Communications|pages=1517–1530|volume=15|issue=2|date=Feb 2016|doi=10.1109/TWC.2015.2491935|s2cid=27603548 }}</ref> The common secret key for a group of users can be generated based on the channel of each pair of users.<ref>{{cite conference |title=Secret Group Key Generation in Physical Layer for Mesh Topology |author1=Chan Dai Truyen Thai |author2=Jemin Lee |author3=Tony Q. S. Quek |date=Dec 2015 |book-title=2015 IEEE Global Communications Conference (GLOBECOM) |pages=1–6 |location=San Diego |doi=10.1109/GLOCOM.2015.7417477 }}</ref> ===Optical fiber=== A key can also be generated by exploiting the phase fluctuation in a fiber link.<ref>{{Cite journal|last1=Zaman|first1=Imam Uz|last2=Lopez|first2=Anthony Bahadir|last3=Faruque|first3=Mohammad Abdullah Al|last4=Boyraz|first4=Ozdal|date=2018-12-15|title=Physical Layer Cryptographic Key Generation by Exploiting PMD of an Optical Fiber Link|url=http://dx.doi.org/10.1109/jlt.2018.2880957|journal=Journal of Lightwave Technology|volume=36|issue=24|pages=5903–5911|doi=10.1109/jlt.2018.2880957|pmid=30713365 |issn=0733-8724|pmc=6350795|bibcode=2018JLwT...36.5903Z }}</ref> ==See also== * [[Distributed key generation]]: For some protocols, no party should be in the sole possession of the secret key. Rather, during ''distributed key generation'', every party obtains a [[secret sharing|share]] of the key. A [[Threshold cryptosystem|threshold]] of the participating parties need to cooperate to achieve a cryptographic task, such as decrypting a message. ==References== {{Reflist}} [[Category:Key management]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)