各位高手,谁有DES 、3DES及以此为基础的 ANSI X9.8、ANSI X 9.9的算法介绍????

解决方案 »

  1.   

    是不是这样的呀?
    BOOL DesEncrypt(LPCTSTR szKey, LPBYTE lpbySrc, LPBYTE lpbyDest, int iLength)
    {
    BYTE byKey[16] = {0};
    CHAR szTempKey[24];
    strcpy(szTempKey, szKey);
    make3key(szTempKey, byKey); des3key(byKey, EN0);
    for (int i = 0; i < iLength; i += 16)
    D3des(lpbySrc + i, lpbyDest + i); return TRUE;
    }BOOL DesDecrypt(LPCTSTR szKey, LPBYTE lpbySrc, LPBYTE lpbyDest, int iLength)
    {
    BYTE byKey[16] = {0};
    CHAR szTempKey[24];
    strcpy(szTempKey, szKey);
    make3key(szTempKey, byKey); des3key(byKey, DE1);
    for (int i = 0; i < iLength; i += 16)
    D3des(lpbySrc + i, lpbyDest + i); return TRUE;
    }
      

  2.   

    DES的话,有一本<应用密码学>
      

  3.   

    密码算法                                                    
                                                                                     
    ●Blowfish                                                                       
    http://www.counterpane.com/blowfish.html                                         
    ●DES (Eric Young's implementation)                                              
    ftp://ftp.psy.uq.oz.au/pub/Crypto/DES/                                           
    ●MD5 (RFC1321)                                                                  
    http://theory.lcs.mit.edu/~rivest/rfc1321.txt                                    
    ●MD5 (in C, as distributed by RSA DSI)                                          
    http://theory.lcs.mit.edu/~rivest/md5.c                                          
    ●MD5 (in C++, prepared by Mordechai T. Abzug, [email protected])                 
    http://www.gl.umbc.edu/~mabzug1/cs/md5/md5.html                                  
    ●Twofish                                                                        
    http://www.counterpane.com/twofish.html 
                        库 
      
    ●Crypto++ by Wei Dai  // 推荐 
    http://www.eskimo.com/~weidai/cryptlib.html 
    ●Cryptographic Libraries: A Comparison 
    http://www.homeport.org/~adam/crypto/ 
    ●KeyNote Trust Management System 
    http://www.cis.upenn.edu/~angelos/keynote.html 
    ●LiDIA (数论) 
    ftp://ftp.informatik.th-darmstadt.de/pub/TI/systems/LiDIA/ 
    ●NTL (数论) 
    http://www.shoup.net/index.html 
    ●MIRACL(数论) 
    http://indigo.ie/~mscott/http://www.shoup.net/ntl/ 
    ●OpenSSL 
    http://www.openssl.org/ 
    ●RSAEuro 
    http://www.rsaeuro.com/ 
    http://www.di.ens.fr/~zen/ 
    ●GP/PARI(数论) 
    http://www.parigp-home.de/ 
    ●MAGMA: 
    http://www.maths.usyd.edu.au:8000/u/magma/ 
    ●SIMATH 
    http://emmy.math.uni-sb.de/~simath/ 
    ●GMA: 
    http://www.swox.com/gmp 
    ●BigNum: 
    http://www.mit.edu/afs/athena.mit.edu/contrib/bignum/ 
    ●ECCP 
    http://www.lix.polytechnique.fr/ 
    ●Maple: 
    http://www.maplesoft.com/ 
    ●MuPAD 
    http://www.mupad.de/ 
    ●AXIOM 
    http://www.nag.co.uk/symbolic_software.asp                                                                                  
      
                          个人程序 
      
    ●Cryptext 
    http://www.pcug.org.au/~njpayne/ 
    ●Cryptix 
    http://www.cryptix.org/ 
    ●Cryptomail 
    http://www.cryptomail.org/ 
    ●ihash (Wintel32 optimized one-way hashing filter) 
    http://www.interchg.ubc.ca/janke/ihash/index.html 
    ●PGP 
    http://web.mit.edu/network/pgp.html 
    ●International PGP Home Page 
    http://www.pgpi.com/ 
    ●Password Safe 
    http://www.counterpane.com/passsafe.html 
    ●PGPFone 
    http://web.mit.edu/network/pgpfone/ 
    http://www.counterpane.com/smime.html 
    ●SATAN (Security Administrator's Tool for Analyzing Networks) 
    http://www.fish.com/satan/ 
    ●SSH (Secure Shell) 
    http://www.cs.hut.fi/ssh/ 
    ●Yarrow 
    http://www.counterpane.com/yarrow.html