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

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

?? div.asm

?? flint庫 RSA算法
?? ASM
?? 第 1 頁 / 共 2 頁
字號:
;******************************************************************************
;*                                                                            *
;* 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 div.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.                                                                  *
;*                                                                            *
;******************************************************************************
;*                                                                            *
;*      Division, interface compatible with C-function div_l()                *
;*                                                                            *
;*      Quotient := Dividend div Divisor                                      *
;*      Remainder := Dividend mod Divisor                                     *
;*                                                                            *
;*      Stack on calling of div_l:        SP+16 ---> Offset remainder         *
;*                                        SP+12 ---> Offset quotient          *
;*                                        SP+ 8 ---> Offset divisor           *
;*                                        SP+ 4 ---> Offset dividend          *
;*                                        SP    ---> Return address           *
;*                                                                            *
;*      Return Value: ax = -1 if divisor = 0                                  *
;*                    ax =  0 else                                            *
;*                                                                            *
;******************************************************************************
PUBLIC div_l
.386
.MODEL FLAT
.CODE
div_l  proc near
;
a       equ     0                       ; Dividend (working copy)
b       equ     1030                    ; Divisor  (working copy)
q       equ     1546                    ; Quotient qhat (working memory)
q1      equ     2566                    ; High-order digit of divisor (normalized)
v1      equ     2570                    ; 2nd digit of divisor (normalized)
v2      equ     2574                    ; Exponent for normalization
d       equ     2578                    ; uj+1 (normalized)
uj1     equ     2582                    ; uj+2 (normalized)
uj2     equ     2586
;
_dvd    equ     [ebp+8]                 ; Dividend  (parameter)
_dvs    equ     [ebp+12]                ; Divisor   (parameter)
_qot    equ     [ebp+16]                ; Quotient  (parameter)
_rst    equ     [ebp+20]                ; Remainder (parameter)
;
WORKSP  equ     2600                    ; Working memory in stack area
;
divs:   push    ebp                     ; Store value for calling procedure
        mov     ebp,esp
        sub     esp,WORKSP              ; Local memory
        mov     eax,esp
        push    ebx
        push    edi
        push    esi
        mov     ebx,eax                 ; Store start address of local memory
;
        mov     esi,_dvd                ; Offset of variable a
        mov     edi,_dvs                ; Offset of variable b
        mov     ax,[esi]                ; length(a)
        mov     dx,[edi]                ; length(b)
        cmp     dx,0                    ; b = 0 ?
        jne     @F
        jmp     divbyz                  ; Division by zero!
;
;>>>>>> Load Operands
;
@@:     push    edi                     ; Store Seg:Offs b
        lea     edi,a[ebx]              ; destination offset is a[bx]
        xor     ecx,ecx
        mov     cx,ax                   ; l(a) in cx
        shr     cx,1
        jnc     @F
        inc     cx
@@:     cld
rep     movsd                           ; Load a as ULONG
        movsw                           ;  plus one USHORT
        mov     cx,ax
        shl     cx,1
        lea     edi,a[ebx+ecx+2]
        mov     word ptr [edi],0
;
        pop     esi                     ; Get Seg:Offs of b
        lea     edi,b[ebx]              ; Destination offset is b[bx]
        xor     ecx,ecx
        mov     cx,dx                   ; l(b) in cx
        shr     cx,1
        jnc     @F
        inc     cx
@@:     cld
rep     movsd                           ; Load b as ULONG
        movsw                           ;  plus one USHORT
        mov     cx,dx
        shl     cx,1
        lea     edi,b[ebx+ecx+2]
        mov     word ptr [edi],0
;
;>>>>>> Prepare access to local memory
;
        push    ebp                     ; Save bp
        mov     ebp,ebx                 ; Indexed addressing based on ss
;
;>>>>>> Remove leading zeros from operands
;
        xor     eax,eax
        xor     ecx,ecx
        mov     ax,a[ebp]               ; #USHORTs into ax
        cmp     ax,0
        je      next1
        shl     eax,1                   ; Index to low-order byte
                                        ; of high-order digit
        mov     esi,eax
