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

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

?? aes_x86_v1.asm

?? 一個用vc編寫的aes算法實現(xiàn)
?? ASM
?? 第 1 頁 / 共 2 頁
字號:

; ---------------------------------------------------------------------------
; Copyright (c) 2002, Dr Brian Gladman, Worcester, UK.   All rights reserved.
;
; LICENSE TERMS
;
; The free distribution and use of this software in both source and binary
; form is allowed (with or without changes) provided that:
;
;   1. distributions of this source code include the above copyright
;      notice, this list of conditions and the following disclaimer;
;
;   2. distributions in binary form include the above copyright
;      notice, this list of conditions and the following disclaimer
;      in the documentation and/or other associated materials;
;
;   3. the copyright holder's name is not used to endorse products
;      built using this software without specific written permission.
;
; ALTERNATIVELY, provided that this notice is retained in full, this product
; may be distributed under the terms of the GNU General Public License (GPL),
; in which case the provisions of the GPL apply INSTEAD OF those given above.
;
; DISCLAIMER
;
; This software is provided 'as is' with no explicit or implied warranties
; in respect of its properties, including, but not limited to, correctness
; and/or fitness for purpose.
; ---------------------------------------------------------------------------
; Issue 09/09/2006

; This code requires ASM_X86_V1C to be set in aesopt.h. It requires the C files
; aeskey.c and aestab.c for support.

; An AES implementation for x86 processors using the YASM (or NASM) assembler.
; This is an assembler implementation that covers encryption and decryption
; only and is intended as a replacement of the C file aescrypt.c. It hence
; requires the file aeskey.c for keying and aestab.c for the AES tables. It
; employs full tables rather than compressed tables.

; This code provides the standard AES block size (128 bits, 16 bytes) and the
; three standard AES key sizes (128, 192 and 256 bits). It has the same call
; interface as my C implementation. The ebx, esi, edi and ebp registers are
; preserved across calls but eax, ecx and edx and the artihmetic status flags
; are not.  It is also important that the defines below match those used in the
; C code.  This code uses the VC++ register saving conentions; if it is used
; with another compiler, conventions for using and saving registers may need to
; be checked (and calling conventions).  The YASM command line for the VC++
; custom build step is:
;
;    yasm -Xvc -f win32 -o "$(TargetDir)\$(InputName).obj" "$(InputPath)"
;
;  The calling intefaces are:
;
;     AES_RETURN aes_encrypt(const unsigned char in_blk[],
;                   unsigned char out_blk[], const aes_encrypt_ctx cx[1]);
;
;     AES_RETURN aes_decrypt(const unsigned char in_blk[],
;                   unsigned char out_blk[], const aes_decrypt_ctx cx[1]);
;
;     AES_RETURN aes_encrypt_key<NNN>(const unsigned char key[],
;                                            const aes_encrypt_ctx cx[1]);
;
;     AES_RETURN aes_decrypt_key<NNN>(const unsigned char key[],
;                                            const aes_decrypt_ctx cx[1]);
;
;     AES_RETURN aes_encrypt_key(const unsigned char key[],
;                           unsigned int len, const aes_decrypt_ctx cx[1]);
;
;     AES_RETURN aes_decrypt_key(const unsigned char key[],
;                           unsigned int len, const aes_decrypt_ctx cx[1]);
;
; where <NNN> is 128, 102 or 256.  In the last two calls the length can be in
; either bits or bytes.
;
; Comment in/out the following lines to obtain the desired subroutines. These
; selections MUST match those in the C header file aes.h

%define AES_128                 ; define if AES with 128 bit keys is needed
%define AES_192                 ; define if AES with 192 bit keys is needed
%define AES_256                 ; define if AES with 256 bit keys is needed
%define AES_VAR                 ; define if a variable key size is needed
%define ENCRYPTION              ; define if encryption is needed
%define DECRYPTION              ; define if decryption is needed
%define AES_REV_DKS             ; define if key decryption schedule is reversed
%define LAST_ROUND_TABLES       ; define if tables are to be used for last round

; offsets to parameters

in_blk  equ     4   ; input byte array address parameter
out_blk equ     8   ; output byte array address parameter
ctx     equ    12   ; AES context structure
stk_spc equ    20   ; stack space
%define parms  12   ; parameter space on stack

