Social:Key generator
A key generator (or keygen) in cryptography is a protocol or algorithm used to generate a sequence with pseudo-random characteristics for use as an encryption key.[1][2][3] The generated sequence is used as an encryption key at one end of communication and as a decryption key at the other.
Key generators can be implemented in systems designed to generate, distribute, and authenticate[4] keys for public key cryptography, where without the private key, one cannot access information encrypted with the public key.[5]
Requirements
For a key generator to be cryptographically secure, its output must have several properties:[6]
- Uncorrelated sequences – no sequence of any given length should be correlated to any other sequence of the algorithm's output
- Long period – the sequence should not repeat for a very long time
- Uniform distribution – the output bits should be uniformly distributed
- Unpredictability – it should be computationally infeasible to predict future output given past output
Key generators typically rely on sources of entropy to seed their algorithms, which may be hardware-based (such as electronic noise or timing variations) or software-based.[6]
Types
Symmetric key generators
Symmetric key generators produce a single shared key used for both encryption and decryption. These generators often use pseudorandom number generators (PRNGs) seeded with entropy from various sources. Modern standards such as NIST SP 800-90 specify approved random bit generators for this purpose.[7]
Keystream generators
In stream ciphers, a keystream generator produces a continuous stream of pseudorandom bits that are combined with the plaintext using the XOR operation.[8] The keystream generator takes a relatively short key (typically 80–256 bits) and an initialization vector (IV) and expands them into a much longer keystream.[9]
Examples
Common key generator implementations include:
- Linear-feedback shift registers (LFSRs) – widely used in hardware implementations due to their simplicity, though typically combined with non-linear functions to improve security[8]
- A5/1 – the stream cipher used for GSM mobile phone encryption, based on three irregularly clocked LFSRs[10]
- Trivium – an eSTREAM finalist stream cipher using three interconnected shift registers[11]
- Grain – a lightweight stream cipher using both linear and non-linear feedback shift registers[9]
- Solitaire (or Pontifex) cipher – a manual keystream generator using a deck of playing cards
See also
- Key derivation function
- Key generation
- Cryptographically secure pseudorandom number generator
- Key management
- Stream cipher
References
- ↑ "Generating Keys for Encryption and Decryption". Microsoft Docs. https://docs.microsoft.com/en-us/dotnet/standard/security/generating-keys-for-encryption-and-decryption.
- ↑ "Symmetric Key Cryptography Using Random Key Generator". https://www.researchgate.net/publication/221199745.
- ↑ Abdalrdha, Zainab Khyioon; Al-Qinani, Iman Hussein; Abbas, Farah Neamah (2019). "Subject Review: Key Generation in Different Cryptography Algorithm". International Journal of Scientific Research in Science, Engineering and Technology: 230–240. doi:10.32628/IJSRSET196550. https://ijsrset.com/IJSRSET196550.
- ↑ Bellare, Mihir; Rogaway, Phillip (August 1993). "Entity Authentication and Key Distribution". Advances in Cryptology — CRYPTO' 93. Lecture Notes in Computer Science. 773. pp. 232–249. doi:10.1007/3-540-48329-2_21. ISBN 978-3-540-57766-9.
- ↑ Fox, Pamela. "Public key encryption". https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:online-data-security/xcae6f4a7ff015e7d:data-encryption-techniques/a/public-key-encryption.
- ↑ 6.0 6.1 "Choosing the Right Cryptographic Key Generation Algorithm". https://www.cryptomathic.com/blog/how-to-choose-the-right-cryptographic-key-generation-algorithm.
- ↑ "Recommendation for Cryptographic Key Generation". National Institute of Standards and Technology. https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-133.pdf.
- ↑ 8.0 8.1 Menezes, Alfred J.; van Oorschot, Paul C.; Vanstone, Scott A. (1996). "Stream Ciphers". Handbook of Applied Cryptography. CRC Press. ISBN 0-8493-8523-7. https://cacr.uwaterloo.ca/hac/about/chap6.pdf.
- ↑ 9.0 9.1 "LIZARD – A Lightweight Stream Cipher for Power-constrained Devices". IACR Transactions on Symmetric Cryptology. 2017. doi:10.13154/tosc.v2017.i1.45-79. https://tosc.iacr.org/index.php/ToSC/article/view/584.
- ↑ "A Real-World Attack Breaking A5/1 within Hours". IACR Cryptology ePrint Archive. 2008. https://eprint.iacr.org/2008/147.pdf.
- ↑ Simpson, L.; Boztas, S. (2012). "State cycles, initialization and the Trivium stream cipher". Cryptography and Communications 4: 245–258. doi:10.1007/s12095-012-0066-6.
