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

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

?? aes.txt

?? AES加密算法C語(yǔ)言實(shí)現(xiàn)
?? TXT
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):

The projects test_dll and time_dll are used to test and time the last DLL
built.  These use the files:

    test_dll:       Win32 (x64 for the C and AMD64 versions)
        headers:    aes.h, aescpp.h, brg_types.h, aesaux.h and aestst.h
        C source:   aesaux.c, aesrav.c
        defines:    DLL_IMPORT

    time_dll:       Win32 (x64 for the C and AMD64 versions)
        headers:    aes.h, aescpp.h, brg_types.h, aesaux.h aestst.h and rdtsc.h
        C source:   aesaux.c, aestmr.c
        defines:    DLL_IMPORT

and link to the DLL using explicit linking. However, if the lib file associated
with the DLL is linked into this project and the symbol DYNAMIC_LINK in aestst.h
is left undefined, then implicit linking will be used

The projects test_lib and time_lib are used to test and time the last static LIB
built. They use the files:

    test_lib:       Win32 (x64 for the C and AMD64 versions)
        headers:    aes.h, aescpp.h, brg_types.h, aesaux.h and aestst.h
        C source:   aesaux.c, aesrav.c
        defines:

    time_lib:       Win32 (x64 for the C and AMD64 versions)
        headers:    aes.h, aescpp.h, brg_types.h, aesaux.h, aestst.h and rdtsc.h
        C source:   aesaux.c, aestmr.c
        defines:

and link to the last static library built.

The above test take command line arguments that determine which test are run
as follows:

    test_lib /t:[knec] /k:[468]
    test_dll /t:[knec] /k:[468]

where the symbols in square brackets can be used in any combination (without
the brackets) and have the following meanings:

        /t:[knec]   selects which tests are used
        /k:[468]    selects the key lengths used
        /c          compares output with reference (see later)

        k: generate ECB Known Answer Test files
        n: generate ECB Known Answer Test files (new)
        e: generate ECB Monte Carlo Test files
        c: generate CBC Monte Carlo Test files

and the characters giving the lengths are digits representing the lengths in
32-bit units.\n\n");

The project test_modes tests the AES modes.  It uses the files:

    test_modes:     Win32 or x64
        headers:    aes.h, aescpp.h, brg_types.h, aesaux,h and aestst.h
        C source:   aesaux.c, modetest.c
        defines:    none for static library test, DLL_IMPORT for DLL test

which again links to the last library built.

F. Other Applications
---------------------

These are:

    gen_tests       builds the test_vector files. The commad line is
                        gen_tests /t:knec /k:468 /c
                    as described earlier

    gen_tables      builds a simple version of aes_tab.c (in aestab2.c)
                    for compilers that cannot handle the normal version
    aes_example     provides an example of AES use

These applications are linked to the last static library built or, if
DLL_IMPORT is defined during compilation, to the last DLL built.

G. Use of the VIA ACE Cryptography Engine
-----------------------------------------

The use of the code with the VIA ACE cryptography engine in described in the
file via_ace.txt. In outline aes_modes.c is used and USE_VIA_ACE_IF_PRESENT
is defined either in section 2 of aesopt.h or as a compilation option in Visual
Studio. If in addition ASSUME_VIA_ACE_PRESENT is also defined then all normal
AES code will be removed if not needed to support VIA ACE use.  If VIA ACE
support is needed and AES assembler is being used only the ASM_X86_V1C and
ASM_X86_V2C versions should be used since ASM_X86_V2 and ASM_AMD64 do not
support the VIA ACE engine.

H. The AES Test Vector Files
----------------------------

These files fall in the following groups (where <nn> is a two digit
number):

1. ecbvk<nn>.txt  ECB vectors with variable key
2. ecbvt<nn>.txt  ECB vectors with variable text
3. ecbnk<nn>.txt  new ECB vectors with variable key
4. ecbnt<nn>.txt  new ECB vectors with variable text
5. ecbme<nn>.txt  ECB monte carlo encryption test vectors
6. ecbmd<nn>.txt  ECB monte carlo decryption test vectors
7. cbcme<nn>.txt  CBC monte carlo encryption test vectors
8. cbcmd<nn>.txt  CBC monte carlo decryption test vectors

