From c4a11c59a0de23e9662a7def0b2c5598de1b5a5c Mon Sep 17 00:00:00 2001 From: xicilion Date: Thu, 5 Dec 2024 19:42:12 +0800 Subject: [PATCH 1/4] add sm2. --- index.html | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/index.html b/index.html index 48e368c..99356b8 100644 --- a/index.html +++ b/index.html @@ -1435,6 +1435,16 @@

Multikey

(`z`). + + SM2 256-bit public key + +The encoding of a SM2 public key MUST start with the two-byte prefix +`0x8624` (the varint expression of `0x1206`) followed by the 33-byte compressed +public key data. The resulting 35-byte value MUST then be encoded using the +base-58-btc alphabet, according to Section [[[#multibase-0]]], and then +prepended with the base-58-btc Multibase header (`z`). + + @@ -1489,6 +1499,16 @@

Multikey

(`z`). + + SM2 256-bit secret key + +The encoding of a SM2 secret key MUST start with the two-byte prefix +`0x9026` (the varint expression of `0x1310`) followed by the 32-byte +secret key data. The resulting 34-byte value MUST then be encoded using the +base-58-btc alphabet, according to Section [[[#multibase-0]]], and then +prepended with the base-58-btc Multibase header (`z`). + + @@ -3764,6 +3784,16 @@

Multikey Examples

"capabilityInvocation": [ "https://controller.example/123#key-2" ] +} + + +
+{
+  "id": "https://multikey.example/issuer/123#key-0",
+  "type": "Multikey",
+  "controller": "https://multikey.example/issuer/123",
+  "publicKeyMultibase": "zEPJc1vCfbG2aoZn8f3U8ggYRL4ZFfF63ZA3qFSk81WJxnCQr"
 }
           
@@ -3882,6 +3912,21 @@

JsonWebKey Examples

"capabilityInvocation": [ "https://controller.example/123#key-2" ] +} + + +
+{
+  "id": "https://jsonwebkey.example/issuer/123#key-0",
+  "type": "JsonWebKey",
+  "controller": "https://jsonwebkey.example/issuer/123",
+  "publicKeyJwk": {
+    "kty": "EC",
+    "crv": "SM2",
+    "x": "NIMpjy0M25izi2DrQLhQBlL8b45Lt9a0FzfELdpdO0s",
+    "y": "NXstrSPtSp1cZzvupZ8C68FCgSQhZbuGYLorP6F1N2w"
+  }
 }
           
From 5944575c1eb9b74982540ff52b14c8c840a5da11 Mon Sep 17 00:00:00 2001 From: xicilion Date: Tue, 10 Dec 2024 23:34:34 +0800 Subject: [PATCH 2/4] add sm2. --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 99356b8..a29be6d 100644 --- a/index.html +++ b/index.html @@ -3788,7 +3788,7 @@

Multikey Examples

+            title="An SM2 public key encoded as a Multikey">
 {
   "id": "https://multikey.example/issuer/123#key-0",
   "type": "Multikey",
@@ -3916,7 +3916,7 @@ 

JsonWebKey Examples

+            title="An SM2 public key encoded as a JsonWebKey">
 {
   "id": "https://jsonwebkey.example/issuer/123#key-0",
   "type": "JsonWebKey",

From df4a36da5833bb10fd79c05458045a4882e26942 Mon Sep 17 00:00:00 2001
From: xicilion 
Date: Thu, 12 Dec 2024 00:48:03 +0800
Subject: [PATCH 3/4] add sm2.

---
 index.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html
index a29be6d..cb859c0 100644
--- a/index.html
+++ b/index.html
@@ -1438,7 +1438,7 @@ 

Multikey

SM2 256-bit public key -The encoding of a SM2 public key MUST start with the two-byte prefix +The encoding of an SM2 public key MUST start with the two-byte prefix `0x8624` (the varint expression of `0x1206`) followed by the 33-byte compressed public key data. The resulting 35-byte value MUST then be encoded using the base-58-btc alphabet, according to Section [[[#multibase-0]]], and then @@ -1502,7 +1502,7 @@

Multikey

SM2 256-bit secret key -The encoding of a SM2 secret key MUST start with the two-byte prefix +The encoding of an SM2 secret key MUST start with the two-byte prefix `0x9026` (the varint expression of `0x1310`) followed by the 32-byte secret key data. The resulting 34-byte value MUST then be encoded using the base-58-btc alphabet, according to Section [[[#multibase-0]]], and then From 2bd3269e94b559caad8ad7727ba74a7ce35e247e Mon Sep 17 00:00:00 2001 From: xicilion Date: Thu, 19 Dec 2024 00:59:10 +0800 Subject: [PATCH 4/4] remove SM2 JsonWebKey example. --- index.html | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/index.html b/index.html index cb859c0..b3d5ef9 100644 --- a/index.html +++ b/index.html @@ -3912,21 +3912,6 @@

JsonWebKey Examples

"capabilityInvocation": [ "https://controller.example/123#key-2" ] -} -
- -
-{
-  "id": "https://jsonwebkey.example/issuer/123#key-0",
-  "type": "JsonWebKey",
-  "controller": "https://jsonwebkey.example/issuer/123",
-  "publicKeyJwk": {
-    "kty": "EC",
-    "crv": "SM2",
-    "x": "NIMpjy0M25izi2DrQLhQBlL8b45Lt9a0FzfELdpdO0s",
-    "y": "NXstrSPtSp1cZzvupZ8C68FCgSQhZbuGYLorP6F1N2w"
-  }
 }