@@:     cmp     word ptr a[ebp][esi],0  ; Digit = 0 ?
        jne     @F                      ; No, then we're done
        sub     esi,2                   ; Else: step back one digit
        cmp     esi,0                   ; Index = 0?
        je      mazer1                  ; Then argument = 0
        jmp     @B                      ; Next comparison
@@:                                     ; Length found
mazer1: shr     esi,1                   ; #Digits
        mov     eax,esi	                ; Store number of digits 
        mov     word ptr a[ebp],ax      

;Operand2
next1:  mov     ax,b[ebp]               ; #USHORTs in ax
        cmp     ax,0
        je      end1
        shl     eax,1                   ; #Bytes, index to low-order byte
                                        ; of high-order digit
        mov     esi,eax
@@:     cmp     word ptr b[ebp][esi],0  ; Digit = 0 ?
        jne     @F                      ; If not, we're done
        sub     esi,2                   ; Else:	step back one digit
        cmp     esi,0                   ; Index = 0?
        je      mazer2                  ; Then argument = 0
        jmp     @B                      ; Next comparison
@@:                                     ; Length found
mazer2: shr     esi,1                   ; #Digits
        mov     eax,esi                 ; Store number of digits
        mov     b[ebp],ax

end1:   cmp     ax,0
        jne     @F
        pop     ebp
        jmp     divbyz
@@:     cmp     word ptr a[ebp],0
        jne     @F
        pop     ebp
        jmp     divz
;
;>>>>>> Test a < b ?
;
@@:     mov     ecx,0
        mov     cx,a[ebp]
        cmp     cx,b[ebp]               ; l(a) - l(b)
        jnc     div03
        jmp     dra
div03:  jne     div05                   ; Compare digits
        mov     eax,ecx                 ; cl = l(a) = l(b)
        shl     eax,1
        lea     esi,a[ebp]
        lea     edi,b[ebp]
        add     esi,eax                 ; si points to high-order digit of a
        add     edi,eax                 ; di points to high-order digit of b
        std
repe    cmpsw
        cld
        jnc     div05                   ; If no carry occurs, q is positive
        jmp     dra                     ; Else q := 0 and r := a
div05:  mov     ax,b[ebp]
        shr     ax,1
        jnc     div05a
        inc     ax
div05a: cmp     ax,1                    ; Test if length l(b) = 1
        jne     dstart
        jmp     dshort                  ; Then go to short division
;
;>>>>>> Beginn der Division
;
dstart: mov     eax,0
        mov     ax,b[ebp]
        shr     ax,1
        jnc     dm0
        inc     ax
dm0:    mov     esi,eax
        shl     esi,2
        sub     esi,2                   ; Pointer to low byte of b[l(b)]
		                        ; (pointer to high-order ULONG)
        cmp     esi,10                  ; Does divisor have 3 or more digits?
        jb      dm1a                    ; Two digits are present at mininum!

        mov     ebx,b[ebp][esi]         ; b[l(b)] in bx
        mov     eax,b[ebp][esi-4]
        mov     edx,b[ebp][esi-8]
;
        mov     ecx,0                   ; Prepare counter
;
@@:     cmp     ebx,080000000h          ; v1 >= 2^31 ?
        jae     dm2                     ; If not...
        inc     cx
        clc
        rcl     edx,1
        rcl     eax,1
        rcl     ebx,1                   ; v1 = v1 * 2
        jmp     short @B                ; until v1 >= 2^31

dm1a:   mov     ebx,b[ebp][esi]         ; b[l(b)] in bx
        mov     eax,b[ebp][esi-4]
;
        mov     ecx,0                   ; Prepare counter
;
@@:     cmp     ebx,080000000h          ; v1 >= 2^31 ?
        jae     dm2                     ; If not...
        inc     cx
        clc
        rcl     eax,1
        rcl     ebx,1                   ; v1 = v1 * 2
        jmp     short @B                ; until v1 >= 2^31
;
dm2:    mov     d[ebp],cx               ; Store exponent
        mov     v1[ebp],ebx             ; v1
        mov     v2[ebp],eax             ; v2

