数据加密算法(Data Encryption Algorithm,DEA)是一种对称加密算法,很可能是使用最广泛的密钥系统,特别是在保护金融数据的安全中,最初开发的DEA是嵌入硬件中的。通常,自动取款机(Automated Teller Machine,ATM)都使用DEA。它出自IBM的研究工作,IBM也曾对它拥有几年的专利权,但是在1983年已到期后,处于公有范围中,允许在特定条件下可以免除专利使用费而使用。1977年被美国政府正式采纳。 DES的原始思想可以参照二战德国的恩格玛机,其基本思想大致相同。传统的密码加密都是由古代的循环移位思想而来,恩格玛机在这个基础之上进行了扩散模糊。但是本质原理都是一样的。现代DES在二进制级别做着同样的事:替代模糊,增加分析的难度。 DES的加密原理,是使用一个 56 位的密钥以及附加的 8 位奇偶校验位,产生最大 64 位的分组大小。这是一个迭代的分组密码,使用称为 Feistel 的技术,其中将加密的文本块分成两半。使用子密钥对其中一半应用循环功能,然后将输出与另一半进行“异或”运算;接着交换这两半,这一过程会继续下去,但最后一个循环不交换。DES 使用 16 个循环,使用异或,置换,代换,移位操作四种基本运算。 类似于:A1ez8zw/wJ6QNPeMblfS+ZG37vG7h31Vj64liR4RidZTp4KlFqa2DthgOMHQqLDuDXEl0oLujJJ6rDm1SDdAhEiepEqkAJnGCFYjjpw4OyYB+cWSr2sS+CGrxMcc2XMIEHSleTcD0Ff4oR0foJtRZAedXwKBnh6zGvS/PgbjN9TnJ9kAfnGoYYEdbjd7dbGAMG/dYtVljbhjAtsnhkPECzAUOLySKzPmmrdTLDGyWHWSqOGwQQaAPfEpkZi5nU4c0eSO6IVpbGP+MdiTm5TUtnNNQsmEw3ABAeoy6O53KkdGn42N24sjVcnPXM69xTOJHaPCj4zeHNoSKo6HShhRF1zHd8evfB1K8lsxGcGujGi6JNpjmkXxEJOx94+Q46JW23eFUi7uxH0QlZ/aEnzNyIj0zvzKNZdu+w3f3Rlbwu6XcXIJ+ba88D+mccr5wNpARhg5uPxLXIeCQcAbhIGkQ++ASlk37p9kwU2ViHCHhaOnCumFgFkJNFjfGEQ8RfZ3C2mCx7cYW67azB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daPvssQ/hPjXddkGFhU6COlQfFx+mWUACWGl1qYeeUjw2eR7CbiQzsLj5J6CgRBU+vTpIkC/FZV1z9IWIBhHW8+cTiu7MKR5WjwSn3gqb/3oiNCjBbeMCLnbfgNqtetlrtcg3iVCqx5C7KzTPAkruZ/yHXOxCOgKD1wy8Uupa2RLNatD9b9Nr7/hdQJYQ8L+E2N7Jv5vT6HmwwmM3La/Zu12wMLjsQvYDNYQDHSqPL9ndi8cM1+EwyjisUVAB3VDuMX4/hKg/DM54M1bQAnE1RYy6guW1U0KoGaIyGbSYstTGpmZ2AtfKFvoFIH8lj4ZPSRom2c9SdXe8zeHJMHZI3seQ6UdFVCgx5mHMr4NCMKQVzxeBS0d0+ckwFdbGXPfZO2QbmEMJtcNhvq7OIGozsaEKGEdY3CqnR/sK5RKrhRtQTKhW+V0IK1p7qebgGGslMPMQXhTL3bknISQFZNIryMlnmRhPx8KtparB/sjSKhiGyZQVz/al92wanH6fRKww0LZu5ZffKLzA==当然,这些都是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-20 11:36