DES介绍

数据加密标准 (DES)是一种加密算法(一种加密信息的方法),1976年美国联邦政府的联邦信息处理标准(FIPS)所选中,随后既在国际上广泛流传开来。这个算法因为包含一些机密设计元素,相关的短密钥长度以及被怀疑内含国家安全局(NSA)的后门而在开始是有争议的,DES因此收到强烈的学院派式的审查,并以此推动了现代的分组密码及其密码分析

 

DES现在已经不视为一种安全的加密算法,因为它使用的56位秘钥过短,以现代计算能力,24小时内即可能被破解。也有一些分析报告提出了该算法的理论上的弱点,虽然实际情况未必出现。该标准在最近已经被高级加密标准(AES)所取代。

 

它采用56位有效密钥对64位的数据块进行加密

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Electronic Codebook Mode (ECB),Cipher Block Chaining Mode (CBC).Cipher Feedback Mode (CFB) Only blocks of j <= 64 bits are enciphered at a time. A small j requires more cycles through the encipherment algorithm per unit of plaintext and thus greater processing overhead. A plaintext block always produces the same ciphertext block for the same key and starting variable. Blocks cannot be rearranged. Each ciphertext block depends on the current and all preceding plaintext blocks. Different starting variables are used to prevent the same plaintext enciphering to the same ciphertext. The strength of this mode depends on the size of the key k (best if j == k). An error will affect the current and the following ciphertext blocks. Output Feedback Mode (OFB) Only blocks of j <= 64 bits are enciphered at a time. A small j requires more cycles through the encipherment algorithm per unit of plaintext and thus greater processing overhead. A plaintext block always produces the same ciphertext block for the same key and starting variable. Different starting variables are used to prevent the same plaintext enciphering to the same ciphertext. Absence of chaining makes this mode vulnerable to specific attacks. Different start variable values prevent the same plaintext enciphering to the same ciphertext, by producing different key streams. An error bit in the ciphertext causes only one bit to be in error in the deciphered plaintext. It is not self-synchronizing. Triple-DES ECB Mode Encrypt with key1, decrypt with key2 and encrypt with key3 again. As for ECB encryption but increases the key length to 168 bits. If all keys are the same it is equivalent to encrypting once with just one key. If the first and last key are the same, the key length is 112 bits. If all 3 keys are the same, this is effectively the same as normal ECB mode. Triple-DES CBC Mode Encrypt with key1, decrypt with key2 and then encrypt with key3. As for CBC encryption but increases the key length to 168 bits with the same restrictions as the Triple-DES ESB mode Our first example shows how to use the basic DES encryption routine, DES_ecb_encrypt(), to encrypt or decrypt a single 64-bit block of plaintext to electronic code book (ECB) mode. If the encrypt argument is DES_ENCRYPT, the input (plaintext) is encrypted into the output (ciphertext) using the specified key_schedule. If the encrypt argument is DES_DECRYPT, the input (ciphertext) is decrypted into the output (plaintext). Note that input and output may overlap. Read more: http://blog.fpmurphy.com/2010/04/openssl-des-api.html#ixzz1n2Qte3UG

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值