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

        <bdo id='IRiGb'></bdo><ul id='IRiGb'></ul>
    1. <legend id='IRiGb'><style id='IRiGb'><dir id='IRiGb'><q id='IRiGb'></q></dir></style></legend>
        <tfoot id='IRiGb'></tfoot>

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

      3. 將公鑰從其他地方導入 CngKey?

        Import a Public key from somewhere else to CngKey?(將公鑰從其他地方導入 CngKey?)
          <tbody id='l02ua'></tbody>
        1. <legend id='l02ua'><style id='l02ua'><dir id='l02ua'><q id='l02ua'></q></dir></style></legend>

            • <bdo id='l02ua'></bdo><ul id='l02ua'></ul>

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

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

                • <tfoot id='l02ua'></tfoot>
                • 本文介紹了將公鑰從其他地方導入 CngKey?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在尋找一種跨平臺的方式來共享用于 ECDSA 簽名的公鑰.從 CngKey 和標準 .NET 加密庫的性能角度來看,我有一件很棒的事情,但后來我無法弄清楚 33(或 65)字節公鑰(使用 secp256r1/P256)是如何變成 104 字節的by MS.. Ergo,我不支持跨平臺簽名和驗證..

                  I am looking for a cross platform way to share public keys for ECDSA signing. I had a great thing going from a performance perspective with CngKey and the standard .NET crypto libraries, but then I couldn't figure out how a 33 (or 65) byte public key (using secp256r1/P256) was getting turned into 104 bytes by MS.. Ergo, I couldn't support cross platform signing and verifying..

                  我現在正在使用 BouncyCastle,但神圣的手榴彈速度太慢了!

                  I'm using BouncyCastle now, but holy handgranade is it SLOW!

                  所以,尋找以下要求的建議:

                  So, looking for suggestions for the following requirements:

                  1. 跨平臺/語言(服務器是 .NET,但這是通過 JSON/Web.API 接口提供的)
                    • JavaScript、Ruby、Python、C++ 等.

                  客戶端必須能夠對消息進行簽名,服務器必須能夠使用在注冊服務時交換的公鑰來驗證簽名.

                  The client has to be able to sign the message, the server has to be able to validate the signature with a public key that was exchanged at registration to the service.

                  無論如何,想法會很棒......謝謝

                  Anyways, Ideas would be awesome... Thanks

                  推薦答案

                  所以我已經弄清楚了在 ECCPublicKeyBlob 和 ECCPrivateKeyBlob 中導出的 CngKey 的格式.這應該允許其他人在其他密鑰格式和 CngKey 之間進行互操作,以進行橢圓曲線簽名等.

                  So I have figured out the format of a CngKey exported in ECCPublicKeyBlob and ECCPrivateKeyBlob. This should allow others to interop between other key formats and CngKey for Elliptcal Curve signing and such.

                  ECCPrivateKeyBlob 的格式(對于 P256)如下

                  ECCPrivateKeyBlob is formatted (for P256) as follows

                  • [KEY TYPE(4 個字節)][KEY LENGTH(4 個字節)][PUBLIC KEY(64 個字節)][PRIVATE KEY(32 個字節)]
                  • 十六進制的 KEY TYPE 是 45-43-53-32
                  • 十六進制的鍵長度為 20-00-00-00
                  • PUBLIC KEY 是未壓縮格式減去前導字節(在其他庫中始終為 04 表示未壓縮密鑰)

                  ECCPublicKeyBlob 的格式(對于 P256)如下

                  ECCPublicKeyBlob is formatted (for P256) as follows

                  • [KEY TYPE(4 個字節)][KEY LENGTH(4 個字節)][PUBLIC KEY(64 個字節)]
                  • 十六進制的KEY TYPE是45-43-53-31
                  • 十六進制的鍵長度為 20-00-00-00
                  • PUBLIC KEY 是未壓縮格式減去前導字節(在其他庫中始終為 04 表示未壓縮密鑰)

                  所以給定一個來自其他語言的未壓縮十六進制公鑰,您可以修剪第一個字節,將這 8 個字節添加到前面并使用

                  So given a uncompressed Public key in Hex from another language, you can trim the first byte, add those 8 bytes to the front and import it using

                  CngKey.Import(key,CngKeyBlobFormat.EccPrivateBlob);
                  

                  注意:密鑰 blob 格式由 Microsoft 記錄.

                  Note: The key blob format is documented by Microsoft.

                  KEY TYPE 和 KEY LENGTH 在 BCRYPT_ECCKEY_BLOB 結構為:

                  The KEY TYPE and KEY LENGTH are defined in BCRYPT_ECCKEY_BLOB struct as:

                  { ulong Magic; ulong cbKey; }
                  

                  ECC公鑰內存格式:

                  BCRYPT_ECCKEY_BLOB
                  BYTE X[cbKey] // Big-endian.
                  BYTE Y[cbKey] // Big-endian.
                  

                  ECC私鑰內存格式:

                  BCRYPT_ECCKEY_BLOB
                  BYTE X[cbKey] // Big-endian.
                  BYTE Y[cbKey] // Big-endian.
                  BYTE d[cbKey] // Big-endian.
                  

                  .NET 中可用的 MAGIC 值位于 微軟官方 GitHub dotnet/corefx BCrypt/Interop.Blobs.

                  The MAGIC values available in .NET are in Microsoft's official GitHub dotnet/corefx BCrypt/Interop.Blobs.

                  internal enum KeyBlobMagicNumber : int
                  {
                      BCRYPT_ECDH_PUBLIC_P256_MAGIC = 0x314B4345,
                      BCRYPT_ECDH_PRIVATE_P256_MAGIC = 0x324B4345,
                      BCRYPT_ECDH_PUBLIC_P384_MAGIC = 0x334B4345,
                      BCRYPT_ECDH_PRIVATE_P384_MAGIC = 0x344B4345,
                      BCRYPT_ECDH_PUBLIC_P521_MAGIC = 0x354B4345,
                      BCRYPT_ECDH_PRIVATE_P521_MAGIC = 0x364B4345,
                      BCRYPT_ECDSA_PUBLIC_P256_MAGIC = 0x31534345,
                      BCRYPT_ECDSA_PRIVATE_P256_MAGIC = 0x32534345,
                      BCRYPT_ECDSA_PUBLIC_P384_MAGIC = 0x33534345,
                      BCRYPT_ECDSA_PRIVATE_P384_MAGIC = 0x34534345
                      BCRYPT_ECDSA_PUBLIC_P521_MAGIC = 0x35534345,
                      BCRYPT_ECDSA_PRIVATE_P521_MAGIC = 0x36534345,
                      ...
                      ...
                  }
                  

                  這篇關于將公鑰從其他地方導入 CngKey?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)

                • <small id='2zS9D'></small><noframes id='2zS9D'>

                  <tfoot id='2zS9D'></tfoot>
                    <tbody id='2zS9D'></tbody>

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

                        <bdo id='2zS9D'></bdo><ul id='2zS9D'></ul>
                          <legend id='2zS9D'><style id='2zS9D'><dir id='2zS9D'><q id='2zS9D'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 欧美日韩一区二区视频在线观看 | 久久综合久久综合久久综合 | 欧美日韩成人在线观看 | 久久综合一区二区三区 | 久久人| 日本午夜免费福利视频 | 午夜不卡福利视频 | 五月婷婷色 | 欧美精品久久久 | 请别相信他免费喜剧电影在线观看 | 国产一区二区三区 | 天天摸天天干 | 亚洲 欧美 日韩在线 | 久久久久久精 | 国产一区二区三区久久久久久久久 | 亚洲精品第一国产综合野 | 欧美一级免费 | 日韩有码在线观看 | 美国一级黄色片 | 精品91| 国精日本亚洲欧州国产中文久久 | 成人毛片在线视频 | av第一页 | 国产午夜精品一区二区三区四区 | 精品国产乱码久久久久久图片 | 午夜免费在线观看 | 99精品国自产在线 | 亚洲精品国产一区 | 涩涩99 | 日韩av一区二区在线观看 | 日本一道本 | 国产一区二区三区在线看 | 亚洲美女在线视频 | av电影一区 | 久久国产精品首页 | 欧美精品一区二区三区蜜桃视频 | av色站| 成人欧美一区二区三区在线播放 | 欧美日韩国产一区二区三区 | 欧美福利视频一区 | 国产视频线观看永久免费 |