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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ideafast.txt

?? 加密解密算法的資料 加密解密算法的資料 加密解密算法的資料
?? TXT
字號(hào):
From: olson@umbc.edu (Bryan G. Olson)Newsgroups: sci.cryptSubject: A Quick IDEA, was: Speed of DES/IDEA implementationsDate: 7 Dec 1993 21:49:41 -0500A while ago I posted a message claiming a speed of 238,000bytes/sec for an implementation of IDEA on a 33Mh 486.  Below isan explanation and some code to show how it works.  The basictrick should be useful on many (but not all) processors.  Iexpect only those familiar with IDEA and its referenceimplementation will be able to follow the discussion.  See:Lai, Xueja and Massey, James L.  A Proposal for a New BlockEncryption Standard, Eurocrypt 90For those who have been asking for the code, sorry I keptputting it off.  I wanted to get it out of Turbo Pascalideal-mode, but I never had the time.Colin Plum wrote IDEA-386 code which is included in PGP2.3a and uses the same tricks.  I don't know who's isfaster, but I expect they will be very close.  Nowhere's how it's done.A major bottleneck in software IDEA is the mul() routine, whichis used 34 times per 64 bit block.  The routine performsmultiplication in the multiplicative group mod 2^16+1.  The twofactors are each in a 16 bit word, and the output is also in a 16bit word.  Note that 0 is not a member of the multiplicativegroup and 2^16 does not fit in 16 bits. We therefor use the 0word to represent 2^16.  Now group elements map one to one ontoall possible 16 bit words, since 2^16+1 is prime.Here is (essentially) the reference implementation from [Lai].unsigned mul( unsigned a, unsigned b ) {  long int p ;  long unsigned q ;    if( a==0 ) p= 0x00010001 - b ;    else if( b==0 ) p= 0x00010001 - a ;    else {        q= a*b;        p= (q & 0xffff) - (q>>16)        if( p<0 ) p= p + 0x00010001 ;      }    return (unsigned)(p & 0xffff) ;}Note the method of reducing a 32 bit word modulo 2^16-1.  Wesubtract the high word from the low word, and add the modulusback if the result is less than 0.  [Lai] contains a proof thatthis works, and you can convince yourself fairly easily.To speed up this routine, we note that the tests for a=0 and b=0will rarely be false.  With the possible exception of the first 2of the 34 multiplications, 0 should be no more likely than any ofthe other 65535 numbers.  Note that if (and only if) either a orb is 0 then q will also be 0, and we can check for this in oneinstruction if our processor sets a zero flag for multiplication(as the 68000 does but 80x86 does not).  Fortunately p will also be zero after the subtraction if and onlyif either a or b is 0.  Proof: r will be zero when the high orderword of q equals the low order word, and that happens when q isdivisible by 00010001 hex.  Since 00010001h = 2^16+1 is prime,this happens if either a or b is a multiple of 2^16+1, and 0 isthe only such multiple which will fit in a 16 bit word.The speed-up strategy is to proceed under the assumption that aand b are not 0, check to be sure in one instruction, andrecompute if the assumption was wrong.  Here's some 8086assembler code:    mov  ax, [a]    mul  [b]        ; ax is implied. q is now in DX AX    sub  ax, dx     ; mod 2^16+1     jnz  not0       ; Jump if neither op was 0. Usually taken.    mov  ax, 1      ; recompute result knowing one op is 0.    sub  ax, [a]    sub  ax, [b]    jmp  out        ; Just jump over adding the carry.not0:    adc  ax, 0      ; If r<0 add 1, otherwise do nothing.out:                ; Result is now in axNote that when r<0 we add 1 instead of 2^16+1 since the 2^16 partoverflows out of the result.  The "adc  ax, 0" does all the workof checking for a negative result and adding the modulus ifneeded.The multiplication takes 9 instructions, 4 of which are rarelyexecuted.  I believe similar tricks are possible on manyprocessors.  The one drawback to the check-after-multiply tacticis that we can't let the multiply overwrite the only copy of anoperand.Note that most software implementations of IDEA will run atslightly different speeds when 0's come up in the multiplyroutine.  The reference implementation is faster on 0, this oneis faster on non-zero.  This may be a problem for some real-timestuff, and also suggests an attack based on timing.Finally, below is an implementation of the complete encryptionfunction in 8086 assembler, to replace the cipher_idea() functionin PGP.  It takes the same parameters as the function from PGP,and uses the c language calling conventions.  I tested it usingthe debug features of the idea.c file in PGP.  You will need toadd segment/assume directives.  This version uses no global dataand should be reentrant.The handling of zero multipliers is outside the inner loop sothat a short conditional jump can loop back to the beginning. Forward conditional jumps are usually not taken and backwardjumps are usually taken, which is consistent with 586 branchprediction (or so I've heard).  Stalls where the output of oneinstruction is needed for the next seem unavoidable.Last I heard, IDEA was patent pending.  My code is up for grabs,although I would get a kick out being credited if you use it.On the other hand Colin's code is already tested and readyto assemble and link with PGP.--Bryan____________________CODE STARTS BELOW THIS LINE_________;  Called as: asmcrypt( inbuff, outbuff, zkey ) just like PGPPROC    _asmcrypt        ; establish parameter and local space on stack        ; follow c language calling conventions        ARG  inblock:Word, outblock:Word, zkey:Word        LOCAL sx1:Word,sx4:Word,skk:Word,done8:Word =stacksize        push bp        mov  bp, sp        sub  sp, stacksize ;      push ax     ; My compiler assumes these are not saved. ;      push bx ;      push cx ;      push dx        push si        push di; Put the 16 bit sub-blocks in registers and/or local variables        mov  si, [inblock]        mov  ax, [si]        mov  [sx1], ax       ; x1  is in ax and sx1        mov  di, [si+2]      ; x2  is in di        mov  bx, [si+4]      ; x3  is in bx        mov  dx, [si+6]        mov  [sx4], dx       ; x4  is in sx4        mov  si, [zkey]      ; si points to next subkey        mov  [done8], si        add  [done8], 96     ; we will be finished with 8 rounds                             ; when si=done8@@loop:                      ; 8 rounds of this        add  di, [si+2]      ; x2+=zkey[2]  is in di        add  bx, [si+4]      ; x3+=zkey[4]  is in bx        mul  [Word si]       ;x1 *= zkey[0]        sub  ax, dx        jz  @@x1             ; if 0, use special case multiply        adc  ax, 0@@x1out:        mov  [sx1], ax       ; x1 is in ax and sx1        xor  ax, bx          ; ax= x1^x3        mul  [Word si+8]     ; compute kk        sub  ax, dx          ; if 0, use special case multiply        jz  @@kk        adc  ax, 0@@kkout:        mov  cx, ax          ; kk is in cx        mov  ax, [sx4]       ; x4 *= zkey[6]        mul  [Word si+6]        sub  ax, dx        jz   @@x4            ; if 0, use special case multiply        adc  ax, 0@@x4out:        mov  [sx4], ax       ; x4 is in sx4 and ax        xor  ax, di          ; x4^x2        add  ax, cx          ; kk+(x2^x4)        mul  [Word si+10]    ; compute t1        sub  ax, dx        jz  @@t1             ; if 0, use special case multiply        adc  ax, 0@@t1out:                     ; t1 is in ax        add  cx, ax          ; t2 is in cx   kk+t1        xor  [sx4], cx       ; x4 in sx4        xor  di, cx          ; new x3 in di        xor  bx, ax          ; new x2 in bx        xchg bx, di          ; x2 in di, x3 in bx        xor  ax, [sx1]       ; x1 in ax        mov  [sx1], ax       ; and [sx1]        add  si, 12          ; point to next subkey        cmp  si, [done8]        jne  @@loop        jmp  @@out8;------------------------------------------; Special case multiplications, when one factor is 0@@x1:   mov  ax, 1        sub  ax, [sx1]        sub  ax, [Word si]        jmp  @@x1out@@kk:   mov  ax, [sx1]       ; rebuild overwritten operand        xor  ax, bx        neg  ax        inc  ax        sub  ax, [si+8]        jmp  @@kkout@@x4:   mov  ax, 1        sub  ax, [sx4]        sub  ax, [Word si+6]        jmp  @@x4out@@t1:   mov  ax, [sx4]       ; rebuild        xor  ax, di        add  ax, cx        neg  ax        inc  ax        sub  ax, [si+10]        jmp  @@t1out;---------------------------------------------------;   8 rounds are done, now that extra pseudo-round@@out8:        push di        mov  di, [outblock]        mul  [Word si]        sub  ax, dx        jnz  @@o1n           ; jump over special case code        mov  ax, 1        sub  ax, [sx1]        sub  ax, [si]        jmp  @@o1out@@o1n:  adc  ax, 0@@o1out:  mov [di], ax       ; final ciphertext block 1        mov  ax, [sx4]        mul  [Word si+6]        sub  ax, dx        jnz  @@o4n           ; jump over special case code        mov  ax, 1        sub  ax, [sx4]        sub  ax, [si+6]        jmp  @@o4out@@o4n:  adc  ax, 0@@o4out: mov  [di+6], ax     ; final ciphertext block 4        add  bx, [si+2]        mov  [di+2], bx      ; final ciphertext block 2        pop  ax        add  ax, [si+4]        mov  [di+4], ax      ; final ciphertext block 3;  Restore the stack and return        pop  di        pop  si;       pop  dx;       pop  cx;       pop  bx;       pop  ax        mov  sp, bp        pop  bp        retENDP    _asmcrypt

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线观看视频 | 日韩丝袜美女视频| 日韩女优制服丝袜电影| 综合电影一区二区三区 | 亚洲同性gay激情无套| 日本不卡一区二区三区高清视频| 高清在线成人网| 在线观看视频欧美| 国产精品久久久久久久蜜臀| 日韩1区2区3区| 在线观看视频一区| 亚洲欧洲一区二区三区| 国产一区免费电影| 欧美电影在哪看比较好| 一区二区三区丝袜| 丁香婷婷综合色啪| 久久久久综合网| 日韩av电影免费观看高清完整版| 91麻豆国产福利在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲成人资源网| 91蜜桃在线免费视频| 国产精品久久久久精k8| 国产高清不卡二三区| 日韩免费成人网| 日产欧产美韩系列久久99| 欧美性受xxxx黑人xyx| 最新不卡av在线| 99久久精品国产观看| 中文字幕乱码亚洲精品一区| 国产精品1024| 国产人伦精品一区二区| 国产99久久久国产精品潘金网站| 久久免费视频色| 激情综合色综合久久| 欧美电影免费观看高清完整版在线观看 | 亚洲精品一区二区三区99| 亚洲国产精品尤物yw在线观看| 91麻豆swag| 亚洲影视资源网| 欧美亚洲一区二区在线观看| 亚洲一二三四区不卡| 欧美在线999| 婷婷夜色潮精品综合在线| 欧美日产国产精品| 美女尤物国产一区| 国产亚洲精品精华液| 成人动漫精品一区二区| 亚洲激情一二三区| 欧美日韩aaa| 久久成人18免费观看| 久久久高清一区二区三区| 国产成人精品免费视频网站| 成人欧美一区二区三区视频网页| 91理论电影在线观看| 亚洲午夜激情网页| 欧美一区二区视频在线观看2020| 久久精品国产亚洲5555| 国产性色一区二区| 91精品福利视频| 亚洲国产成人av好男人在线观看| 日韩一区二区在线看| 丁香六月综合激情| 一区二区三区欧美日韩| 91精品一区二区三区在线观看| 精彩视频一区二区三区| 国产精品夫妻自拍| 9191久久久久久久久久久| 国产在线不卡一卡二卡三卡四卡| 欧美国产精品专区| 欧美性欧美巨大黑白大战| 久久99久久99精品免视看婷婷| 国产精品看片你懂得| 在线电影欧美成精品| 久久成人免费网| 曰韩精品一区二区| 2023国产一二三区日本精品2022| 成人美女视频在线看| 视频一区视频二区中文| 欧美国产乱子伦| 日韩一区二区麻豆国产| av亚洲产国偷v产偷v自拍| 日韩国产欧美在线视频| 亚洲欧洲精品一区二区三区不卡| 日韩一区二区三区在线视频| 91美女片黄在线| 国产99久久久国产精品潘金 | 蜜臀av性久久久久av蜜臀妖精| 国产精品色婷婷久久58| 91麻豆精品国产91久久久资源速度| 岛国精品在线播放| 韩国av一区二区| 日韩精品成人一区二区三区| 亚洲日本va午夜在线电影| 久久综合999| 欧美一级精品在线| 欧美日韩久久久久久| 91亚洲国产成人精品一区二区三| 韩日欧美一区二区三区| 日韩精品一二区| 亚洲高清免费一级二级三级| 1024成人网色www| 亚洲国产精品成人综合 | 91成人在线精品| 成人av午夜电影| 国产乱理伦片在线观看夜一区| 日韩精品乱码av一区二区| 亚洲高清一区二区三区| 夜夜精品视频一区二区| 一区二区在线电影| 中文字幕日韩av资源站| 中文字幕av一区二区三区免费看| 2023国产精华国产精品| 日韩欧美精品在线| 欧美岛国在线观看| 精品国产91亚洲一区二区三区婷婷 | 久久99国产精品麻豆| 秋霞电影网一区二区| 日韩在线观看一区二区| 首页国产丝袜综合| 日日夜夜精品视频天天综合网| 偷拍日韩校园综合在线| 日本在线观看不卡视频| 日韩中文字幕亚洲一区二区va在线| 亚洲成人精品一区| 首页国产丝袜综合| 狠狠色丁香久久婷婷综| 国产成人精品亚洲午夜麻豆| 成人av免费网站| 日本精品一级二级| 欧美无人高清视频在线观看| 欧美另类变人与禽xxxxx| 91精品国产黑色紧身裤美女| 精品伦理精品一区| 亚洲国产精品av| 一区二区三区中文字幕电影 | 欧美午夜精品电影| 91精品国产一区二区人妖| 日韩精品中文字幕一区| 国产清纯在线一区二区www| 综合久久久久久| 日韩电影免费在线| 国产91精品露脸国语对白| 99精品久久99久久久久| 精品视频1区2区| 久久亚洲精精品中文字幕早川悠里| 久久九九久久九九| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲线精品一区二区三区| 美女一区二区视频| 成人app在线观看| 欧美喷水一区二区| 国产日产欧美精品一区二区三区| 亚洲欧美视频在线观看| 日本aⅴ免费视频一区二区三区 | 欧美精品一区二区三| 中文字幕一区二区三区精华液| 亚洲一区二区成人在线观看| 精品一区二区三区免费毛片爱| 91首页免费视频| 日韩精品中文字幕在线不卡尤物 | 国产精品18久久久久久久久久久久 | 欧美三日本三级三级在线播放| 精品国产凹凸成av人网站| 亚洲欧洲中文日韩久久av乱码| 麻豆免费看一区二区三区| 91片在线免费观看| 久久综合九色综合久久久精品综合| 亚洲久草在线视频| 国产成人精品影院| 日韩一区二区在线免费观看| 樱花草国产18久久久久| 国产一区二区三区不卡在线观看| 欧美三级电影网| 亚洲欧洲精品天堂一级| 开心九九激情九九欧美日韩精美视频电影 | 日本一道高清亚洲日美韩| av中文字幕亚洲| 国产午夜精品一区二区三区视频| 日本最新不卡在线| 欧美男女性生活在线直播观看| 国产精品久久久久久久浪潮网站| 日本不卡视频一二三区| 在线看一区二区| 亚洲免费在线视频| 99久久精品免费看国产| 中文字幕欧美国产| 粗大黑人巨茎大战欧美成人| 精品国产一区二区精华| 日韩成人精品在线| 欧美日韩免费高清一区色橹橹 | 亚洲人精品午夜| 国产成人av电影在线| 精品国产sm最大网站免费看| 蜜臀久久久久久久| 欧美精品自拍偷拍| 日韩av电影天堂| 日韩精品一区二区三区swag| 久久精品国产精品亚洲红杏| 欧美一区二区三区视频免费播放 |