数据加密算法(Data Encryption Algorithm,DEA)是一种对称加密算法,很可能是使用最广泛的密钥系统,特别是在保护金融数据的安全中,最初开发的DEA是嵌入硬件中的。通常,自动取款机(Automated Teller Machine,ATM)都使用DEA。它出自IBM的研究工作,IBM也曾对它拥有几年的专利权,但是在1983年已到期后,处于公有范围中,允许在特定条件下可以免除专利使用费而使用。1977年被美国政府正式采纳。 DES的原始思想可以参照二战德国的恩格玛机,其基本思想大致相同。传统的密码加密都是由古代的循环移位思想而来,恩格玛机在这个基础之上进行了扩散模糊。但是本质原理都是一样的。现代DES在二进制级别做着同样的事:替代模糊,增加分析的难度。 DES的加密原理,是使用一个 56 位的密钥以及附加的 8 位奇偶校验位,产生最大 64 位的分组大小。这是一个迭代的分组密码,使用称为 Feistel 的技术,其中将加密的文本块分成两半。使用子密钥对其中一半应用循环功能,然后将输出与另一半进行“异或”运算;接着交换这两半,这一过程会继续下去,但最后一个循环不交换。DES 使用 16 个循环,使用异或,置换,代换,移位操作四种基本运算。 类似于:A1ez8zw/wJ6HhXN8JzRivSCZ3ek7LgxMkelnRbHjh+vHIHw6nEoqN39lLNFp4FsMJQPdYfr56T882SvecD2TtiXVMfGlagslkl5B+ojWVf4jijPfGB/sliYIqP2KRVmh6+eZlFMdE1P+Bc6ygA5PkjoyVSKedAb6Yd5sCrMErOFqxcOwwgjj4J4pUMMILajZ4LQCaDvrgPm7wlLVPZ33Ny2nKMECpsz7be2NzjdzFDDediWCkB444jBDAKzrj+sCU2MnpJ15GJDa+jVWhAJByejzeAYpMp4DuiudA9OYjrKlPMOv5Myi4hmCGrw6qWPllDO0NwioF4bHVhDO4HWjDjcRiPdBsgVdJBiPcfQigmWFkNZdZ0zMvndSjcLPkpIUpu6l5PUhyL+SeSGGe5ATqcgrdEQweYMuz/L7kpzOoxOE05Th/FRqy0wdh0IeXwUahn4/9vMOcjFqebGndZGjbcR0wEC4fIY6azvNPINJ10koFzJH1egtU2yCIyJC9jerQP/XvO80xsvR2FSo3bH/+fwGoL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E6Wj++N8+b24p0radqwXc39A5s0l5xp+lHswstVwHzOtBenzxeHDzUFm31x0iRBcX6gTOhVt288TMQzHdHTSNVtJCDhRf3U2xgmRELHXnq07FHlzda9h+LP+Fo08TfKsOJHfDPKDZJm48YjWBtIyYzSE6quGzqQ56EM2kNMRHto85F4ivb1Sb9i2pS8Wrw2uJ0roOHH3pzS1X/gWdQdJlKXpg+pF4rHf4bG9NfiEkU66NzHBqqMMpGfrx/uiXw05FujeaddSWFdhZ04aURkeOIBRfqUuHpwPO86eSgOLFewSx9E42XMybfYjRrcNTszz2uMjBNVKzDjx/obzB6RxzOFogRrAYCyMY3J1INZjPfkG37P3I7oBanjXD4ExmPYyiw8I9OBqupOwMelgNoCI55y+RmS4o6S+l4L6YopcBSap28Lm0M1/tNgHdxz6tOEIg/EH4gB/orid6NqRF03ewVs1JGuRO8WhkrMvhyXBWi6GcSlcmfogSk8stoIVy6Og0+i2yGI9GVJvnn3LURJYez4OFjeWvYpRuYK8LJdBZgw9PwKR7Vu2R7xhBk4pcQC5lFYP/PJrmxCGz7zuEcvwFH8U/w8KyUyV2oH6sdwGZznXhPtNJ+dN1Tg+h1CoRazDfK0W98OJEwu1JXsRSxi5eVhyRS5e4SPZSZYW+Fblq92TuAB+TtNE4bT5xjjawdf1Y2NSmxdHtJZRHX1G4iWeUJj6QkyvM9Cd+dBwLrJ+tr/UpqGWW+CjWFEZmHsD3IIJ+88zsBc1x/YiNJPYUWHYLz5NacN1KVJObDHDWbg5C/AjE3KATu9XU+Q9qSGAthDB8ZNjJUhHxAX+uMvczl+VTDhEoIhNn67bMBDtR779lqI2ecnIENZsuYtCXz5KyyX9ZNyjGQRdrDN26JkuFiVbQXM8DMzr75/e7W2AojmHmSDihTrTpit5ggiSM+4m29oDRyXlFGz8DVlZBQQwLxOw==当然,这些都是base64编码。那么,什么是base64呢? Base64是网络上最常见的用于传输8Bit字节代码的编码方式之一,大家可以查看RFC2045~RFC2049,上面有MIME的详细规范。Base64编码可用于在HTTP环境下传递较长的标识信息。例如,在Java Persistence系统Hibernate中,就采用了Base64来将一个较长的唯一标识符(一般为128-bit的UUID)编码为一个字符串,用作HTTP表单和HTTP GET URL中的参数。在其他应用程序中,也常常需要把二进制数据编码为适合放在URL(包括隐藏表单域)中的形式。此时,采用Base64编码不仅比较简短,同时也具有不可读性,即所编码的数据不会被人用肉眼所直接看到。 比如,编写一个“123”,得出的结果就是“MTIz”。

05-11 17:25