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

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

?? sqr.asm

?? flint庫 RSA算法
?? ASM
字號:
;******************************************************************************
;*                                                                            *
;* Functions for arithmetic and number theory with large integers in C        *
;* Software supplement to the book "Cryptography in C and C++"                *
;* by Michael Welschenbach                                                    *
;*                                                                            *
;* Module sqr.asm          Revision: 18.12.2000                               *
;*                                                                            *
;*  Copyright (C) 1998-2005 by Michael Welschenbach                           *
;*  Copyright (C) 2001-2005 by Springer-Verlag Berlin, Heidelberg             *
;*  Copyright (C) 2001-2005 by Apress L.P., Berkeley, CA                      *
;*  Copyright (C) 2002-2005 by Wydawnictwa MIKOM, Poland                      *
;*  Copyright (C) 2002-2005 by PHEI, P.R.China                                *
;*  Copyright (C) 2002-2005 by InfoBook, Korea                                *
;*  Copyright (C) 2002-2005 by Triumph Publishing, Russia                     *
;*                                                                            *
;*  All Rights Reserved                                                       *
;*                                                                            *
;*  The software may be used for noncommercial purposes and may be altered,   *
;*  as long as the following conditions are accepted without any              *
;*  qualification:                                                            *
;*                                                                            *
;*  (1) All changes to the sources must be identified in such a way that the  *
;*      changed software cannot be misinterpreted as the original software.   *
;*                                                                            *
;*  (2) The statements of copyright may not be removed or altered.            *
;*                                                                            *
;*  (3) The following DISCLAIMER is accepted:                                 *
;*                                                                            *
;*  DISCLAIMER:                                                               *
;*                                                                            *
;*  There is no warranty for the software contained in this distribution, to  *
;*  the extent permitted by applicable law. The copyright holders provide the *
;*  software `as is' without warranty of any kind, either expressed or        *
;*  implied, including, but not limited to, the implied warranty of fitness   *
;*  for a particular purpose. The entire risk as to the quality and           *
;*  performance of the program is with you.                                   *
;*                                                                            *
;*  In no event unless required by applicable law or agreed to in writing     *
;*  will the copyright holders, or any of the individual authors named in     *
;*  the source files, be liable to you for damages, including any general,    *
;*  special, incidental or consequential damages arising out of any use of    *
;*  the software or out of inability to use the software (including but not   *
;*  limited to any financial losses, loss of data or data being rendered      *
;*  inaccurate or losses sustained by you or by third parties as a result of  *
;*  a failure of the software to operate with any other programs), even if    *
;*  such holder or other party has been advised of the possibility of such    *
;*  damages.                                                                  *
;*                                                                            *
;******************************************************************************
;*                                                                            *
;*      Squaring, interface compatible with C function sqr_l()                *
;*                                                                            *
;*      Q := a * a mod M                                                      *
;*                                                                            *
;*      Stack on calling of sqr:          SP+ 8 ---> Offset q                 *
;*                                        SP+ 4 ---> Offset a                 *
;*                                        SP    ---> Return address           *
;*                                                                            *
;*      Return Value : ax = 0                                                 *
;*                                                                            *
;******************************************************************************
PUBLIC  sqr
.386
.MODEL  FLAT
.CODE
sqr     proc    near
;
a       equ     0                       ; Factor (working memory)
q       equ     520                     ; Square (working memory)
;
_a      equ     [ebp+8]                 ; Factor (parameter)
_q      equ     [ebp+12]                ; Square (parameter)
;
WORKSP  equ     1560                    ; Working memory in stack area
;
square: push    ebp                     ; Store base ptr for caller
        mov     ebp,esp
        sub     esp,WORKSP              ; Local memory
        mov     eax,esp
        push    ebx
        push    edi
        push    esi
        mov     ebx,eax                 ; Store starting address
;
        mov     esi,_a                  ; Offset of variable a
        mov     dx,[esi]                ; Length l(a)
        cmp     dx,0
        jnz     sqr011
        jmp     sqrnul
sqr011:
;
;>>>>>> Load operands
;
sqr02:  lea     edi,a[ebx]              ; Destination offset is a[bx]
        mov     ecx,0
        mov     cx,dx                   ; l(a) into cx
@@:     cld
rep     movsw                           ; Load a in chunks of USHORT into a[bx]
        movsw                           ;  plus one USHORT
        mov     word ptr [edi],0        ;
;
;
;>>>>>> Prepare addressing of local working memory
;
        push    ebp                     ; Store bp
        mov     ebp,ebx                 ; Indexed addressing based on ss
;
;>>>>>> Remove leading zeros from operands
;
        xor     eax,eax
        mov     ax,a[ebp]               ; #USHORTs into ax
        cmp     ax,0
        je      end1
        shl     eax,1                   ; #Bytes, index to high-order digit
        mov     esi,eax
@@:     cmp     word ptr a[ebp][esi],0  ; digit = 0 ?
        jne     @F                      ; If not, then we're done
        sub     esi,2                   ; Else: step back one USHORT
        cmp     esi,0                   ; Index = 0?
        je      mazer1                  ; Then argument = 0
        jmp     @B                      ; Compare next digit
@@:
mazer1: shr     esi,1                   ; #USHORTS
        mov     eax,esi                 ; Store number of digits
        mov     a[ebp],ax

end1:   cmp     ax,0
        jne     sqrmul
        pop     ebp
        jmp     sqrnul
;
;
;>>>>>> Start squaring
;
;----->  Initialize working environment
;
sqrmul: mov     ecx,0
        mov     cx,a[ebp]               ; Get length l(f)
        shr     cx,1
        jnc     @F
        inc     cx
@@:     cmp     cx,1
        jne     _sqr09
        jmp     _xrgsq                  ; If l(f)=1 then squaring in registers
_sqr09: mov     eax,0
        mov     esi,2                   ; Initialization of index i
_sqr10: mov     q[ebp][esi],eax
        add     esi,4
        loop    _sqr10
;
;-----> Outer loop
;
        mov     esi,2                   ; Index i
        mov     ecx,0
        mov     cx,a[ebp]               ; Counter for outer loop
        shr     cx,1
        jc      _sqr11
        dec     cx                      ; in cx = l(a)-1
_sqr11: push    ecx                     ; Store counter
;
;-----> Inner loop
;
        mov     edi,esi                 ; Index j=i+4
        add     edi,4
        xor     ecx,ecx
        mov     cx,a[ebp]               ; Counter for inner loop
        shr     cx,1
        jnc     @F
        inc     cx
@@:     push    esi
        add     esi,2
        shr     esi,2
        sub     ecx,esi
        pop     esi                     ; cx = l(a)-i
        mov     edx,0                   ; Dummy carry
        mov     ebx,a[ebp][esi]         ; Load a[i]
        add     esi,edi                 ; Index i+j to product
_sqr12: push    ecx                     ; Store counter
        mov     ecx,edx                 ; Carry from dx into cx
        mov     eax,ebx
        mul     dword ptr a[ebp][edi]   ; After mul: eax=low, edx=high-order
        add     eax,ecx                 ; ax + u
        adc     edx,0
        add     q[ebp+esi]-2,eax        ; q[i+j-1]= ax + q[i+j-1]
        adc     edx,0                   ; New carry u in dx
        add     edi,4                   ; j=j+4
        add     esi,4                   ; i+j=i+j+4
        pop     ecx                     ; Get counter for inner loop
        loop    _sqr12
;
;-----> End of inner loop
;
        mov     q[ebp+esi]-2,edx        ; q[i+j-1]=u
        sub     esi,edi                 ; Restore index i
        add     esi,4                   ; i=i+4
        pop     ecx                     ; Get counter for outer loop
        loop    _sqr11
;
;-----> End of outer loop
;
        add     esi,edi
        mov     dword ptr q[ebp][esi]-2,0
        mov     dword ptr q[ebp][esi]+2,0
;
;-----> Multiply intermediate result by 2
;
        mov     esi,6                   ; First word is zero
        xor     ecx,ecx
        mov     cx,a[ebp]
_xsll:
        rcl     dword ptr q[ebp][esi],1 ; Shift q in chunks of ULONG
        inc     esi
        inc     esi
        inc     esi
        inc     esi
        loop    _xsll
;
;-----> Add squares to intermediate result q
;
_xsle:  mov     cx,a[ebp]
@@:     shl     cx,1
        mov     q[ebp],cx
        mov     esi,2
        mov     edi,2
        mov     cx,a[ebp]               ; l(a) is counter
        shr     cx,1
        jnc     @F
        inc     cx
@@:     xor     eax,eax
        pushf                           ; Dummy carry
_sqr20: mov     eax,a[ebp][esi]
        mul     eax                     ; ax = lo, dx = hi
        popf
        adc     q[ebp][edi],eax
        adc     q[ebp][edi+4],edx
        pushf
        add     esi,4
        add     edi,8
        loop    _sqr20
        popf                            ; Adjust stack pointer
        jmp     _sqr20a
;
;-----> Squaring in registers in case of l(a) = 1
;
_xrgsq: mov     eax,a[ebp+2]
        mul     eax
        mov     q[ebp+2],eax
        mov     q[ebp+6],edx
        mov     word ptr q[ebp],4
;
;-----> Calculate length of remainder
;
_sqr20a:
        xor     eax,eax
        mov     ax,q[ebp]
        mov     edi,eax
        shl     edi,1
        cmp     word ptr q[ebp][edi],0
        jnz     _sqr60
        dec     word ptr q[ebp]
        jmp     _sqr20a
;
;-----> Store result
;
_sqr60: lea     esi,q[ebp]
        mov     ebx,ebp
        pop     ebp
        mov     edi,_q
        mov     ecx,0
        mov     cx,[esi]
        shr     cx,1
        jnc     @F
        inc     cx
@@:     cmp     cx,0
        je      @F
        cld
rep     movsd
@@:     movsw
;
;*******************************************************************************
;       Security: Purge stack

sqrret: mov     edi,ebx
        mov     ecx,(WORKSP-4)/4
        cld
        mov     eax,0                   ; Return-Value = 0: Everything is OK
rep     stosd                           ; Overwrite with 0
;*******************************************************************************
;
        pop     esi
        pop     edi
        pop     ebx
        mov     esp,ebp
        pop     ebp
        ret
;
sqrnul: mov     esi,_q
        mov     word ptr [esi], 0
        jmp     short sqrret
;
sqr     endp
END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合成人在线| 国产a视频精品免费观看| 精品欧美乱码久久久久久| 伦理电影国产精品| 亚洲最大成人网4388xx| 亚洲丝袜自拍清纯另类| 日韩在线播放一区二区| 一本大道久久精品懂色aⅴ| 欧美aaaaaa午夜精品| 天堂久久一区二区三区| 亚洲v中文字幕| 天天综合日日夜夜精品| 自拍偷拍亚洲综合| 亚洲动漫第一页| 人妖欧美一区二区| 国模冰冰炮一区二区| 国产精品 日产精品 欧美精品| 精品一区二区三区蜜桃| 国产在线乱码一区二区三区| 久久se精品一区精品二区| 久久国产婷婷国产香蕉| 悠悠色在线精品| 亚洲国产欧美日韩另类综合| 午夜精品久久久久久久久久 | 免费黄网站欧美| 激情综合色综合久久综合| 韩国一区二区视频| 99久久婷婷国产| 欧美精品自拍偷拍| 久久精品夜夜夜夜久久| ...xxx性欧美| 国产精品乱子久久久久| 尤物视频一区二区| 国模娜娜一区二区三区| 91久久精品一区二区三| 欧美一区二区三区视频免费| 欧美成人r级一区二区三区| 国产精品麻豆视频| 日韩精品成人一区二区在线| 青娱乐精品在线视频| av电影天堂一区二区在线| 欧美肥妇毛茸茸| 中文字幕一区二区不卡| 亚洲第一在线综合网站| 国产一区二区三区高清播放| 91黄色激情网站| 国产日产欧产精品推荐色| 欧美亚洲综合网| 久久久久久久国产精品影院| 亚洲综合色区另类av| 国产高清不卡一区二区| 欧美日韩不卡一区二区| 国产精品乱码一区二区三区软件| 日韩va欧美va亚洲va久久| 国产精品91xxx| 日韩视频在线一区二区| 亚洲嫩草精品久久| 国产精品自拍在线| 日韩手机在线导航| 亚洲成人免费观看| 91在线免费看| 国产喷白浆一区二区三区| 天天综合网 天天综合色| 91在线精品一区二区三区| 精品99999| 久久精品国产久精国产爱| 在线不卡中文字幕| 伊人性伊人情综合网| www.一区二区| 国产精品免费免费| 国产成人精品亚洲午夜麻豆| 欧美一区二区三区视频在线| 亚洲大片在线观看| 欧美日韩精品一区二区三区| 一区二区三区国产豹纹内裤在线| av在线播放不卡| 综合自拍亚洲综合图不卡区| 成人av电影在线观看| 国产欧美日韩中文久久| 国产成人在线看| 国产精品久久久久久久久果冻传媒| 国产伦精品一区二区三区免费迷| 欧美成人一区二区三区| 视频一区二区三区在线| 欧美日高清视频| 韩国在线一区二区| 日韩一区二区免费视频| 日韩av电影一区| 久久久久久久久久久电影| 国产成人精品免费网站| 成人欧美一区二区三区黑人麻豆| 99久久精品国产一区二区三区| 亚洲色图制服丝袜| 欧美日韩一二区| 久久av中文字幕片| 国产日韩精品一区二区浪潮av| 91在线观看视频| 天天综合天天综合色| 久久日一线二线三线suv| 不卡的av在线| 亚洲成人综合视频| 亚洲婷婷在线视频| 6080yy午夜一二三区久久| 美女视频一区二区三区| 国产精品亚洲一区二区三区在线 | 奇米精品一区二区三区在线观看一| 国产精品综合在线视频| 久久久国产一区二区三区四区小说 | 一本大道久久a久久综合| 欧美韩日一区二区三区| 色噜噜狠狠成人网p站| 欧美成人精品1314www| 午夜一区二区三区在线观看| 精品福利在线导航| 国产精品一区在线| 午夜日韩在线电影| 欧美美女喷水视频| 中文字幕一区在线观看| 欧美四级电影网| 五月激情综合色| 国产精品剧情在线亚洲| 波多野结衣精品在线| 精品国产乱码久久久久久老虎| 国产乱码精品一区二区三区忘忧草 | 国产综合色视频| 久久久www成人免费无遮挡大片| av色综合久久天堂av综合| 中文字幕在线不卡一区| 国产激情一区二区三区四区| 精品污污网站免费看| 国产精品美女久久久久aⅴ| 亚洲女与黑人做爰| 国产成人av一区二区三区在线 | 精品免费99久久| 成人免费视频caoporn| 国产精品久久久久影视| 日韩一区二区免费高清| 国产成人自拍网| 午夜久久久久久久久| 国产乱理伦片在线观看夜一区| 欧美丝袜丝交足nylons| 麻豆精品国产传媒mv男同| 国产亚洲午夜高清国产拍精品 | 国产91精品在线观看| 日韩精品乱码av一区二区| 欧美日本一区二区在线观看| 天使萌一区二区三区免费观看| 成人免费高清视频在线观看| 亚洲特级片在线| 久久午夜色播影院免费高清| 国产精品成人一区二区艾草| 91精品福利在线一区二区三区 | 在线观看日韩av先锋影音电影院| 成人性生交大片免费看中文| 亚洲国产美国国产综合一区二区| 亚洲综合成人在线视频| 欧美午夜宅男影院| 不卡欧美aaaaa| 高清shemale亚洲人妖| 欧美午夜不卡在线观看免费| 91福利视频久久久久| 麻豆成人免费电影| 久久国产剧场电影| 久久久www成人免费毛片麻豆| 亚洲伦理在线精品| 久久久亚洲高清| 91 com成人网| 国产网站一区二区三区| 91麻豆精品国产自产在线| 综合久久国产九一剧情麻豆| 国产精品第四页| 欧美日韩国产在线观看| 中文字幕亚洲电影| 欧美性生活影院| 中文字幕成人网| 亚洲小说欧美激情另类| 国产精品成人午夜| 欧美一卡2卡三卡4卡5免费| 精品亚洲porn| 在线播放视频一区| 一区二区三区精密机械公司| 丁香网亚洲国际| 日本久久一区二区三区| 日韩制服丝袜先锋影音| 1024精品合集| 成人欧美一区二区三区白人| 欧美日韩一二三区| 国产农村妇女毛片精品久久麻豆 | 成人国产精品视频| 色www精品视频在线观看| 国产精品夜夜嗨| 乱一区二区av| 91激情五月电影| 欧美色窝79yyyycom| 欧美系列日韩一区| 日韩一区二区免费高清| 99v久久综合狠狠综合久久| 豆国产96在线|亚洲| 国精品**一区二区三区在线蜜桃| 国产成人自拍高清视频在线免费播放|