The first digit of the numeric suffix on the filename gives the block size
in 32 bit units and the second numeric digit gives the key size. For example,
the file ecbvk44.txt provides the test vectors for ECB encryption with a 128
bit block size and a 128 bit key size. The test routines expect to find these
files in the 'testvals' subdirectory within the aes root directory. The
'outvals' subdirectory is used for outputs that are compared with the files
in 'testvals'. Note that the monte carlo test vectors are the result of
applying AES iteratively 10000 times, not just once.

I. The Basic AES Calling Interface
----------------------------------

The basic AES code keeps its state in a context, there being different 
contexts for encryption and decryption:

    aes_encrypt_ctx
    aes_decrypt_ctx
    
The AES encryption key is set by one of the calls:
 
    aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1])
    aes_encrypt_key192(const unsigned char *key, aes_encrypt_ctx cx[1])
    aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1])

or by:

    aes_encrypt_key(const unsigned char *key, int key_len, 
                                                aes_encrypt_ctx cx[1])

where the key length is set by 'key_len', which can be the length in bits 
or bytes.  

Similarly, the AES decryption key is set by one of:

    aes_decrypt_key128(const unsigned char *key, aes_decrypt_ctx cx[1])
    aes_decrypt_key192(const unsigned char *key, aes_decrypt_ctx cx[1])
    aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1])

or by:

    aes_decrypt_key(const unsigned char *key, int key_len, 
                                                aes_decrypt_ctx cx[1])
 
Encryption and decryption for a single 16 byte block is then achieved using:

    aes_encrypt(const unsigned char *in, unsigned char *out, 
                                            const aes_encrypt_ctx cx[1])
    aes_decrypt(const unsigned char *in, unsigned char *out, 
                                            const aes_decrypt_ctx cx[1])
                                            
If the define AES_ERR_CHK is set when AES is compiled, the above subroutines 
will return a value of EXIT_SUCCESS or EXIT_FAILURE depending on whether the
operation succeeded or failed.
 
J. The Calling Interface for the AES Modes
------------------------------------------

The subroutines for the AES modes, ECB, CBC, CFB, OFB and CTR, each process
blocks of variable length and can also be called several times to complete 
single mode operations incrementally on long messages (or those messages,
not all of which are available at the same time).  The calls:

    aes_ecb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, const aes_encrypt_ctx cx[1])

    aes_ecb_decrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, const aes_decrypt_ctx cx[1])

for ECB operations and those for CBC:

    aes_cbc_encrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, unsigned char *iv, const aes_encrypt_ctx cx[1])

    aes_cbc_decrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, unsigned char *iv, const aes_decrypt_ctx cx[1])
 
can only process blocks whose lengths are multiples of 16 bytes but the calls 
for CFB, OFB and CTR mode operations:

    aes_cfb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, unsigned char *iv, aes_encrypt_ctx cx[1])

    aes_cfb_decrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, unsigned char *iv, aes_encrypt_ctx cx[1])

    aes_ofb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, unsigned char *iv, aes_encrypt_ctx cx[1])

    aes_ofb_decrypt(const unsigned char *ibuf, unsigned char *obuf,
                    int len, unsigned char *iv, aes_encrypt_ctx cx[1])

    aes_ctr_encrypt(const unsigned char *ibuf, unsigned char *obuf,
            int len, unsigned char *cbuf, cbuf_inc ctr_inc, aes_encrypt_ctx cx[1])

    aes_ctr_decrypt(const unsigned char *ibuf, unsigned char *obuf,
            int len, unsigned char *cbuf, cbuf_inc ctr_inc, aes_encrypt_ctx cx[1])

can process blocks of any length.  Note also that CFB, OFB and CTR mode calls only
use AES encryption contexts even during decryption operations.