; The encryption key schedule has the following in memory layout where N is the
; number of rounds (10, 12 or 14):
;
; lo: | input key (round 0)  |  ; each round is four 32-bit words
;     | encryption round 1   |
;     | encryption round 2   |
;     ....
;     | encryption round N-1 |
; hi: | encryption round N   |
;
; The decryption key schedule is normally set up so that it has the same
; layout as above by actually reversing the order of the encryption key
; schedule in memory (this happens when AES_REV_DKS is set):
;
; lo: | decryption round 0   | =              | encryption round N   |
;     | decryption round 1   | = INV_MIX_COL[ | encryption round N-1 | ]
;     | decryption round 2   | = INV_MIX_COL[ | encryption round N-2 | ]
;     ....                       ....
;     | decryption round N-1 | = INV_MIX_COL[ | encryption round 1   | ]
; hi: | decryption round N   | =              | input key (round 0)  |
;
; with rounds except the first and last modified using inv_mix_column()
; But if AES_REV_DKS is NOT set the order of keys is left as it is for
; encryption so that it has to be accessed in reverse when used for
; decryption (although the inverse mix column modifications are done)
;
; lo: | decryption round 0   | =              | input key (round 0)  |
;     | decryption round 1   | = INV_MIX_COL[ | encryption round 1   | ]
;     | decryption round 2   | = INV_MIX_COL[ | encryption round 2   | ]
;     ....                       ....
;     | decryption round N-1 | = INV_MIX_COL[ | encryption round N-1 | ]
; hi: | decryption round N   | =              | encryption round N   |
;
; This layout is faster when the assembler key scheduling provided here
; is used.
;
; The DLL interface must use the _stdcall convention in which the number
; of bytes of parameter space is added after an @ to the sutine's name.
; We must also remove our parameters from the stack before return (see
; the do_exit macro). Define DLL_EXPORT for the Dynamic Link Library version.

;%define DLL_EXPORT

; End of user defines

%ifdef AES_VAR
%ifndef AES_128
%define AES_128
%endif
%ifndef AES_192
%define AES_192
%endif
%ifndef AES_256
%define AES_256
%endif
%endif

%ifdef AES_VAR
%define KS_LENGTH       60
%elifdef AES_256
%define KS_LENGTH       60
%elifdef AES_192
%define KS_LENGTH       52
%else
%define KS_LENGTH       44
%endif

; These macros implement stack based local variables

%macro  save 2
    mov     [esp+4*%1],%2
%endmacro

%macro  restore 2
    mov     %1,[esp+4*%2]
%endmacro

; the DLL has to implement the _stdcall calling interface on return
; In this case we have to take our parameters (3 4-byte pointers)
; off the stack

%macro  do_name 1-2 parms
%ifndef DLL_EXPORT
    align 32
    global  %1
%1:
%else
    align 32
    global  %1@%2
    export  %1@%2
%1@%2:
%endif
%endmacro

%macro  do_call 1-2 parms
%ifndef DLL_EXPORT
    call    %1
    add     esp,%2
%else
    call    %1@%2
%endif
%endmacro

%macro  do_exit  0-1 parms
%ifdef DLL_EXPORT
    ret %1
%else
    ret
%endif
%endmacro

%ifdef  ENCRYPTION

    extern  _t_fn

%define etab_0(x)   [_t_fn+4*x]
%define etab_1(x)   [_t_fn+1024+4*x]
%define etab_2(x)   [_t_fn+2048+4*x]
%define etab_3(x)   [_t_fn+3072+4*x]

%ifdef LAST_ROUND_TABLES

    extern  _t_fl

%define eltab_0(x)  [_t_fl+4*x]
%define eltab_1(x)  [_t_fl+1024+4*x]
%define eltab_2(x)  [_t_fl+2048+4*x]
%define eltab_3(x)  [_t_fl+3072+4*x]

%else

%define etab_b(x)   byte [_t_fn+3072+4*x]

%endif

; ROUND FUNCTION.  Build column[2] on ESI and column[3] on EDI that have the
; round keys pre-loaded. Build column[0] in EBP and column[1] in EBX.
;
; Input:
;
;   EAX     column[0]
;   EBX     column[1]
;   ECX     column[2]
;   EDX     column[3]
;   ESI     column key[round][2]
;   EDI     column key[round][3]
;   EBP     scratch
;
; Output:
;
;   EBP     column[0]   unkeyed
;   EBX     column[1]   unkeyed
;   ESI     column[2]   keyed
;   EDI     column[3]   keyed
;   EAX     scratch
;   ECX     scratch
;   EDX     scratch

