亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 16-04.html

?? 應用密碼學電子書籍
?? HTML
字號:
<html><head><TITLE>APPLIED CRYPTOGRAPHY, SECOND EDITION: Protocols, Algorithms, and Source Code in C:Pseudo-Random-Sequence Generators and Stream Ciphers</TITLE>
<!-- BEGIN HEADER --><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><SCRIPT><!--function displayWindow(url, width, height) {        var Win = window.open(url,"displayWindow",'width=' + width +',height=' + height + ',resizable=1,scrollbars=yes');}//--></SCRIPT></HEAD><body bgcolor="ffffff" link="#006666" alink="#006666" vlink="#006666"><P>
<CENTER><B>Applied Cryptography, Second Edition: Protocols,  Algorthms, and Source Code in C (cloth)</B>
<FONT SIZE="-2">
<BR>
<I>(Publisher: John Wiley & Sons, Inc.)</I>
<BR>
Author(s): Bruce Schneier
<BR>
ISBN: 0471128457
<BR>
Publication Date: 01/01/96
</FONT></CENTER>
<P>


<!-- Empty Reference Subhead -->

<!--ISBN=0471128457//-->
<!--TITLE=APPLIED CRYPTOGRAPHY, SECOND EDITION: Protocols, Algorithms, and Source Code in C//-->
<!--AUTHOR=Bruce Schneier//-->
<!--PUBLISHER=Wiley Computer Publishing//-->
<!--CHAPTER=16//-->
<!--PAGES=377-380//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->

<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="16-03.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="16-05.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P>The code is a little more complicated when the shift register is longer than the computer&#146;s word size, but not significantly so.
</P>
<P>Note that all of these listings have an odd number of coefficients. I have provided such a large table because LFSRs are often used for stream-cipher cryptography and I wanted many examples so that different people would pick different primitive polynomials. Since, if <I>p</I>(<I>x</I>) is primitive, then so is <I>x<SUP>n</SUP>p</I>(1/<I>x</I>); each entry on the table is actually two primitive polynomials.</P>
<P>For example, if (<I>a, b</I>, 0) is primitive, then (<I>a, a</I> - <I>b</I>, 0) is also primitive. If (<I>a, b, c, d</I>, 0) is primitive, then (<I>a, a</I> - <I>d, a</I> - <I>c, a</I> - <I>b</I>, 0) is also primitive. Mathematically:</P>
<DL>
<DD>if <I>x<SUP>a</I></SUP> &#43; <I>x<SUP>b</I></SUP> &#43; 1 is primitive, so is <I>x<SUP>a</I></SUP> &#43; <I>x<SUP>a-b</I></SUP> &#43; 1
<DD>if <I>x<SUP>a</I></SUP> &#43; <I>x<SUP>b</I></SUP> &#43; <I>x<SUP>c</I></SUP> &#43; <I>x<SUP>d</I></SUP> &#43; 1 is primitive, so is <I>x<SUP>a</I></SUP> &#43; <I>x<SUP>a-d</I></SUP> &#43; <I>x<SUP>a-c</I></SUP> &#43; <I>x<SUP>a-b</I></SUP> &#43; 1
</DL>
<P>Primitive trinomials are fastest in software, because only two bits of the shift register have to be XORed to generate each new bit. Actually, all the feedback polynomials listed in Table 16.2 are <B>sparse</B>, meaning that they only have a few coefficients. Sparseness is always a source of weakness, sometimes enough to break the algorithm. It is far better to use <B>dense</B> primitive polynomials, those with a lot of coefficients, for cryptographic applications. If you use dense polynomials, and especially if you make them part of the key, you can live with much shorter LFSRs.</P>
<P>Generating dense primitive polynomials modulo 2 is not easy. In general, to generate primitive polynomials of degree <I>k</I> you need to know the factorization of 2<SUP>k</SUP> - 1. Three good references for finding primitive polynomials are [652,1285,1287].</P>
<P>LFSRs are competent pseudo-random-sequence generators all by themselves, but they have some annoying nonrandom properties. Sequential bits are linear, which makes them useless for encryption. For an LFSR of length <I>n</I>, the internal state is the next <I>n</I> output bits of the generator. Even if the feedback scheme is unknown, it can be determined from only 2<I>n</I> output bits of the generator, by using the highly efficient Berlekamp-Massey algorithm [1082,1083]: see Section 16.3.</P>
<P>Also, large random numbers generated from sequential bits of this sequence are highly correlated and, for certain types of applications, not very random at all. Even so, LFSRs are often used as building blocks in encryption algorithms.</P>
<P><FONT SIZE="+1"><B><I>LFSRs in Software</I></B></FONT></P>
<P>LFSRs are slow in software, but they&#146;re faster in assembly language than in C. One solution is to run 16 LFSRs (or 32, depending on your computer&#146;s word size) in parallel. This scheme uses an array of words that is the length of the LFSR, with each bit position in the words representing a different LFSR. Assuming all the feedback polynomials are the same, this can run pretty quickly. In general, the best way to update shift registers is to multiply the current state by suitable binary matrices [901].
</P>
<P>It is also possible to modify the LFSR&#146;s feedback scheme. The resultant generator is no better cryptographically, but it still has a maximal period and is easy to implement in software [1272]. Instead of using the bits in the tap sequence to generate the new left-most bit, each bit in the tap sequence is XORed with the output of the generator and replaced; then the output of the generator becomes the new left-most bit (see Figure 16.5). This is sometimes called a <B>Galois configuration</B>.</P>
<P>In C, this looks like:</P>
<!-- CODE //-->
<PRE>
#define mask 0&#215;80000057