The calls CTR mode operations use a buffer (cbuf) which holds the counter value
together with a function parameter:

    void cbuf_inc(unsigned char *cbuf);

that is ued to update the counter value after each 16 byte AES operation. The 
counter buffer is updated appropriately to allow for incremental operations.

Please note the following IMPORTANT points about the AES mode subroutines:

    1. All modes are reset when a new AES key is set.
    
    2. Incremental calls to the different modes cannot 
       be mixed. If a change of mode is needed a new 
       key must be set or a reset must be issued (see 
       below).
       
    3. For modes with IVs, the IV value is an inpu AND
       an ouput since it is updated after each call to 
       the value needed for any subsequent incremental
       call(s). If the mode is reset, the IV hence has
       to be set (or reset) as well.
       
    4. ECB operations must be multiples of 16 bytes
       but do not need to be reset for new operations.
       
    5. CBC operations must also be multiples of 16 
       bytes and are reset for a new operation by 
       setting the IV.
       
    6. CFB, OFB and CTR mode must be reset by setting 
       a new IV value AND by calling:
       
           aes_mode_reset(aes_encrypt_ctx cx[1])
           
       For CTR mode the cbuf value also has to be reset.
       
    7. CFB, OFB and CTR modes only use AES encryption 
       operations and contexts and do not need AES
       decrytpion operations.
       
    8. AES keys remain valid across resets and changes
       of mode (but encryption and decryption keys must 
       both be set if they are needed).  
       
   Brian Gladman  01/09/2006

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲区小说区图片区qvod| 精品999久久久| 亚洲免费av网站| 色婷婷综合在线| 伊人开心综合网| 欧美日韩不卡一区| 久久99精品国产麻豆不卡| 精品国产凹凸成av人网站| 国产在线一区观看| 国产日产欧美精品一区二区三区| 成人午夜激情视频| 天天综合色天天综合| 久久九九久精品国产免费直播| www.视频一区| 国产一区二区电影| 午夜影院久久久| 中文字幕免费不卡| 91精品国产综合久久精品性色| 狠狠久久亚洲欧美| 99re8在线精品视频免费播放| 蜜桃视频在线一区| 精品国产一区二区三区不卡| 亚洲精品欧美在线| 欧美一区二区三区电影| 99久久99久久免费精品蜜臀| 精品一区二区免费看| 亚洲国产美女搞黄色| 中文字幕在线不卡一区| 欧美一区2区视频在线观看| 97久久精品人人爽人人爽蜜臀| 久久99精品久久久久婷婷| 亚洲国产成人av好男人在线观看| 国产精品久久久久久亚洲毛片 | 色国产精品一区在线观看| 免费成人在线观看| 激情av综合网| 国产不卡视频一区| 一本久道中文字幕精品亚洲嫩| 成人一区二区三区中文字幕| 成人免费黄色大片| 波多野结衣一区二区三区| aaa欧美大片| 欧美日本一区二区三区四区| 欧美综合在线视频| 日韩视频不卡中文| 久久五月婷婷丁香社区| 国产日韩欧美不卡| 日韩毛片在线免费观看| 国产欧美一区在线| 日韩毛片精品高清免费| 亚洲动漫第一页| 久久99最新地址| 成人av综合在线| 欧美二区三区的天堂| 久久综合久久久久88| 亚洲精品国产无天堂网2021| 亚洲a一区二区| av一区二区三区黑人| 日韩精品中午字幕| 国产精品激情偷乱一区二区∴| 亚洲福利一区二区三区| 国产91丝袜在线播放0| 欧美午夜理伦三级在线观看| 久久婷婷综合激情| 免费在线观看一区| 欧美在线高清视频| 亚洲欧美偷拍卡通变态| 黑人巨大精品欧美一区| 欧美精品免费视频| 亚洲视频在线观看三级| 精品一区二区久久久| 欧美日韩一区二区三区不卡| 同产精品九九九| 国产99久久久国产精品潘金| 日韩三级视频中文字幕| 蜜臀av性久久久久蜜臀aⅴ四虎 | 亚洲人成小说网站色在线| 国产乱对白刺激视频不卡| 91精品视频网| 亚洲mv大片欧洲mv大片精品| 欧美亚洲动漫另类| 亚洲国产一二三| 日韩精品在线网站| 韩日欧美一区二区三区| 欧美激情一区二区在线| 国产91丝袜在线播放九色| 亚洲日本电影在线| 91麻豆精品国产91久久久久久久久 | 91美女在线观看| 亚洲线精品一区二区三区| 在线观看91av| 国产中文字幕一区| 亚洲视频精选在线| 欧美高清激情brazzers| 国产美女一区二区| 一区二区三区91| 久久视频一区二区| 69久久99精品久久久久婷婷| 日韩1区2区日韩1区2区| 久久电影国产免费久久电影| 欧美一区二区三区的| 激情综合色综合久久综合| 亚洲女同女同女同女同女同69| 色av综合在线| 激情综合色综合久久| 亚洲综合色成人| 国产精品色眯眯| 久久色在线观看| 精品国产乱码久久久久久牛牛| 成人精品视频一区二区三区| 精品一区二区在线看| 亚洲成人免费av| 午夜精品久久久久影视| 亚洲国产精品久久久男人的天堂 | 日本aⅴ亚洲精品中文乱码| 国产精品国产三级国产专播品爱网| 欧美日韩国产片| 91麻豆精品在线观看| 国产麻豆成人精品| 国产专区欧美精品| 国产一区欧美一区| 欧美写真视频网站| 粉嫩绯色av一区二区在线观看| 美国毛片一区二区| 日本欧美久久久久免费播放网| 亚洲第一福利视频在线| 亚洲成av人片在线| 日本视频一区二区三区| 日韩va欧美va亚洲va久久| 麻豆成人av在线| 国产成人免费网站| 91久久精品一区二区三| 欧美日韩在线一区二区| 制服丝袜国产精品| 久久久亚洲精品石原莉奈| 国产精品视频九色porn| 亚洲欧美日韩一区二区| 热久久久久久久| 国模冰冰炮一区二区| 色婷婷香蕉在线一区二区| 欧美精品电影在线播放| 久久先锋资源网| 亚洲尤物在线视频观看| 奇米一区二区三区av| 91黄色免费观看| 国产欧美一区视频| 久草在线在线精品观看| 97久久久精品综合88久久| 欧美精品 日韩| 一区二区三区在线播| 国产黄色成人av| 日韩欧美一级片| 视频在线观看91| 色成人在线视频| 亚洲欧洲国产专区| 国产传媒一区在线| 久久久亚洲午夜电影| 免费成人在线观看| 91麻豆精品91久久久久久清纯| 国产亚洲成av人在线观看导航| xvideos.蜜桃一区二区| 欧美国产日韩精品免费观看| 综合久久国产九一剧情麻豆| 一区二区三区精密机械公司| 日韩中文字幕麻豆| 99久久夜色精品国产网站| 欧美无乱码久久久免费午夜一区| 欧美电影免费提供在线观看| 1024成人网| 国产精品原创巨作av| 欧美天堂亚洲电影院在线播放| 日韩欧美中文一区| 亚洲美女免费在线| 国产精品亚洲午夜一区二区三区| 91精彩视频在线| 综合在线观看色| 国产一区二区三区观看| 欧美一区二区三区电影| 亚洲欧美色图小说| www.av亚洲| 国产无人区一区二区三区| 麻豆精品视频在线观看免费| 在线视频中文字幕一区二区| 国产日韩欧美电影| 国产91露脸合集magnet| 日韩一区二区电影| 亚洲图片欧美色图| 91麻豆视频网站| 国产精品久久久久一区| 国产成人av影院| 国产精品久久久久影院| 成人app软件下载大全免费| 日韩国产高清影视| 色综合久久久久综合99| 国产精品美女一区二区三区 | 国产激情一区二区三区| 91精品一区二区三区久久久久久| 一区二区三区欧美| 欧美日韩国产高清一区二区 | 色美美综合视频|