%macro rnd_fun 2

    rol     ebx,16
    %1      esi, cl, 0, ebp
    %1      esi, dh, 1, ebp
    %1      esi, bh, 3, ebp
    %1      edi, dl, 0, ebp
    %1      edi, ah, 1, ebp
    %1      edi, bl, 2, ebp
    %2      ebp, al, 0, ebp
    shr     ebx,16
    and     eax,0xffff0000
    or      eax,ebx
    shr     edx,16
    %1      ebp, ah, 1, ebx
    %1      ebp, dh, 3, ebx
    %2      ebx, dl, 2, ebx
    %1      ebx, ch, 1, edx
    %1      ebx, al, 0, edx
    shr     eax,16
    shr     ecx,16
    %1      ebp, cl, 2, edx
    %1      edi, ch, 3, edx
    %1      esi, al, 2, edx
    %1      ebx, ah, 3, edx

%endmacro

; Basic MOV and XOR Operations for normal rounds

%macro  nr_xor  4
    movzx   %4,%2
    xor     %1,etab_%3(%4)
%endmacro

%macro  nr_mov  4
    movzx   %4,%2
    mov     %1,etab_%3(%4)
%endmacro

; Basic MOV and XOR Operations for last round

%ifdef LAST_ROUND_TABLES

    %macro  lr_xor  4
        movzx   %4,%2
        xor     %1,eltab_%3(%4)
    %endmacro

    %macro  lr_mov  4
        movzx   %4,%2
        mov     %1,eltab_%3(%4)
    %endmacro

