Symmetric-key algorithm: Difference between revisions

Content deleted Content added
Line 4:
 
== Types ==
Symmetric-key encryption can use either [[stream cipher]]s or [[block cipher]]s.<ref>{{cite book |last = Pelzl & Paar |title = Understanding Cryptography |url = https://archive.org/details/understandingcry00paar |url-access = limited |year = 2010 |publisher = Springer-Verlag |___location = Berlin |page = [https://archive.org/details/understandingcry00paar/page/n44 30] |bibcode = 2010uncr.book.....P }}</ref>
 
* Stream ciphers encrypt the digits (typically [[byte]]s), or letters (in substitution ciphers) of a message one at a time. An example is [[ChaCha20]]. [[Substitution cipher]]s are well-known ciphers, but can be easily decrypted using a [[frequency table]].<ref>{{Cite book|last1=Bellare|first1=Mihir|url=https://web.cs.ucdavis.edu/~rogaway/classes/227/spring05/book/main.pdf|title=Introduction to Modern Cryptography|last2=Rogaway|first2=Phillip|year=2005|language=English}}</ref>
 
**[[Substitution cipher]]s are well-known ciphers, but can be easily decrypted using a [[frequency table]].<ref>{{Cite book|last1=Bellare|first1=Mihir|url=https://web.cs.ucdavis.edu/~rogaway/classes/227/spring05/book/main.pdf|title=Introduction to Modern Cryptography|last2=Rogaway|first2=Phillip|year=2005|language=English}}</ref>
* Block ciphers take a number of bits and encrypt them in a single unit, padding the plaintext to achieve a multiple of the block size. The [[Advanced Encryption Standard]] (AES) algorithm, approved by [[NIST]] in December 2001, uses 128-bit blocks.
 
== Implementations ==
Line 37:
== Key establishment ==
{{ main | key establishment }}
Symmetric-key algorithms require both the sender and the recipient of a message to have the same secret key. All early cryptographic systems required either the sender or the recipient to somehow receive a copy of that secret key over a physically secure channel.
All early cryptographic systems required either the sender or the recipient to somehow receive a copy of that secret key over a physically secure channel.
 
Nearly all modern cryptographic systems still use symmetric-key algorithms internally to encrypt the bulk of the messages, but they eliminate the need for a physically secure channel by using [[Diffie–Hellman key exchange]] or some other [[public-key cryptography|public-key protocol]] to securely come to agreement on a fresh new secret key for each session/conversation (forward secrecy).