久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <tfoot id='gCW45'></tfoot>
    2. <i id='gCW45'><tr id='gCW45'><dt id='gCW45'><q id='gCW45'><span id='gCW45'><b id='gCW45'><form id='gCW45'><ins id='gCW45'></ins><ul id='gCW45'></ul><sub id='gCW45'></sub></form><legend id='gCW45'></legend><bdo id='gCW45'><pre id='gCW45'><center id='gCW45'></center></pre></bdo></b><th id='gCW45'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gCW45'><tfoot id='gCW45'></tfoot><dl id='gCW45'><fieldset id='gCW45'></fieldset></dl></div>

      <small id='gCW45'></small><noframes id='gCW45'>

        <bdo id='gCW45'></bdo><ul id='gCW45'></ul>
    3. <legend id='gCW45'><style id='gCW45'><dir id='gCW45'><q id='gCW45'></q></dir></style></legend>
    4. TripleDES:指定的密鑰是“TripleDES"的已知弱密鑰

      TripleDES: Specified key is a known weak key for #39;TripleDES#39; and cannot be used(TripleDES:指定的密鑰是“TripleDES的已知弱密鑰,不能使用)
        <bdo id='FniKE'></bdo><ul id='FniKE'></ul>
        • <i id='FniKE'><tr id='FniKE'><dt id='FniKE'><q id='FniKE'><span id='FniKE'><b id='FniKE'><form id='FniKE'><ins id='FniKE'></ins><ul id='FniKE'></ul><sub id='FniKE'></sub></form><legend id='FniKE'></legend><bdo id='FniKE'><pre id='FniKE'><center id='FniKE'></center></pre></bdo></b><th id='FniKE'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FniKE'><tfoot id='FniKE'></tfoot><dl id='FniKE'><fieldset id='FniKE'></fieldset></dl></div>
            <legend id='FniKE'><style id='FniKE'><dir id='FniKE'><q id='FniKE'></q></dir></style></legend>
          1. <tfoot id='FniKE'></tfoot>

                <tbody id='FniKE'></tbody>

                <small id='FniKE'></small><noframes id='FniKE'>

                本文介紹了TripleDES:指定的密鑰是“TripleDES"的已知弱密鑰,不能使用的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                限時(shí)送ChatGPT賬號(hào)..

                我正在使用 .NET 3.0 類 System.Security.Cryptography.MACTripleDES 類來生成 MAC 值.不幸的是,我正在使用一個(gè)使用1111111111111111"(作為十六進(jìn)制)作為單長(zhǎng) DES 密鑰的硬件設(shè)備.System.Security.Cryptography 庫(kù)會(huì)對(duì)密鑰進(jìn)行一些完整性檢查,如果您嘗試使用加密弱密鑰,則會(huì)返回異常.

                I'm using the .NET 3.0 class System.Security.Cryptography.MACTripleDES class to generate a MAC value. Unfortunately, I am working with a hardware device that uses "1111111111111111" (as hex) as a single-length DES key. The System.Security.Cryptography library does some sanity checking on the key and returns a Exception if you try to use a cryptographically weak key.

                例如:

                byte[] key = new byte[24];
                for (int i = 0; i < key.Length; i++)
                  key[i] = 0x11;
                
                byte[] data = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
                byte[] computedMac = null;
                using (MACTripleDES mac = new MACTripleDES(key))
                {
                  computedMac = mac.ComputeHash(data);
                }
                

                拋出異常

                System.Security.Cryptography.CryptographicException : Specified key is a known weak key for 'TripleDES' and cannot be used.
                

                我知道這不是安全密鑰.在生產(chǎn)中,設(shè)備將使用新的安全密鑰進(jìn)行閃存.同時(shí),有什么方法可以抑制這個(gè)異常被拋出?也許是 app.config 或注冊(cè)表設(shè)置?

                I know this is not a secure key. In production, the device will be flashed with a new, secure key. In the mean time, is there any way to inhibit this Exception from being thrown? Perhaps an app.config or registry setting?

                由于算法強(qiáng)制奇校驗(yàn),密鑰實(shí)際上是 101010....我不確定這是否適用于 DES 算法,或者只是我所做的支付處理工作中的一個(gè)要求.

                The key would actually be 101010... due to the algorithm forcing odd parity. I'm not sure if this is universal to the DES algorithm or just a requirement in the payment processing work I do.

                編輯 2:Daniel 在下面的回答中有一些關(guān)于 .NET 黑客的非常好的信息.不幸的是,我無法使用這種技術(shù)解決我的問題,但仍然有一些有趣的閱讀.

                Edit 2: Daniel's answer below has some very good information about hacking .NET. Unfortunately, I wasn't able to solve my problem using this technique, but there is still some interesting reading there.

                推薦答案

                您可以在 DESCryptoServiceProvider.

                <1111111111111111> 不是弱 DES 密鑰.

                <1111111111111111> is not a weak DES key.

                這將計(jì)算一個(gè) DES CBC-MAC:

                This will calculate a DES CBC-MAC:

                public static byte[] CalcDesMac(byte[] key, byte[] data){
                        DESCryptoServiceProvider des = new DESCryptoServiceProvider();
                        des.Key = key;
                        des.IV = new byte[8];
                        des.Padding = PaddingMode.Zeros;
                        MemoryStream ms = new MemoryStream();
                        using(CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write)){
                          cs.Write(data, 0, data.Length);
                        }
                        byte[] encryption = ms.ToArray();
                        byte[] mac = new byte[8];
                        Array.Copy(encryption, encryption.Length-8, mac, 0, 8);
                        PrintByteArray(encryption);
                        return mac;
                    }
                

                這篇關(guān)于TripleDES:指定的密鑰是“TripleDES"的已知弱密鑰,不能使用的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測(cè)有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運(yùn)行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)

                    <bdo id='tS12Y'></bdo><ul id='tS12Y'></ul>
                      <tbody id='tS12Y'></tbody>

                      <i id='tS12Y'><tr id='tS12Y'><dt id='tS12Y'><q id='tS12Y'><span id='tS12Y'><b id='tS12Y'><form id='tS12Y'><ins id='tS12Y'></ins><ul id='tS12Y'></ul><sub id='tS12Y'></sub></form><legend id='tS12Y'></legend><bdo id='tS12Y'><pre id='tS12Y'><center id='tS12Y'></center></pre></bdo></b><th id='tS12Y'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tS12Y'><tfoot id='tS12Y'></tfoot><dl id='tS12Y'><fieldset id='tS12Y'></fieldset></dl></div>
                      <legend id='tS12Y'><style id='tS12Y'><dir id='tS12Y'><q id='tS12Y'></q></dir></style></legend>

                        <small id='tS12Y'></small><noframes id='tS12Y'>

                        <tfoot id='tS12Y'></tfoot>
                          主站蜘蛛池模板: 亚洲一区二区欧美 | 国产精品美女久久久久av爽 | 在线观看h视频 | 国产精品国产三级国产专区52 | 天天燥日日燥 | 亚洲天堂网在线观看 | 在线播放毛片 | av黄色在线 | a一级黄色片 | 黄视频网站在线观看 | 国产在线观看网站 | 少妇一级淫片 | 成人黄色免费视频 | 美女在线播放 | 99色综合| 在线日韩视频 | 久久精选视频 | 久久久夜 | 欧美黄色一级视频 | 国产一级黄色录像 | 成人视屏在线观看 | www.狠狠操.com | 亚洲精品视频在线观看免费 | 深夜福利视频网站 | 国产精品成人一区二区 | 色爱综合网| 精品一区在线 | 亚洲综合色网 | 亚洲视频一区在线观看 | av大全在线观看 | 91蜜桃视频 | 午夜黄色影院 | 久久久精品国产sm调教网站 | 激情五月婷婷综合 | 中文亚洲字幕 | 五月天婷婷激情网 | 中文字幕在线一区二区三区 | 国产97视频| 一级黄毛片 | 欧美日皮视频 | 偷拍一区二区 |