密码学-对称加密体系-DES-简介

DES

(1)DES是美国联邦信息处理标准中所采用的一种对称加密算法。

(2)DES是一种将64比特的明文加密成64比特密文的对称密码算法,它的密钥长度是56位,尽管从本质上说它的密钥是64bit,但是由于每隔7位会设置一个用于错误检查的比特,奇偶校验位,因此实质上密钥长度是56比特。

(3)DES以64比特明文为一个单位进行加密。

(4).DES每次只能加密64比特的数据,如果待加密的数据比较长,就需要对DES加密进行迭代,迭代的具体方案称之为模式。

(5)DES内部实现理论:在des中的各个步骤称之为轮,整个加密过程需要进行16轮循环。

子密钥:

中间的子密钥指的是本轮加密使用的密钥,每一轮都需要使用一个不同的子密钥,由于它只在一轮中使用,只是一个局部密钥,所以称之为子密钥。

轮函数:

根据右侧和子密钥生成对左侧进行加密的比特序列,它是密码体系的核心。

右半侧实际上没有进行任何处理,者在加密算法中看起来比较浪费,其设计目的为了保证可解密性,因为完全没有进行任何处理的右半侧是解密过程的必须信息,极大的简化了硬件的设计。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 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、付费专栏及课程。

余额充值