获取3DES密钥的密钥检查值(KCV或KVV)

时间:2015-12-10 10:18:51

标签: c# cryptography tripledes

我知道如何使用密钥加密16个十六进制零来计算 single-length DES 密钥i-e的KCV。

我按照上面链接中的示例进行操作,并将我的答案与正确相符(在C#中实现):

Zeros = StringToByte("0000000000000000");
Key   = StringToByte("0123456789ABCDEF");

KCV = cryptographer.EncryptDES(Zeros ,Key); // KCV Single DES

D5D44FF720683D0D = ByteToString(KCV); // Answer matched from the Link above and its correct

问题:  我想知道的是如何获得 Triple DES 密钥的KCV?像这样:

 firstKey = secondKey = 16 Digit key.
            Result = cryptographer.EncryptDES(Zeros , firstKey);
            Result = cryptographer.DecryptDES(Result, secondKey);
            Result = cryptographer.EncryptDES(Result, thirdKey);

Where ,
       thirdKey = firstKey.
甚至谷歌搜索也没有为我工作。感谢帮助!

0 个答案:

没有答案