非常经典的加密算法

源代码在线查看: farm9 readme.txt

软件大小: 86 K
上传用户: tswccyt
关键词: 加密算法
下载地址: 免注册下载 普通下载 VIP

相关代码

				farm9 README.txt for rcrypt
				10-07-2000
				
				Thanks for downloading rcrypt
				
				This is a program for encrypting files using the Rijndael
				algorithm, which is the AES standard as of Oct 2, 2000.
				
				Included is the source from the NIST site.
				
				The only part contributed by farm9 is the relatively simple
				source file: rcrypt.c
				
				There are many options for using the Rijndael algorithm,
				none of which are supported by rcrypt.  When you enter a key
				on the command line, that key is used to generate a 256 bit
				Rijndael key.  CBC mode is the encryption mode.
				
				Rijndael encrypts 16 bytes at time, so the main contribution
				of rcrypt is to just turn any file size into a multiple of
				16 bytes.  This is done by adding a 16 byte header that includes
				the actual size of the file, then padding the final block of
				the raw file data if necessary.  
				
				When a file is decrypted, the header is read to determine the 
				actual file size.
				
				For example, if a 1 byte file were encrypted, the resulting
				encrypted file would be 32 bytes long.  The first 16 bytes
				would contain the encrypted form of the text:
				
				  "1 ", 
				
				The next 16 bytes would contain:
				
				  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
				
				One side effect of the random numbers in the headers is that
				encrypting the same file with the same key will usually result
				in totally different output.  This is because the CBC mode
				XORs the previous block's encryption with the current block
				before encrypting, so a different header propagates throughout
				the rest of the file.  
				
				jojo@farm9.com
							

相关资源