dm3:    inc     word ptr a[ebp]         ; l(a) = l(a) + 2
        inc     word ptr a[ebp]
        mov     eax,0
        mov     ax,a[ebp]
        shr     ax,1
        jnc     dm3a
        inc     ax
dm3a:   mov     esi,eax
        shl     esi,2
        sub     esi,2
        mov     dword ptr a[ebp][esi],0 ; a[l(a)] = 0
;
d2:     mov     eax,0
        mov     ax,b[ebp]
        shr     ax,1
        jnc     d2a
        inc     ax
d2a:    mov     esi,eax
        shl     esi,2
        sub     esi,2                   ; si points to low-order byte of b[l(b)]
;
        mov     ecx,0
        mov     cx,a[ebp]
        shr     cx,1
        jnc     d2b
        inc     cx
d2b:    mov     edi,ecx
        shl     edi,2
        sub     edi,2                   ; di points to low-order byte of a[l(a)]
        push    edi
        sub     edi,esi
        inc     edi                     ; di points to high-order byte of a[l(a)-l(b)]
        mov     ecx,edi
        shr     ecx,2                   ; Counter in cx
        pop     esi                     ; si points to low-order byte of a[l(a)] (j+l(b))
        sub     edi,3                   ; di points to low-order byte of a[l(a)-l(b)] (j)
        push    edi                     ; Possible length of q

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品专区| 99精品视频在线免费观看| 日韩伦理电影网| 国产情人综合久久777777| 日韩亚洲欧美成人一区| 91精品一区二区三区在线观看| 欧美亚洲动漫精品| 欧美亚洲精品一区| 欧美福利视频导航| 欧美群妇大交群中文字幕| 欧洲亚洲精品在线| 欧美日韩国产在线观看| 欧美一区二区三区视频在线观看| 欧美色偷偷大香| 欧美一级淫片007| 日韩女同互慰一区二区| 久久久.com| 日韩伦理电影网| 婷婷久久综合九色综合伊人色| 日韩精品午夜视频| 精品一区二区av| a美女胸又www黄视频久久| 在线观看国产一区二区| 欧美一激情一区二区三区| 精品久久久久久久久久久院品网 | 久久精品亚洲麻豆av一区二区 | 精品理论电影在线观看| 国产视频视频一区| 亚洲欧美一区二区不卡| 亚洲成人黄色小说| 精品一区二区三区免费观看| 成人免费视频视频| 欧美亚洲高清一区| 久久精品日产第一区二区三区高清版 | 精品在线亚洲视频| 成人免费va视频| 在线免费观看日韩欧美| 欧美成人官网二区| 亚洲视频小说图片| 国产一区视频网站| 91蜜桃在线观看| 欧美xxxxx牲另类人与| 亚洲日本丝袜连裤袜办公室| 精油按摩中文字幕久久| 在线亚洲高清视频| 国产欧美综合色| 午夜精品一区二区三区三上悠亚 | av一区二区三区| 51久久夜色精品国产麻豆| 国产精品色哟哟| 精品中文av资源站在线观看| 色欧美片视频在线观看| 久久久国产综合精品女国产盗摄| 一区二区三区在线视频观看58| 国产在线播放一区| 7777精品伊人久久久大香线蕉| 中文字幕一区三区| 国产精品一品二品| 精品剧情在线观看| 日日夜夜一区二区| 欧洲中文字幕精品| 亚洲欧美国产三级| 成人av电影在线| 国产欧美一区视频| 国产在线精品国自产拍免费| 在线不卡a资源高清| 亚洲乱码中文字幕综合| 成人在线一区二区三区| 精品日韩一区二区三区免费视频| 亚洲综合图片区| 一本久道久久综合中文字幕| 最新热久久免费视频| 成人综合婷婷国产精品久久蜜臀 | 91在线高清观看| 国产精品欧美久久久久无广告| 日韩二区三区在线观看| 欧美视频日韩视频在线观看| 亚洲精品乱码久久久久久黑人| 成人国产精品免费| 国产精品久久久久影视| 成人涩涩免费视频| 26uuu成人网一区二区三区| 美女看a上一区| 精品欧美一区二区三区精品久久| 美女久久久精品| 91精品国产一区二区三区香蕉| 亚洲妇女屁股眼交7| 在线电影欧美成精品| 麻豆视频一区二区| 久久久不卡网国产精品二区| 国产99久久久国产精品潘金网站| 国产日韩欧美一区二区三区乱码| 国产精品自在在线| 国产精品高潮久久久久无| 91丨九色丨国产丨porny| 亚洲欧美自拍偷拍色图| 欧美午夜免费电影| 久久99精品久久久久久| 亚洲国产精品精华液2区45| 99国产精品国产精品毛片| 亚洲图片有声小说| 精品国产乱码久久久久久闺蜜| 国产·精品毛片| 洋洋成人永久网站入口| 日韩精品中文字幕在线一区| 国产69精品久久久久毛片| 一区二区三区四区精品在线视频| 555www色欧美视频| 成人av小说网| 五月开心婷婷久久| 久久精品视频一区二区三区| 欧美主播一区二区三区| 国产中文字幕一区| 中文字幕一区二区三区四区| 51久久夜色精品国产麻豆| 国产精品99久久久久久久女警 | 国产一区二区三区综合| 亚洲男人天堂av| 久久亚洲私人国产精品va媚药| 99久久夜色精品国产网站| 丝袜美腿高跟呻吟高潮一区| 国产亲近乱来精品视频| 欧美丰满美乳xxx高潮www| 国产成人a级片| 亚洲一区二三区| 国产精品入口麻豆九色| 欧美精品在线观看一区二区| 成人免费视频网站在线观看| 日本视频在线一区| 亚洲一区二区三区不卡国产欧美| 久久久久久免费网| 欧美日韩三级一区二区| 99re成人精品视频| 国产大片一区二区| 日本中文在线一区| 亚洲一区二区av在线| 国产精品免费视频一区| 精品粉嫩超白一线天av| 欧美精品免费视频| 91成人免费网站| 91在线看国产| 成人激情综合网站| 国产伦精一区二区三区| 免费视频一区二区| 亚洲国产一二三| 亚洲综合一二区| 亚洲色大成网站www久久九九| 欧美国产激情一区二区三区蜜月 | 久久精品日产第一区二区三区高清版| 91国产精品成人| 91麻豆自制传媒国产之光| 成人国产亚洲欧美成人综合网| 国产美女一区二区三区| 激情图片小说一区| 精品夜夜嗨av一区二区三区| 另类人妖一区二区av| 久久电影网站中文字幕| 久久国产成人午夜av影院| 久久国产精品99久久人人澡| 久久69国产一区二区蜜臀| 麻豆极品一区二区三区| 久久99国产精品免费网站| 久久疯狂做爰流白浆xx| 国产一区二区三区高清播放| 国产麻豆视频精品| 成人av在线播放网站| 99re亚洲国产精品| 在线观看视频91| 欧美一区日本一区韩国一区| 欧美一区二区三区视频在线 | 精品视频资源站| 欧美一区二区人人喊爽| 精品国产乱码久久久久久图片 | 午夜影院在线观看欧美| 日韩激情一二三区| 国产一区二区三区四区在线观看| 国产精品99久久久| 色婷婷精品大在线视频| 欧美日韩成人在线一区| 日韩免费观看2025年上映的电影| 久久久久国产精品厨房| 亚洲色图在线视频| 丝袜诱惑制服诱惑色一区在线观看| 老色鬼精品视频在线观看播放| 韩国成人在线视频| 色综合天天综合给合国产| 欧美亚州韩日在线看免费版国语版| 7777精品伊人久久久大香线蕉完整版| 精品奇米国产一区二区三区| 日韩伦理电影网| 日本中文字幕一区二区有限公司| 国产a级毛片一区| 欧美天堂一区二区三区| 久久蜜桃一区二区| 一区二区三区蜜桃| 韩国一区二区视频| 在线免费观看一区| 国产欧美一区二区在线观看| 亚洲第一狼人社区| 成人美女视频在线观看|