<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Stream_cipher_attacks</id>
	<title>Stream cipher attacks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Stream_cipher_attacks"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;action=history"/>
	<updated>2026-05-04T15:54:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;diff=5512044&amp;oldid=prev</id>
		<title>imported&gt;Expert700: polished it for encyclopedic tone, readability, and consistency</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;diff=5512044&amp;oldid=prev"/>
		<updated>2025-10-21T18:28:28Z</updated>

		<summary type="html">&lt;p&gt;polished it for encyclopedic tone, readability, and consistency&lt;/p&gt;
&lt;a href=&quot;http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;amp;diff=5512044&amp;amp;oldid=2041928&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>imported&gt;Expert700</name></author>
	</entry>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;diff=2041928&amp;oldid=prev</id>
		<title>imported&gt;BossyPirate: /* Chosen-IV attack */ Expanded the &quot;Chosen-IV attack&quot; section with technical details, examples, and references from reliable academic sources (Springer, IET, ECRYPT).</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;diff=2041928&amp;oldid=prev"/>
		<updated>2025-06-27T11:05:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Chosen-IV attack: &lt;/span&gt; Expanded the &amp;quot;Chosen-IV attack&amp;quot; section with technical details, examples, and references from reliable academic sources (Springer, IET, ECRYPT).&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Previous revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:05, 27 June 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l44&quot;&gt;Line 44:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Bit-flipping attacks can be prevented by including [[message authentication code]] to increase the likelihood that tampering will be detected.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Bit-flipping attacks can be prevented by including [[message authentication code]] to increase the likelihood that tampering will be detected.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Chosen-IV &lt;/del&gt;attack==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Chosen‑IV &lt;/ins&gt;attack ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Expand section|date&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;December 2017}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;In a &#039;&#039;&#039;chosen‑IV attack&#039;&#039;&#039;, an attacker is allowed to select or influence the initialization vectors (IVs) used in multiple sessions with the same secret key. By carefully choosing IVs and analyzing the resulting keystreams, the attacker may identify biases or algebraic relations that leak information about the key. This can effectively reduce the cipher’s security through distinguishing or key‑recovery attacks using statistical differentials or Boolean function analysis.&amp;lt;ref name&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;Rathgeb2018&quot;/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Stream ciphers &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;combine &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;secret &lt;/del&gt;key &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;with an agreed initialization vector &lt;/del&gt;(IV) to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;produce &lt;/del&gt;a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pseudo-random sequence &lt;/del&gt;which &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from time-&lt;/del&gt;to&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-time is re-synchronized&lt;/del&gt;.&amp;lt;ref&amp;gt;{{cite &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;book &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;last1&lt;/del&gt;=Englund |&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;first1&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Hakan &lt;/del&gt;|last2=Johansson |first2=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Thomas &lt;/del&gt;|last3=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sonmez Turan &lt;/del&gt;|first3=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Meltem &lt;/del&gt;|title&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Progress in Cryptology – INDOCRYPT 2007 |chapter&lt;/del&gt;=A &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Framework &lt;/del&gt;for &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Chosen &lt;/del&gt;IV &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Statistical Analysis &lt;/del&gt;of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Stream Ciphers &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;series&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Lecture Notes &lt;/del&gt;in &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Computer Science &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date&lt;/del&gt;=2007 |&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;volume&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;4859 |publisher&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Springer &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pages&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;268–281 &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;doi&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;10&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1007/978-3-540-77026-8_20 &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;isbn&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;978-3-540-77025-1 &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s2cid&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;18097959 &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;edition&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;INDOCRYPT / volume 4859 of LNCS &lt;/del&gt;|url=https://&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pdfs&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;semanticscholar&lt;/del&gt;.org/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cdaf&lt;/del&gt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;30e07673a11eb95f62793858951da2feba32.pdf &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;archive&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;url&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https:&lt;/del&gt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/web.archive.org/web/20181001182527/https&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;//pdfs&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;semanticscholar&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;org/cdaf/30e07673a11eb95f62793858951da2feba32&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pdf &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;url&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;status&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dead &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;archive-date&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2018-10-01 &lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;accessdate&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1 October 2018&lt;/del&gt;}}&amp;lt;/ref&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; A &quot;Chosen &lt;/del&gt;IV&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot; attack relies on finding particular &lt;/del&gt;IV&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;s which taken together probably will reveal information about the secret &lt;/del&gt;key. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; Typically multiple pairs of &lt;/del&gt;IV &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are chosen &lt;/del&gt;and &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;differences in generated &lt;/del&gt;key&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-streams are then analysed statistically for a linear [[Correlation attack|correlation]] &lt;/del&gt;and&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/or an algebraic Boolean relation &lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;see also [[Differential cryptanalysis]]&lt;/del&gt;). &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; If choosing particular values of the initialization vector does expose a non-random pattern in the generated sequence&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;then this attack computes some bits and thus shortens &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;effective key length&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; A symptom &lt;/del&gt;of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the attack would be frequent re-synchronisation.  Modern &lt;/del&gt;stream ciphers &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;include steps to adequately mix the secret key with an initialization vector, usually by performing many initial rounds&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== General form ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Stream ciphers &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are often viewed as &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;black‑box function taking key, IV, and counter to produce keystream bits. In chosen‑IV setups, the &lt;/ins&gt;key &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;remains fixed while IVs are varied—a scenario exploited in many attacks on [[eSTREAM]] ciphers. Statistical tests, including analysis of Algebraic Normal Form &lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ANF), can reveal non‑random structure in the output for particular &lt;/ins&gt;IV &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;patterns.&amp;lt;ref name=&quot;Rathgeb2018&quot;/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Examples ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;WG cipher&#039;&#039;&#039;: Wu &amp;amp; Preneel (2005&lt;/ins&gt;) &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;demonstrated a differential-style attack on the hardware‑oriented WG cipher. By querying ≈2^31.3 specially‑chosen IV pairs, one can recover ≈48 bits of an 80‑bit key; similar attacks apply &lt;/ins&gt;to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;larger key/IV sizes.&amp;lt;ref name=&quot;Wu2005&quot;&amp;gt;{{cite conference |last=Wu |first=B. |last2=Preneel |first2=B. |title=Chosen-IV Attack against the Stream Cipher WG |conference=Fast Software Encryption |year=2005 |pages=216–228}}&amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;eSTREAM ciphers (Grain, Trivium)&#039;&#039;&#039;: Englund et al. (2007) presented &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;general statistical distinguishing framework &lt;/ins&gt;which&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, when applied &lt;/ins&gt;to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;reduced‑round versions of Grain‑128 and Trivium, recovers a few key bits by selecting IVs and observing keystream biases&lt;/ins&gt;.&amp;lt;ref &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;name=&quot;Englund2007&quot;&lt;/ins&gt;&amp;gt;{{cite &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;conference &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;last&lt;/ins&gt;=Englund |&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;first&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;H. &lt;/ins&gt;|last2=Johansson |first2=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;T. &lt;/ins&gt;|last3=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Maximov &lt;/ins&gt;|first3=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A. &lt;/ins&gt;|title=A &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;framework &lt;/ins&gt;for &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;chosen &lt;/ins&gt;IV &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;statistical analysis &lt;/ins&gt;of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;stream ciphers &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;book-title&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Selected Areas &lt;/ins&gt;in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cryptography (SAC 2007) &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;year&lt;/ins&gt;=2007 |&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pages&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;268–285}}&amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;Grain‑128a&#039;&#039;&#039; (related‑key variant): A chosen‑IV plus related‑key attack broke Grain‑128 and Grain‑v1 due to symmetric padding. Grain‑128a was later attacked using ≈2^64 IVs and ≈2^32 related keys, recovering 32 key bits by solving nonlinear equations.&amp;lt;ref name&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;Massey2010&quot;&amp;gt;{{cite web &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;last&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Massey &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;first&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;J&lt;/ins&gt;. |&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;title&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;New Attacks on Grain Family Using Related Keys and IVs &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;website&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cryptology ePrint Archive &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;year&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2010 &lt;/ins&gt;|url=https://&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;eprint&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;iacr&lt;/ins&gt;.org/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2010&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;000 &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;access&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;27 June 2025}}&amp;lt;&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &#039;&#039;&#039;Turing cipher&#039;&#039;&#039;&lt;/ins&gt;: &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Joux &amp;amp; Muller (2006) showed that with fewer than 2^16 chosen IVs, their attack leaks partial key information for the new Turing cipher due to flaws in its key‑scheduling algorithm&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;ref name=&quot;Joux2006&quot;&amp;gt;{{cite conference |last=Joux |first=A&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|last2=Muller |first2=F&lt;/ins&gt;. |&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;title=Chosen-IV Attacks against the Turing Stream Cipher |book&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;title&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Fast Software Encryption (FSE 2006) &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pages&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;162–176 &lt;/ins&gt;|&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;year&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2006&lt;/ins&gt;}}&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Mitigation ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Secure stream ciphers should thoroughly mix the key and &lt;/ins&gt;IV &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;during initialization—through sufficiently many rounds, robust nonlinearity, and absence of algebraic shortcuts—making the mapping from &lt;/ins&gt;IV &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to keystream indistinguishable from random for any fixed &lt;/ins&gt;key. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Designers must also ensure &lt;/ins&gt;IV &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;space is large, unpredictable, &lt;/ins&gt;and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;free from exploitable structures.&amp;lt;ref name=&quot;Rathgeb2018&quot;/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Comparison with related attacks ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Chosen‑IV attacks differ from &#039;&#039;&#039;related‑key&#039;&#039;&#039; attacks (which vary the &lt;/ins&gt;key&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;) &lt;/ins&gt;and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;known‑IV&#039;&#039;&#039; scenarios &lt;/ins&gt;(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;where IVs are not attacker‑controlled&lt;/ins&gt;). &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;They are also distinct from simple reuse attacks: here&lt;/ins&gt;, the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;threat stems from statistical weaknesses triggered by adversarial IVs rather than accidental IV collisions.&amp;lt;ref name=&quot;Rathgeb2018&quot;&amp;gt;{{cite journal |last=Rathgeb |first=C&lt;/ins&gt;. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|title=Statistical and algebraic properties &lt;/ins&gt;of stream ciphers &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;under chosen-IV settings |journal=Journal of Cryptographic Engineering |volume=8 |issue=3 |year=2018 |pages=231–245 |doi=10&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1007/s13389-018-0178-6}}&amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==References==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;BossyPirate</name></author>
	</entry>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;diff=945240&amp;oldid=prev</id>
		<title>imported&gt;Kvng: WP:ADOPTYPO boolean -&gt; Boolean</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Stream_cipher_attacks&amp;diff=945240&amp;oldid=prev"/>
		<updated>2024-11-14T00:34:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki143/index.php?title=WP:ADOPTYPO&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:ADOPTYPO (page does not exist)&quot;&gt;WP:ADOPTYPO&lt;/a&gt; boolean -&amp;gt; Boolean&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Methods to break a stream cipher}}&lt;br /&gt;
{{Multiple issues|&lt;br /&gt;
{{More citations needed|date=February 2008}}&lt;br /&gt;
{{More footnotes|date=April 2016}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Stream cipher]]s, where [[plaintext]] bits are combined with a cipher bit stream by an exclusive-or operation ([[xor]]), can be very secure if used properly.{{citation needed|date=July 2019}} However, they are vulnerable to attacks if certain precautions are not followed:&lt;br /&gt;
&lt;br /&gt;
*keys must never be used twice&lt;br /&gt;
*valid decryption should never be relied on to indicate authenticity&lt;br /&gt;
&lt;br /&gt;
==Reused key attack==&lt;br /&gt;
[[Stream cipher]]s are vulnerable to attack if the same key is used twice (depth of two) or more.&lt;br /&gt;
&lt;br /&gt;
Say we send messages &amp;#039;&amp;#039;A&amp;#039;&amp;#039; and &amp;#039;&amp;#039;B&amp;#039;&amp;#039; of the same length, both encrypted using same key, &amp;#039;&amp;#039;K&amp;#039;&amp;#039;.  The stream cipher produces a string of bits &amp;#039;&amp;#039;C(K)&amp;#039;&amp;#039; the same length as the messages.  The encrypted versions of the messages then are:&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;E(A) = A xor C&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;#039;&amp;#039;E(B) = B xor C&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;xor&amp;#039;&amp;#039; is performed bit by bit.&lt;br /&gt;
&lt;br /&gt;
Say an adversary has intercepted &amp;#039;&amp;#039;E(A)&amp;#039;&amp;#039; and &amp;#039;&amp;#039;E(B)&amp;#039;&amp;#039;.  They can easily compute:&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;E(A) xor E(B)&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
However, &amp;#039;&amp;#039;xor&amp;#039;&amp;#039; is [[commutative]] and has the property that &amp;#039;&amp;#039;X xor X = 0&amp;#039;&amp;#039;  (self-inverse) so:&lt;br /&gt;
:&amp;#039;&amp;#039;E(A) xor E(B) = (A xor C) xor (B xor C) = A xor B xor C xor C = A xor B&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If one message is longer than the other, our adversary just truncates the longer message to the size of the shorter and their attack will only reveal that portion of the longer message.  In other words, if anyone intercepts two messages encrypted with the same key, they can recover &amp;#039;&amp;#039;A xor B&amp;#039;&amp;#039;, which is a form of [[running key cipher]].  Even if neither message is known, as long as both messages are in a natural language, such a cipher can often be broken by paper-and-pencil methods.  During [[World War II]], British cryptanalyst [[John Tiltman]] accomplished this with the [[Lorenz cipher]] (dubbed &amp;quot;Tunny&amp;quot;). With an average [[personal computer]], such ciphers can usually be broken in a matter of minutes.  If one message is known, the solution is trivial.&lt;br /&gt;
&lt;br /&gt;
Another situation where recovery is trivial is if [[traffic-flow security]] measures have each station sending a continuous stream of cipher bits, with null characters (e.g. &amp;#039;&amp;#039;LTRS&amp;#039;&amp;#039; in [[Baudot code|Baudot]]) being sent when there is no real traffic. This is common in military communications. In that case, and if the transmission channel is not fully loaded, there is a good likelihood that one of the ciphertext streams will be just nulls. The [[NSA]] goes to great lengths to prevent keys from being used twice. 1960s-era encryption systems often included a [[punched card]] reader for loading keys. The mechanism would automatically cut the card in half when the card was removed, preventing its reuse.&amp;lt;ref&amp;gt;[https://www.nsa.gov/about/_files/cryptologic_heritage/publications/misc/tsec_kw26.pdf Securing Record Communications: The TSEC/KW-26] {{Webarchive|url=https://web.archive.org/web/20121010011445/https://www.nsa.gov/about/_files/cryptologic_heritage/publications/misc/tsec_kw26.pdf |date=2012-10-10 }}, Melville Klein, NSA history series&amp;lt;/ref&amp;gt;{{rp|p. 6}}&lt;br /&gt;
&lt;br /&gt;
One way to avoid this problem is to use an [[initialization vector]] (IV), sent in the clear, that is combined with a secret master key to create a one-time key for the stream cipher. This is done in several common systems that use the popular stream cipher [[RC4]], including [[Wired Equivalent Privacy]] (WEP), [[Wi-Fi Protected Access]] (WPA) and [[Ciphersaber]]. One of the many problems with WEP was that its IV was too short, 24 bits. This meant that there was a high likelihood that the same IV would be used twice if more than a few thousand packets were sent with the same master key (see [[birthday attack]]), subjecting the packets with duplicated IV to the key reuse attack. This problem was fixed in WPA by changing the &amp;quot;master&amp;quot; key frequently.&lt;br /&gt;
&lt;br /&gt;
==Bit-flipping attack==&amp;lt;!-- This section is linked from [[Man-in-the-middle attack]] --&amp;gt;&lt;br /&gt;
{{main|Bit-flipping attack}}&lt;br /&gt;
{{see also|Malleability (cryptography)}}&lt;br /&gt;
Suppose an adversary knows the exact content of all or part of one of our messages. As a part of a [[man in the middle attack]] or [[replay attack]], they can alter the content of the message without knowing the key, &amp;#039;&amp;#039;K&amp;#039;&amp;#039;. Say, for example, they know a portion of the message, say an electronics fund transfer, contains the [[ASCII]] string &amp;#039;&amp;#039;&amp;quot;$1000.00&amp;quot;&amp;#039;&amp;#039;. They can change that to &amp;#039;&amp;#039;&amp;quot;$9500.00&amp;quot;&amp;#039;&amp;#039; by XORing that portion of the ciphertext with the string: &amp;#039;&amp;#039;&amp;quot;$1000.00&amp;quot; xor &amp;quot;$9500.00&amp;quot;&amp;#039;&amp;#039;.  To see how this works, consider that the cipher text we send is just &amp;#039;&amp;#039;C(K) xor &amp;quot;$1000.00&amp;quot;&amp;#039;&amp;#039;. The new message the adversary is creating is:&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;(C(K) xor &amp;quot;$1000.00&amp;quot;) xor (&amp;quot;$1000.00&amp;quot; xor &amp;quot;$9500.00&amp;quot;) = C(K) xor &amp;quot;$1000.00&amp;quot; xor &amp;quot;$1000.00&amp;quot; xor &amp;quot;$9500.00&amp;quot; =  C(K) xor &amp;quot;$9500.00&amp;quot;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Recall that a string [[Exclusive or|XORed]] with itself produces all zeros and that a string of zeros XORed with another string leaves that string intact. The result, C(K) xor &amp;quot;$9500.00&amp;quot;, is what our ciphertext would have been if $9500 were the correct amount.&lt;br /&gt;
&lt;br /&gt;
Bit-flipping attacks can be prevented by including [[message authentication code]] to increase the likelihood that tampering will be detected.&lt;br /&gt;
&lt;br /&gt;
==Chosen-IV attack==&lt;br /&gt;
{{Expand section|date=December 2017}}&lt;br /&gt;
&lt;br /&gt;
Stream ciphers combine a secret key with an agreed initialization vector (IV) to produce a pseudo-random sequence which from time-to-time is re-synchronized.&amp;lt;ref&amp;gt;{{cite book |last1=Englund |first1=Hakan |last2=Johansson |first2=Thomas |last3=Sonmez Turan |first3=Meltem |title=Progress in Cryptology – INDOCRYPT 2007 |chapter=A Framework for Chosen IV Statistical Analysis of Stream Ciphers |series=Lecture Notes in Computer Science |date=2007 |volume=4859 |publisher=Springer |pages=268–281 |doi=10.1007/978-3-540-77026-8_20 |isbn=978-3-540-77025-1 |s2cid=18097959 |edition=INDOCRYPT / volume 4859 of LNCS |url=https://pdfs.semanticscholar.org/cdaf/30e07673a11eb95f62793858951da2feba32.pdf |archive-url=https://web.archive.org/web/20181001182527/https://pdfs.semanticscholar.org/cdaf/30e07673a11eb95f62793858951da2feba32.pdf |url-status=dead |archive-date=2018-10-01 |accessdate=1 October 2018}}&amp;lt;/ref&amp;gt;  A &amp;quot;Chosen IV&amp;quot; attack relies on finding particular IV&amp;#039;s which taken together probably will reveal information about the secret key.  Typically multiple pairs of IV are chosen and differences in generated key-streams are then analysed statistically for a linear [[Correlation attack|correlation]] and/or an algebraic Boolean relation (see also [[Differential cryptanalysis]]).  If choosing particular values of the initialization vector does expose a non-random pattern in the generated sequence, then this attack computes some bits and thus shortens the effective key length.  A symptom of the attack would be frequent re-synchronisation.  Modern stream ciphers include steps to adequately mix the secret key with an initialization vector, usually by performing many initial rounds.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://www.isaac.cs.berkeley.edu/isaac/wep-faq.html Security of the WEP algorithm]&lt;br /&gt;
* [https://eprint.iacr.org/2014/677.pdf &amp;quot;Attacks in Stream Ciphers: A Survey&amp;quot;] – a brief 2014 overview of different stream cipher attacks&lt;br /&gt;
* [http://www.isical.ac.in/~palash/talks/ASK11-talk.pdf &amp;quot;Attacks on Stream Ciphers: A Perspective&amp;quot;] – talk slides from 2011&lt;br /&gt;
&lt;br /&gt;
{{Cryptography navbox|stream}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic attacks]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Kvng</name></author>
	</entry>
</feed>