如何使用三个不同的密钥进行TripleDES加密实施? [英] How to do TripleDES encryption implementation with three different keys?

查看:363
本文介绍了如何使用三个不同的密钥进行TripleDES加密实施?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Experts,

Hi Experts,

我们获得了三种不同的加密密钥(Key1,key2,key3),我们被要求实施Triple DES算法。

We have been given three different encryption keys(Key1, key2, key3) and we were asked to implement Triple DES algorithm.

根据.net文档,Triple DES类构造函数只接受一个密钥,客户端提到他们需要用三个密钥对其进行加密。 

As per .net documentation, Triple DES class constructor only accepts one key where as client mentioned that they need to encrypt it with three keys. 

如何实现同样的效果?

推荐答案

我认为您应该将每个56位密钥表示为64位value,将它们组合成192位值,并将结果作为字节数组传递给
CreateEncryptor 函数。


这篇关于如何使用三个不同的密钥进行TripleDES加密实施?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