static unsigned long ShiftRegister=1;
void seed_LFSR (unsigned long seed)
{
     if (seed == 0) /* avoid calamity */
          seed = 1;
     ShiftRegister = seed;
}

int modified_LFSR (void)
{
     if (ShiftRegister &amp 0&#215;00000001) {
          ShiftRegister = ((ShiftRegister ^ mask &gt&gt 1) |
     0&#215;8000000;
          return 1;
     } else {
          ShiftRegister &gt&gt= 1;
          return 0;
     }
}
</PRE>
<!-- END CODE //-->
<I><P><A NAME="Fig5"></A><A HREF="javascript:displayWindow('images/16-05.jpg',292,68 )"><IMG SRC="images/16-05t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/16-05.jpg',292,68)"><FONT COLOR="#000077"><B>Figure 16.5</B></FONT></A>&nbsp;&nbsp;Galois LFSR.</I>
</P>
<P>The savings here is that all the XORs can be done as a single operation. This can also be parallelized, and the different feedback polynomials can be different. The Galois configuration can also be faster in hardware, especially in custom VLSI implementations. In general, if you are using hardware that is good at shifts, use a Fibonacci configuration; if you can exploit parallelism, use a Galois configuration.
</P>
<H3><A NAME="Heading4"></A><FONT COLOR="#000077">16.3 Design and Analysis of Stream Ciphers</FONT></H3>
<P>Most practical stream-cipher designs center around LFSRs. In the early days of electronics, they were very easy to build. A shift register is nothing more than an array of bit memories and the feedback sequence is just a series of XOR gates. Even in VLSI circuitry, a LFSR-based stream cipher can give you a lot of security with only a few logic gates.
</P>
<P>The problem with LFSRs is that they are very inefficient in software. You want to avoid sparse feedback polynomials&#151;they facilitate correlation attacks [1051,1090,350]&#151;and dense feedback polynomials are inefficient. Any stream cipher outputs a bit at a time; you have to iterate the algorithm 64 times to encrypt what a single iteration of DES can encrypt. In fact, a simple LFSR algorithm like the shrinking generator described later is no faster in software than DES.</P>
<P>This branch of cryptography is fast-paced and very politically charged. Most designs are secret; a majority of military encryptions systems in use today are based on LFSRs. In fact, most Cray computers (Cray 1, Cray X-MP, Cray Y-MP) have a rather curious instruction generally known as &#147;population count.&#148; It counts the 1 bits in a register and can be used both to efficiently calculate the Hamming distance between two binary words and to implement a vectorized version of a LFSR. I&#146;ve heard this called the canonical NSA instruction, demanded by almost all computer contracts.</P>
<P>On the other hand, an astonishingly large number of seemingly complex shift-register-based generators have been cracked. And certainly military cryptanalysis institutions such as the NSA have cracked a lot more. Sometimes it&#146;s amazing to see the simple ones proposed again and again.</P>
<P><FONT SIZE="+1"><B><I>Linear Complexity</I></B></FONT></P>
<P>Analyzing stream ciphers is often easier than analyzing block ciphers. For example, one important metric used to analyze LFSR-based generators is <B>linear complexity</B>, or linear span. This is defined as the length, <I>n</I>, of the shortest LFSR that can mimic the generator output. Any sequence generated by a finite-state machine over a finite field has a finite linear complexity [1006]. Linear complexity is important because a simple algorithm, called the <B>Berlekamp-Massey</B> algorithm, can generate this LFSR after examining only 2<I>n</I> bits of the keystream [1005]. Once you&#146;ve generated this LFSR, you&#146;ve broken the stream cipher.</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="16-03.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="16-05.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>

[an error occurred while processing this directive]
</body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本精品一级二级| 欧美无砖砖区免费| 午夜精品一区二区三区免费视频| 欧美裸体一区二区三区| 成人小视频免费在线观看| 日韩制服丝袜先锋影音| 国产精品的网站| 欧美变态tickle挠乳网站| 91香蕉视频黄| 国产精品69久久久久水密桃| 午夜av区久久| 樱桃视频在线观看一区| 国产亚洲一区字幕| 欧美一区二区福利在线| 欧洲中文字幕精品| 99精品视频在线播放观看| 久久99久久久欧美国产| 亚洲国产美国国产综合一区二区| 欧美激情在线一区二区| 欧美一级一区二区| 欧美色精品在线视频| 菠萝蜜视频在线观看一区| 国内精品久久久久影院薰衣草| 亚洲第一电影网| 亚洲精品国产一区二区精华液 | 三级久久三级久久| 亚洲人精品午夜| 国产精品网站在线| 国产日韩欧美a| 国产日韩欧美激情| 中文乱码免费一区二区| 久久精品亚洲乱码伦伦中文| 日韩欧美成人一区二区| 555夜色666亚洲国产免| 欧美日韩久久不卡| 欧美色窝79yyyycom| 欧美性三三影院| 欧美三区免费完整视频在线观看| 色哟哟一区二区在线观看| gogogo免费视频观看亚洲一| 国产99一区视频免费| 国产成人三级在线观看| 国产综合一区二区| 国产伦精品一区二区三区在线观看 | 国产乱人伦精品一区二区在线观看| 天堂蜜桃91精品| 日日骚欧美日韩| 日本欧美久久久久免费播放网| 丝袜脚交一区二区| 日本成人中文字幕| 精品夜夜嗨av一区二区三区| 麻豆国产一区二区| 国产精品一二三四五| 国产suv精品一区二区三区 | 精品视频一区二区三区免费| 欧美在线999| 9191国产精品| 欧美电影免费观看高清完整版在线观看| 日韩网站在线看片你懂的| 欧美videos中文字幕| 久久精品一区四区| 国产精品国产a| 亚洲一区二区三区四区在线免费观看 | 亚洲乱码日产精品bd| 亚洲成人动漫在线免费观看| 日本vs亚洲vs韩国一区三区| 狠狠色综合日日| av不卡免费电影| 欧美日韩国产在线观看| 精品捆绑美女sm三区| 午夜视频久久久久久| 久久久久高清精品| 日韩欧美一级二级三级| 日韩欧美专区在线| 国产人成一区二区三区影院| 亚洲天堂av一区| 亚洲成人黄色小说| 国产成人精品亚洲午夜麻豆| 欧美在线观看视频一区二区| 久久影院电视剧免费观看| 亚洲欧美日韩综合aⅴ视频| 久久一区二区视频| 亚洲成va人在线观看| 91免费观看视频| 中文乱码免费一区二区| 国产在线日韩欧美| 日韩亚洲欧美在线观看| 亚欧色一区w666天堂| 色94色欧美sute亚洲线路二| 国产精品久久久99| 国产成人免费视频网站高清观看视频 | 欧美三级中文字| 亚洲乱码国产乱码精品精小说| 不卡的av中国片| 国产精品嫩草99a| 国产91在线观看丝袜| 久久久久久久综合色一本| 久久99精品国产.久久久久| 欧美精品tushy高清| 天天免费综合色| 欧美日韩情趣电影| 丝袜亚洲另类欧美| 91精品国产乱码| 免费在线观看视频一区| 91精品国产综合久久小美女| 日韩二区三区四区| 91麻豆精品国产91久久久使用方法| 亚洲与欧洲av电影| 精品视频999| 亚洲国产精品久久人人爱| 欧美色视频一区| 五月天精品一区二区三区| 制服丝袜在线91| 麻豆国产91在线播放| 欧美成人女星排名| 国产中文字幕精品| 国产精品久久久久久久午夜片| av影院午夜一区| 亚洲美女一区二区三区| 欧美日韩国产美| 久久精品国产精品亚洲精品| 精品国产乱码久久| 国产成人鲁色资源国产91色综| 国产精品欧美一区二区三区| 色激情天天射综合网| 亚洲chinese男男1069| 欧美一级在线观看| 国产成人啪免费观看软件| 亚洲欧美一区二区三区久本道91| 色悠悠久久综合| 青娱乐精品视频| 国产亚洲福利社区一区| 91啪亚洲精品| 偷拍一区二区三区四区| 26uuu久久综合| 99re8在线精品视频免费播放| 亚洲一区二区三区三| 日韩一级在线观看| 国产精品一区二区果冻传媒| 亚洲欧美电影院| 日韩一区和二区| 成人免费视频一区二区| 亚洲成年人影院| 国产日产欧美一区二区视频| 在线欧美日韩精品| 精品一区二区影视| 成人欧美一区二区三区1314| 欧美日韩mp4| 成人综合在线观看| 亚洲电影在线免费观看| xnxx国产精品| 色婷婷一区二区| 久久精品国产久精国产爱| 亚洲欧美二区三区| 欧美精品一区二区三区视频 | 中文字幕一区二区日韩精品绯色| 欧美亚洲综合色| 国产精品自拍毛片| 亚洲国产日韩在线一区模特| 久久女同性恋中文字幕| 欧美吻胸吃奶大尺度电影| 国产一区二区三区在线观看免费视频 | 精品国产免费久久 | 欧美国产激情一区二区三区蜜月| 日本道色综合久久| 粉嫩蜜臀av国产精品网站| 日韩精品久久理论片| 综合久久国产九一剧情麻豆| 精品日产卡一卡二卡麻豆| 色视频一区二区| 成人av影视在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 综合亚洲深深色噜噜狠狠网站| 精品电影一区二区三区 | 国产精品视频看| 欧美成人精精品一区二区频| 在线观看精品一区| eeuss影院一区二区三区| 精品一区二区久久| 韩国视频一区二区| 亚洲电影欧美电影有声小说| 国产精品久久久久影院色老大| 精品三级在线看| 欧美丰满高潮xxxx喷水动漫| 在线国产亚洲欧美| 97精品超碰一区二区三区| 国产伦精品一区二区三区视频青涩 | 国产原创一区二区三区| 亚洲成人1区2区| 亚洲综合激情网| 亚洲日本在线a| 国产精品高潮久久久久无| 久久久精品2019中文字幕之3| 日韩一级免费观看| 欧美精品1区2区3区| 精品视频在线免费| 欧美午夜精品久久久久久超碰 | 欧美本精品男人aⅴ天堂| 欧美一级精品大片| 777色狠狠一区二区三区|