久久久久久久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"的已知弱密鑰,不能使用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

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

                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.
                

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

                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?

                由于算法強制奇校驗,密鑰實際上是 101010....我不確定這是否適用于 DES 算法,或者只是我所做的支付處理工作中的一個要求.

                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 在下面的回答中有一些關于 .NET 黑客的非常好的信息.不幸的是,我無法使用這種技術解決我的問題,但仍然有一些有趣的閱讀.

                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.

                這將計算一個 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;
                    }
                

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

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

                相關文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數調用按鈕 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>
                          主站蜘蛛池模板: 国产精品福利视频 | 精品国产一区二区三区久久 | 精品免费国产一区二区三区四区介绍 | 国产福利在线视频 | 日韩中文字幕在线免费 | 成年人在线视频 | 国产精品久久久久久久久久99 | 激情国产在线 | 国产欧美精品在线 | 国产精品久久久久久吹潮 | 精品一区二区三区在线观看国产 | 欧洲精品视频一区 | 日韩中文字幕 | 久久精品国产精品青草 | 欧美专区在线 | 亚洲中午字幕 | 日日人人 | 免费三级网站 | av在线一区二区三区 | 国产激情一区二区三区 | 国产精品免费在线 | 人人种亚洲 | 一区二区三区在线看 | 国产91在线 | 亚洲 | 成人免费精品视频 | 日日夜夜精品 | av中文字幕在线观看 | 欧美看片 | 成人小视频在线观看 | 99re在线视频免费观看 | 久久久久久国产精品免费免费 | 久久不卡区 | 久久中文字幕一区 | 欧美一级欧美三级在线观看 | 福利一区二区在线 | 久久夜色精品国产 | 懂色av一区二区三区在线播放 | 国产成人高清视频 | 欧区一欧区二欧区三免费 | 欧美一级视频在线观看 | 亚洲欧美日韩精品久久亚洲区 |