%else

    %macro  lr_xor  4
        movzx   %4,%2
        movzx   %4,etab_b(%4)
    %if %3 != 0
        shl     %4,8*%3
    %endif
        xor     %1,%4
    %endmacro

    %macro  lr_mov  4
        movzx   %4,%2
        movzx   %1,etab_b(%4)
    %if %3 != 0
        shl     %1,8*%3
    %endif
    %endmacro

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线观看一区二区| 欧美三日本三级三级在线播放| 成人黄页毛片网站| 欧美日本一道本在线视频| 久久久国产精品不卡| 婷婷中文字幕一区三区| www.亚洲国产| 国产午夜精品在线观看| 亚洲国产成人tv| 色久综合一二码| 国产精品视频第一区| 紧缚捆绑精品一区二区| 欧美日韩亚州综合| 一区二区三区在线影院| 国产成都精品91一区二区三| 欧美一区二区精品久久911| 一区二区三区**美女毛片| 久久电影网站中文字幕| 欧美久久久久久久久中文字幕| 亚洲精品日韩综合观看成人91| 国产一区二区精品久久99| 欧美mv和日韩mv的网站| 亚洲一区二区三区国产| 91污片在线观看| 国产精品久久久久久户外露出| 国产一区二区三区综合| 日韩精品一区二区三区视频| 人人狠狠综合久久亚洲| 7777精品伊人久久久大香线蕉完整版| 一区二区日韩av| 91久久精品一区二区三区| 亚洲日本欧美天堂| 日本道色综合久久| 亚洲国产综合视频在线观看| 在线免费av一区| 亚洲午夜影视影院在线观看| 欧美亚洲动漫精品| 亚洲一卡二卡三卡四卡无卡久久| 日本久久电影网| 亚洲午夜一区二区| 日韩一区二区免费在线电影| 久久精品国产99国产| 欧美精品一区二区三区在线| 国产精品自拍网站| 日本一区二区免费在线观看视频| 国产一区二区精品久久99| 国产日韩av一区| 国产91丝袜在线播放九色| 欧美国产激情一区二区三区蜜月| jiyouzz国产精品久久| 亚洲日本成人在线观看| 欧美亚洲高清一区| 久久99九九99精品| 国产精品欧美久久久久一区二区| 91丨九色丨国产丨porny| 亚洲人成网站在线| 欧美日韩国产高清一区二区三区| 日韩国产精品久久久久久亚洲| 欧美一级欧美三级| 不卡在线观看av| 亚洲综合在线观看视频| 欧美一区二区不卡视频| 成人黄色777网| 亚洲国产精品一区二区www| 2020国产精品自拍| 91免费看片在线观看| 免费观看日韩av| 中文字幕一区二区三区在线观看 | 韩国女主播成人在线观看| 久久久久九九视频| 欧美日韩国产成人在线免费| 毛片av一区二区| 亚洲欧美一区二区在线观看| 欧美在线观看禁18| 久久精品国产久精国产爱| 亚洲色图视频免费播放| 日韩一区二区三区四区五区六区 | 久久久美女毛片| 色欧美片视频在线观看在线视频| 日韩精品国产精品| 17c精品麻豆一区二区免费| 91精品国产综合久久精品麻豆| 国产精品综合一区二区三区| 亚欧色一区w666天堂| 国产日产欧美一区| 日韩欧美一区在线| 色伊人久久综合中文字幕| 精品在线免费观看| 一区二区三区蜜桃网| 久久精品无码一区二区三区| 欧美片在线播放| 99精品欧美一区| 精品亚洲国产成人av制服丝袜| 亚洲国产综合视频在线观看| 国产精品天干天干在线综合| 日韩一区二区在线免费观看| 欧美日韩一卡二卡三卡| 波多野结衣中文字幕一区 | 亚洲成人自拍偷拍| 中文天堂在线一区| 精品国产乱码久久久久久浪潮| 欧美伊人精品成人久久综合97| 成人教育av在线| 国产麻豆精品久久一二三| 麻豆91在线看| 三级成人在线视频| 亚洲bt欧美bt精品| 亚洲国产精品精华液网站| 亚洲男人的天堂av| 国产精品第四页| 国产精品人人做人人爽人人添| 26uuu国产日韩综合| 精品国产电影一区二区| 日韩午夜精品视频| 91精品在线免费观看| 欧美一区二区三区四区在线观看| 欧美吞精做爰啪啪高潮| 欧美日韩精品三区| 欧美午夜影院一区| 欧美日韩视频专区在线播放| 欧美电影影音先锋| 制服丝袜一区二区三区| 制服丝袜亚洲网站| 日韩精品中午字幕| 日韩欧美一级片| 久久久不卡网国产精品一区| 久久久久一区二区三区四区| 久久久99精品久久| 中文字幕在线不卡视频| 亚洲美女免费视频| 日日夜夜一区二区| 国内精品视频666| 国产不卡视频在线观看| 国产99一区视频免费 | 国产精品99久久久久久宅男| 成人精品国产免费网站| 欧美午夜精品久久久久久孕妇| 欧美人与z0zoxxxx视频| 日韩免费高清电影| 国产精品日产欧美久久久久| 一区二区三区在线观看视频 | 国产精品一区二区免费不卡 | 国产一区激情在线| 成人黄色在线看| 欧美在线免费视屏| 精品国产一区二区三区不卡| 亚洲国产精品99久久久久久久久 | 韩国av一区二区三区| av影院午夜一区| 在线视频欧美区| 在线不卡的av| 国产亚洲精品bt天堂精选| 亚洲欧洲中文日韩久久av乱码| 亚洲最色的网站| 激情欧美一区二区| 一本久道久久综合中文字幕| 91麻豆精品国产91久久久| 亚洲国产高清不卡| 亚洲一级二级三级| 成人自拍视频在线| 欧美人动与zoxxxx乱| 国产精品系列在线| 日韩av电影天堂| 91视频你懂的| 精品久久久久久久久久久院品网| 中文字幕亚洲区| 久久国产夜色精品鲁鲁99| av一区二区三区在线| 久久久久久久久99精品| 亚洲成人av在线电影| 成人av电影在线| 日韩一区和二区| 亚洲一区二区影院| av中文一区二区三区| 日韩精品一区二区三区中文不卡 | 亚洲一区自拍偷拍| 粉嫩蜜臀av国产精品网站| 欧美丰满少妇xxxxx高潮对白| 久久久精品一品道一区| 久久国产成人午夜av影院| 91精品欧美久久久久久动漫| 亚洲精品你懂的| 97精品久久久午夜一区二区三区 | 国产精品看片你懂得| 国产在线精品国自产拍免费| 911精品产国品一二三产区 | 精品国产乱码91久久久久久网站| 亚洲丰满少妇videoshd| 91蝌蚪国产九色| 欧美国产日韩精品免费观看| 黄色小说综合网站| 91.com视频| 天使萌一区二区三区免费观看| 色综合天天综合网天天狠天天| 日本一区二区三区在线不卡| 国产成人av电影在线观看| 日韩精品中文字幕在线一区| 美国av一区二区| 日韩一级片在线观看| 日韩专区一卡二卡|