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

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

?? aes.txt

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

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产精品成人| 亚洲精品成人在线| 伊人一区二区三区| 日本久久一区二区| 精品久久一区二区| 美女视频一区二区三区| 精品久久国产字幕高潮| 国产精品一区二区三区乱码| 国产嫩草影院久久久久| 91网站视频在线观看| 亚洲一区免费在线观看| 欧美一三区三区四区免费在线看| 精品视频999| 欧美性大战久久久久久久| 日韩精品一区二区三区在线观看| 日韩欧美在线综合网| 在线看不卡av| 日韩一区二区三区三四区视频在线观看 | 欧美无砖砖区免费| 精品国产一区二区三区忘忧草| 日本一区二区三区dvd视频在线| 国产女主播在线一区二区| 99国产精品久久久久久久久久久| 一区二区三区久久| 日韩一区二区电影网| 丁香五精品蜜臀久久久久99网站 | 91亚洲永久精品| 亚洲午夜免费视频| 精品国产一区二区精华| fc2成人免费人成在线观看播放| 亚洲图片有声小说| 国产日韩欧美不卡在线| 欧美日韩一区二区欧美激情| 国产美女视频一区| 亚洲第一av色| 国产三级欧美三级日产三级99| 色一情一伦一子一伦一区| 久久精品国产成人一区二区三区| 亚洲色欲色欲www| 日韩精品在线看片z| 91黄色免费版| 国产精品一二三区在线| 亚洲国产综合色| 国产精品视频看| 日韩欧美在线123| 欧洲中文字幕精品| hitomi一区二区三区精品| 免费黄网站欧美| 亚洲线精品一区二区三区| 视频一区二区欧美| 欧美国产禁国产网站cc| 欧美一区二区免费视频| 色噜噜狠狠一区二区三区果冻| 国产一区二区电影| 蜜桃久久久久久久| 五月婷婷综合网| 亚洲综合激情网| 国产精品热久久久久夜色精品三区 | 亚洲va欧美va国产va天堂影院| 欧美激情在线看| 日韩精品一区二区三区老鸭窝 | 日韩欧美黄色影院| 欧美日韩在线观看一区二区| 91视频观看视频| 国产激情一区二区三区| 黄一区二区三区| 久久精品99国产精品日本| 婷婷开心激情综合| 天天亚洲美女在线视频| 亚洲国产精品久久人人爱| 一区二区三区日韩欧美| 亚洲欧美日韩一区| 亚洲色图在线播放| 亚洲色图色小说| 亚洲天堂中文字幕| 亚洲色图欧洲色图婷婷| 成人免费一区二区三区视频 | 欧美一级艳片视频免费观看| 777xxx欧美| 欧美一区二区在线观看| 91精品婷婷国产综合久久竹菊| 欧美性猛交xxxxxx富婆| 欧美色图天堂网| 在线观看视频一区二区欧美日韩| 日本道精品一区二区三区| 色综合久久88色综合天天| 日本高清免费不卡视频| 日本91福利区| 亚洲人成网站影音先锋播放| 日韩亚洲欧美在线观看| 欧美剧情片在线观看| 色狠狠桃花综合| 欧美视频在线一区| 一本色道久久综合亚洲精品按摩| 蜜桃av一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产欧美一区二区精品婷婷| 欧美一区日本一区韩国一区| 色视频一区二区| aa级大片欧美| 在线看国产日韩| 欧美在线免费视屏| 精品久久人人做人人爽| 成人激情午夜影院| 在线视频欧美区| 91免费精品国自产拍在线不卡| 在线视频中文字幕一区二区| 精品一二三四在线| 中文字幕色av一区二区三区| 欧美va亚洲va在线观看蝴蝶网| 欧美一级高清片| 亚洲电影中文字幕在线观看| 91精品国产综合久久婷婷香蕉| 爽好多水快深点欧美视频| 久久中文娱乐网| 国产精品国产三级国产普通话三级 | 精品sm在线观看| 中文字幕亚洲综合久久菠萝蜜| 亚洲国产欧美日韩另类综合| 激情六月婷婷综合| 91免费观看在线| 欧美精品一区二区三区高清aⅴ| ...xxx性欧美| 日本三级亚洲精品| 99久久精品国产毛片| 777久久久精品| 日韩理论片一区二区| 另类小说一区二区三区| 91美女福利视频| 久久婷婷国产综合精品青草| 亚洲最大成人网4388xx| 国产成a人无v码亚洲福利| 91精品午夜视频| 一区二区三区自拍| 岛国一区二区三区| 日韩一区二区中文字幕| 亚洲在线视频网站| 成人av在线一区二区| 精品国产一区二区在线观看| 午夜精品免费在线| 99免费精品视频| 国产亚洲欧美日韩在线一区| 日韩国产欧美在线视频| 91麻豆产精品久久久久久| 国产婷婷色一区二区三区在线| 天堂av在线一区| 欧美在线观看视频一区二区三区 | 国产精品电影院| 极品瑜伽女神91| 日韩小视频在线观看专区| 一区二区三区四区蜜桃| 成人午夜精品在线| 国产色一区二区| 久久精品国产一区二区| 欧美视频日韩视频| 伊人开心综合网| 99精品在线免费| **网站欧美大片在线观看| 国产成人激情av| 久久精品亚洲精品国产欧美| 国产在线国偷精品免费看| 日韩欧美亚洲国产精品字幕久久久| 亚洲国产一区视频| 欧美日韩久久一区| 一区二区三区在线影院| 色综合天天狠狠| 一区二区三区欧美亚洲| 在线观看免费成人| 亚洲成人av在线电影| 欧美日韩在线一区二区| 亚洲一级二级三级| 欧美日韩一区二区三区四区五区| 亚洲成人在线免费| 欧美人动与zoxxxx乱| 首页综合国产亚洲丝袜| 日韩视频在线观看一区二区| 蜜桃久久av一区| 欧美精品一区二区三区四区 | 91麻豆123| 亚洲一区二区三区四区中文字幕| 欧美亚洲免费在线一区| 丝袜诱惑亚洲看片| 日韩欧美国产不卡| 国产不卡在线视频| 亚洲人成7777| 91精品国产综合久久精品性色 | 国产大陆亚洲精品国产| 国产精品初高中害羞小美女文 | 在线播放91灌醉迷j高跟美女| 91在线高清观看| 亚洲欧美欧美一区二区三区| 欧美无人高清视频在线观看| 欧美日韩精品一区二区三区蜜桃| 九九久久精品视频| 亚洲图片欧美综合| 亚洲第一会所有码转帖| 一区二区三区电影在线播| 亚洲视频精选在线| 亚洲国产视频直播| 丝袜亚洲另类丝袜在线|