久久久久久久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. 將公鑰從其他地方導(dǎo)入 CngKey?

        Import a Public key from somewhere else to CngKey?(將公鑰從其他地方導(dǎo)入 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>
                • 本文介紹了將公鑰從其他地方導(dǎo)入 CngKey?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號..

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

                  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..

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

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

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

                  So, looking for suggestions for the following requirements:

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

                  客戶端必須能夠?qū)ο⑦M(jìn)行簽名,服務(wù)器必須能夠使用在注冊服務(wù)時(shí)交換的公鑰來驗(yàn)證簽名.

                  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.

                  無論如何,想法會(huì)很棒......謝謝

                  Anyways, Ideas would be awesome... Thanks

                  推薦答案

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

                  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 個(gè)字節(jié))][KEY LENGTH(4 個(gè)字節(jié))][PUBLIC KEY(64 個(gè)字節(jié))][PRIVATE KEY(32 個(gè)字節(jié))]
                  • 十六進(jìn)制的 KEY TYPE 是 45-43-53-32
                  • 十六進(jìn)制的鍵長度為 20-00-00-00
                  • PUBLIC KEY 是未壓縮格式減去前導(dǎo)字節(jié)(在其他庫中始終為 04 表示未壓縮密鑰)

                  ECCPublicKeyBlob 的格式(對于 P256)如下

                  ECCPublicKeyBlob is formatted (for P256) as follows

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

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

                  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 結(jié)構(gòu)為:

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

                  { ulong Magic; ulong cbKey; }
                  

                  ECC公鑰內(nèi)存格式:

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

                  ECC私鑰內(nèi)存格式:

                  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,
                      ...
                      ...
                  }
                  

                  這篇關(guān)于將公鑰從其他地方導(dǎo)入 CngKey?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  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)

                • <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>
                          • 主站蜘蛛池模板: 国产精品综合网 | 亚洲精品乱码久久久久久9色 | 国产乱码精品1区2区3区 | 97狠狠干 | 台湾av在线| 欧美高清视频 | 国产精品福利网 | 亚洲精品中文字幕在线观看 | 中文字幕视频三区 | 成人中文网 | 精品国产一级 | 久久久精品网站 | 97中文视频| 亚洲黄色av | 成人av片在线观看 | 欧美成人精品在线 | 日韩免费高清视频 | 高清黄色毛片 | 成人午夜精品一区二区三区 | 影视一区 | 中文字幕日韩欧美一区二区三区 | 久久久久久久久久久高潮一区二区 | 亚洲国产成人av好男人在线观看 | 伊色综合久久之综合久久 | 亚洲精品成人在线 | 亚洲国产成人av好男人在线观看 | 国产精品一区二 | 高清视频一区二区三区 | 五月婷婷婷 | 国产在线视频三区 | 午夜一区| 国产高清无av久久 | 国产精品免费在线 | 九九热这里 | 国产高清精品一区二区三区 | 久久国产一区二区 | 91网站在线观看视频 | 久久国产三级 | 久久精品一区二区三区四区 | 亚洲一二三区免费 | 视频一区二区中文字幕 |