From a50c2d6f930a7fdabdbbf97d88b4b2473f9a4fe8 Mon Sep 17 00:00:00 2001
From: Wind4Greg
Date: Tue, 5 Sep 2023 11:09:50 -0700
Subject: [PATCH 1/8] Start SD test vector writeup.
---
TestVectors/ecdsa-sd-2023/SDKeyMaterial.json | 7 +
.../ecdsa-sd-2023/addBaseDocCanon.json | 28 ++++
.../ecdsa-sd-2023/addBaseDocHMACCanon.json | 28 ++++
.../ecdsa-sd-2023/addBaseTransform.json | 123 ++++++++++++++++++
TestVectors/ecdsa-sd-2023/addHashData.json | 4 +
.../ecdsa-sd-2023/addPointerValues.json | 26 ++++
.../ecdsa-sd-2023/addProofConfigCanon.txt | 5 +
.../addRawBaseSignatureInfo.json | 26 ++++
.../ecdsa-sd-2023/addSignedSDBase.json | 54 ++++++++
TestVectors/ecdsa-sd-2023/windDoc.json | 44 +++++++
TestVectors/ecdsa-sd-2023/windMandatory.json | 1 +
index.html | 97 ++++++++++++++
12 files changed, 443 insertions(+)
create mode 100644 TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
create mode 100644 TestVectors/ecdsa-sd-2023/addBaseDocCanon.json
create mode 100644 TestVectors/ecdsa-sd-2023/addBaseDocHMACCanon.json
create mode 100644 TestVectors/ecdsa-sd-2023/addBaseTransform.json
create mode 100644 TestVectors/ecdsa-sd-2023/addHashData.json
create mode 100644 TestVectors/ecdsa-sd-2023/addPointerValues.json
create mode 100644 TestVectors/ecdsa-sd-2023/addProofConfigCanon.txt
create mode 100644 TestVectors/ecdsa-sd-2023/addRawBaseSignatureInfo.json
create mode 100644 TestVectors/ecdsa-sd-2023/addSignedSDBase.json
create mode 100644 TestVectors/ecdsa-sd-2023/windDoc.json
create mode 100644 TestVectors/ecdsa-sd-2023/windMandatory.json
diff --git a/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json b/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
new file mode 100644
index 0000000..9ec9426
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
@@ -0,0 +1,7 @@
+{
+ "publicKeyMultibase": "zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
+ "privateKeyMultibase": "z42twTcNeSYcnqg1FLuSFs2bsGH3ZqbRHFmvS9XMsYhjxvHN",
+ "proofPublicKeyMultibase": "zDnaeTHfhmSaQKBc7CmdL3K7oYg3D6SC7yowe2eBeVd2DH32r",
+ "proofPrivateKeyMultibase": "z42tqvNGyzyXRzotAYn43UhcFtzDUVdxJ7461fwrfhBPLmfY",
+ "hmacKeyString": "00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF"
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/addBaseDocCanon.json b/TestVectors/ecdsa-sd-2023/addBaseDocCanon.json
new file mode 100644
index 0000000..8846903
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addBaseDocCanon.json
@@ -0,0 +1,28 @@
+[
+ "_:c14n0 \"CompFoil170\" .\n",
+ "_:c14n0 \"Wailea\" .\n",
+ "_:c14n0 \"2022\"^^ .\n",
+ "_:c14n1 \"Lahaina\" .\n",
+ "_:c14n1 \"7.8E0\"^^ .\n",
+ "_:c14n1 \"2023\"^^ .\n",
+ "_:c14n2 \"Kanaha Custom\" .\n",
+ "_:c14n2 \"Wailea\" .\n",
+ "_:c14n2 \"2019\"^^ .\n",
+ "_:c14n3 \"Lahaina\" .\n",
+ "_:c14n3 \"7\"^^ .\n",
+ "_:c14n3 \"2020\"^^ .\n",
+ "_:c14n4 \"Kihei\" .\n",
+ "_:c14n4 \"5.5E0\"^^ .\n",
+ "_:c14n4 \"2023\"^^ .\n",
+ "_:c14n5 \"Lahaina\" .\n",
+ "_:c14n5 \"6.1E0\"^^ .\n",
+ "_:c14n5 \"2023\"^^ .\n",
+ "_:c14n6 .\n",
+ "_:c14n6 _:c14n0 .\n",
+ "_:c14n6 _:c14n2 .\n",
+ "_:c14n6 \"Earth101\" .\n",
+ "_:c14n6 _:c14n1 .\n",
+ "_:c14n6 _:c14n3 .\n",
+ "_:c14n6 _:c14n4 .\n",
+ "_:c14n6 _:c14n5 .\n"
+]
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/addBaseDocHMACCanon.json b/TestVectors/ecdsa-sd-2023/addBaseDocHMACCanon.json
new file mode 100644
index 0000000..cacc1cc
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addBaseDocHMACCanon.json
@@ -0,0 +1,28 @@
+[
+ "_:u3Lv2QpFgo-YAegc1cQQKWJFW2sEjQF6FfuZ0VEoMKHg \"Lahaina\" .\n",
+ "_:u3Lv2QpFgo-YAegc1cQQKWJFW2sEjQF6FfuZ0VEoMKHg \"7.8E0\"^^ .\n",
+ "_:u3Lv2QpFgo-YAegc1cQQKWJFW2sEjQF6FfuZ0VEoMKHg \"2023\"^^ .\n",
+ "_:u4YIOZn1MHES1Z4Ij2hWZG3R4dEYBqg5fHTyDEvYhC38 \"CompFoil170\" .\n",
+ "_:u4YIOZn1MHES1Z4Ij2hWZG3R4dEYBqg5fHTyDEvYhC38 \"Wailea\" .\n",
+ "_:u4YIOZn1MHES1Z4Ij2hWZG3R4dEYBqg5fHTyDEvYhC38 \"2022\"^^ .\n",
+ "_:uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0 \"Lahaina\" .\n",
+ "_:uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0 \"6.1E0\"^^ .\n",
+ "_:uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0 \"2023\"^^ .\n",
+ "_:uVkUuBrlOaELGVQWJD4M_qW5bcKEHWGNbOrPA_qAOKKw \"Kanaha Custom\" .\n",
+ "_:uVkUuBrlOaELGVQWJD4M_qW5bcKEHWGNbOrPA_qAOKKw \"Wailea\" .\n",
+ "_:uVkUuBrlOaELGVQWJD4M_qW5bcKEHWGNbOrPA_qAOKKw \"2019\"^^ .\n",
+ "_:uf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7\"^^ .\n",
+ "_:ukR2991GJuy_Tkjem_x7pLVpS4C4GkZAcuGtiPhBfSSc \"2020\"^^ .\n"
+]
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/addBaseTransform.json b/TestVectors/ecdsa-sd-2023/addBaseTransform.json
new file mode 100644
index 0000000..5ed1599
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addBaseTransform.json
@@ -0,0 +1,123 @@
+{
+ "mandatoryPointers": [
+ "/sailNumber",
+ "/sails/1",
+ "/boards/0/year",
+ "/sails/2"
+ ],
+ "mandatory": {
+ "dataType": "Map",
+ "value": [
+ [
+ 5,
+ "_:u4YIOZn1MHES1Z4Ij2hWZG3R4dEYBqg5fHTyDEvYhC38 \"2022\"^^ .\n"
+ ],
+ [
+ 6,
+ "_:uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0 \"Lahaina\" .\n"
+ ],
+ [
+ 7,
+ "_:uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0 \"6.1E0\"^^ .\n"
+ ],
+ [
+ 8,
+ "_:uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0 \"2023\"^^ .\n"
+ ],
+ [
+ 15,
+ "_:uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk .\n"
+ ],
+ [
+ 16,
+ "_:uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk _:u4YIOZn1MHES1Z4Ij2hWZG3R4dEYBqg5fHTyDEvYhC38 .\n"
+ ],
+ [
+ 18,
+ "_:uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk \"Earth101\" .\n"
+ ],
+ [
+ 20,
+ "_:uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk _:uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0 .\n"
+ ],
+ [
+ 22,
+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9j1jmUKHLL8k6m0CZ8g4v73gOpaM5kL3ZACQ \"Kihei\" .\n"
+ ],
+ [
+ 13,
+ "_:ufUWJRHQ9j1jmUKHLL8k6m0CZ8g4v73gOpaM5kL3ZACQ \"5.5E0\"^^ .\n"
+ ],
+ [
+ 14,
+ "_:ufUWJRHQ9j1jmUKHLL8k6m0CZ8g4v73gOpaM5kL3ZACQ \"2023\"^^ .\n"
+ ],
+ [
+ 17,
+ "_:uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk _:uVkUuBrlOaELGVQWJD4M_qW5bcKEHWGNbOrPA_qAOKKw .\n"
+ ],
+ [
+ 19,
+ "_:uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk _:u3Lv2QpFgo-YAegc1cQQKWJFW2sEjQF6FfuZ0VEoMKHg .\n"
+ ],
+ [
+ 21,
+ "_:uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk _:ufUWJRHQ9j1jmUKHLL8k6m0CZ8g4v73gOpaM5kL3ZACQ .\n"
+ ]
+ ]
+ },
+ "hmacKeyString": "00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF"
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/addHashData.json b/TestVectors/ecdsa-sd-2023/addHashData.json
new file mode 100644
index 0000000..3bddb0d
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addHashData.json
@@ -0,0 +1,4 @@
+{
+ "proofHash": "ac14ce7c9c545ea6147cfce51db41d20b483c6890150bfbfcf0fd865436b02b3",
+ "mandatoryHash": "fa6da5724940bee8864209827c06340496ef7a0b22061d6df3bcb5ab49262fe7"
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/addPointerValues.json b/TestVectors/ecdsa-sd-2023/addPointerValues.json
new file mode 100644
index 0000000..276b357
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addPointerValues.json
@@ -0,0 +1,26 @@
+[
+ {
+ "pointer": "/sailNumber",
+ "value": "Earth101"
+ },
+ {
+ "pointer": "/sails/1",
+ "value": {
+ "size": 6.1,
+ "sailName": "Lahaina",
+ "year": 2023
+ }
+ },
+ {
+ "pointer": "/boards/0/year",
+ "value": 2022
+ },
+ {
+ "pointer": "/sails/2",
+ "value": {
+ "size": 7,
+ "sailName": "Lahaina",
+ "year": 2020
+ }
+ }
+]
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/addProofConfigCanon.txt b/TestVectors/ecdsa-sd-2023/addProofConfigCanon.txt
new file mode 100644
index 0000000..58f2cd4
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addProofConfigCanon.txt
@@ -0,0 +1,5 @@
+_:c14n0 "2023-08-15T23:36:38Z"^^ .
+_:c14n0 .
+_:c14n0 "ecdsa-sd-2023" .
+_:c14n0 .
+_:c14n0 .
diff --git a/TestVectors/ecdsa-sd-2023/addRawBaseSignatureInfo.json b/TestVectors/ecdsa-sd-2023/addRawBaseSignatureInfo.json
new file mode 100644
index 0000000..502db02
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addRawBaseSignatureInfo.json
@@ -0,0 +1,26 @@
+{
+ "baseSignature": "5a26e45631504cf42f445b751f01677d5c4b33d89b90d6750429103a8c7ca54a81ca365079d96772920a35e561ef663882fbd4e89d4d10ccab0ce78c5f7d9103",
+ "publicKey": "zDnaeTHfhmSaQKBc7CmdL3K7oYg3D6SC7yowe2eBeVd2DH32r",
+ "signatures": [
+ "29560a336e740c370d58e610a549980b567935984947089ef2f5547aff78406b2df375a1a16eff50ce8950bb0a8cd5478f1665650ca8bcde31c3533f9a19fa4c",
+ "b2a312833d0479a3ded079a8e5237524d6660a3899f8234907849c9b22b8eacee10e8b4d66e187c4a19a0050b8dced05c5c29e502f7aabfcfd3c6785e42dd5a5",
+ "99ea0453c235673c45c91f90331c284a4a911bd13cfc2692ae11fc4c3dadfad577d872800b884990a97ac47bb3e972f61be574726e9dfeb5a8ce386699568c8d",
+ "6d030c724a5c300128d79582e82f0ca376c2116146b4e4e4331343f8b24c75f9024a8bc1ed19c247b497ce4e7ed1856282d27917383bd400286f9ca0d5634d93",
+ "a501e56111a551592ff965f53a3258275f4ec3b8a9bd5c14be6f744a7dc88cd44bbb2f69af90c79b7c1595530f5692ea8d2f84f3f8c90de255e696346df2bf03",
+ "3bf1e3d2fc6cb89673a551ad82830a2b666518abe12d7dffbd40af74bf8c4e5b3356bda20b75c9a426ce73c07f5bf3a7f9cb1a2cfcd44af9520ed35e73565593",
+ "766d87b78b2ffde737b351d1a9eba5fbec841b1e12ae9c3235045d2dae592b224382aaf887e12d54dcdcf89f95965bcaac737cc012ad52a6aba88e0da67af1ed",
+ "39130b5d8cf7979f4ecdced20e4d9e8fb725adeafd067e9e6815101bbef702a439e9b73ea065de7a67a4c1908d1e314b38448da0dabba9eb4ef0545b8851dbe0",
+ "5bea2d48556550f166835d7d9f74de484eeea798414b7e00a8fd93194400e690c6c8e4deb6b7fcaaaddb5a3d65a42bb567ac84649950ea7acb882a1a3558692f",
+ "d705bf1e1b133d47d496a317e9932c2de9bc85b59a15efeb643a4fa7934dd36bcc1c89c38ced469f406b5d4c9500c9d36377c6ac38ecbb2dac1a033347e6e8d7",
+ "bce1925c7e75791a025ad57d2e5a590f5d22c7422eb950a76ade5f47153b86a1acd00cccd3d906b26b833118e8c29e75c6188527788c6a320e3a159484fc470a",
+ "bd25bdabcf112d9f6559d83665e2be71ff9c16553f3e3ab1d5b515017307437b5fe097e3d8850dbabcb71337cedec8f75585fb743be5113b53d07627debf834a",
+ "e7dd74deab1b23d508cdc537604a5a070a678809f28de9b0ffb11a3cdddfdfbb221fbf51c2897ab5fef6e9050f5226ab3729a085265e5ef21b8e9c6a94acfe50",
+ "43093442ebc81c551cac0647afedeb62f7d9cdacf0cd82500a9398738517dcf70507156dc88ed4f4f89e50e362f3710b155037d60a26c4b70262e9fbe7dd6b7d"
+ ],
+ "mandatoryPointers": [
+ "/sailNumber",
+ "/sails/1",
+ "/boards/0/year",
+ "/sails/2"
+ ]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/addSignedSDBase.json b/TestVectors/ecdsa-sd-2023/addSignedSDBase.json
new file mode 100644
index 0000000..81eb574
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/addSignedSDBase.json
@@ -0,0 +1,54 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/credentials/v2",
+ {
+ "@vocab": "https://windsurf.grotto-networking.com/selective#"
+ }
+ ],
+ "type": [
+ "VerifiableCredential"
+ ],
+ "sailNumber": "Earth101",
+ "sails": [
+ {
+ "size": 5.5,
+ "sailName": "Kihei",
+ "year": 2023
+ },
+ {
+ "size": 6.1,
+ "sailName": "Lahaina",
+ "year": 2023
+ },
+ {
+ "size": 7,
+ "sailName": "Lahaina",
+ "year": 2020
+ },
+ {
+ "size": 7.8,
+ "sailName": "Lahaina",
+ "year": 2023
+ }
+ ],
+ "boards": [
+ {
+ "boardName": "CompFoil170",
+ "brand": "Wailea",
+ "year": 2022
+ },
+ {
+ "boardName": "Kanaha Custom",
+ "brand": "Wailea",
+ "year": 2019
+ }
+ ],
+ "proof": {
+ "type": "DataIntegrityProof",
+ "cryptosuite": "ecdsa-sd-2023",
+ "created": "2023-08-15T23:36:38Z",
+ "verificationMethod": "did:key:zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP#zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
+ "proofPurpose": "assertionMethod",
+ "proofValue": "u2V0AhdhAWEBaJuRWMVBM9C9EW3UfAWd9XEsz2JuQ1nUEKRA6jHylSoHKNlB52Wdykgo15WHvZjiC-9TonU0QzKsM54xffZED2EBYI4AkAipyzhm2PxbjPgEqUpJDsbCEdhPJ-zJdqtVEOrRMM4uT2EBYIAARIjNEVWZ3iJmqu8zd7v8AESIzRFVmd4iZqrvM3e7_jthAWEApVgozbnQMNw1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n3r-DSthAWEDn3XTeqxsj1QjNxTdgSloHCmeICfKN6bD_sRo83d_fuyIfv1HCiXq1_vbpBQ9SJqs3KaCFJl5e8huOnGqUrP5Q2EBYQEMJNELryBxVHKwGR6_t62L32c2s8M2CUAqTmHOFF9z3BQcVbciO1PT4nlDjYvNxCxVQN9YKJsS3AmLp--fda32Eay9zYWlsTnVtYmVyaC9zYWlscy8xbi9ib2FyZHMvMC95ZWFyaC9zYWlscy8y"
+ }
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/windDoc.json b/TestVectors/ecdsa-sd-2023/windDoc.json
new file mode 100644
index 0000000..6afb1bf
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/windDoc.json
@@ -0,0 +1,44 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/credentials/v2",
+ {"@vocab": "https://windsurf.grotto-networking.com/selective#"}
+ ],
+ "type": [
+ "VerifiableCredential"
+ ],
+ "sailNumber": "Earth101",
+ "sails": [
+ {
+ "size": 5.5,
+ "sailName": "Kihei",
+ "year": 2023
+ },
+ {
+ "size": 6.1,
+ "sailName": "Lahaina",
+ "year": 2023
+ },
+ {
+ "size": 7.0,
+ "sailName": "Lahaina",
+ "year": 2020
+ },
+ {
+ "size": 7.8,
+ "sailName": "Lahaina",
+ "year": 2023
+ }
+ ],
+ "boards": [
+ {
+ "boardName": "CompFoil170",
+ "brand": "Wailea",
+ "year": 2022
+ },
+ {
+ "boardName": "Kanaha Custom",
+ "brand": "Wailea",
+ "year": 2019
+ }
+ ]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/windMandatory.json b/TestVectors/ecdsa-sd-2023/windMandatory.json
new file mode 100644
index 0000000..47e155b
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/windMandatory.json
@@ -0,0 +1 @@
+["/sailNumber", "/sails/1", "/boards/0/year", "/sails/2"]
diff --git a/index.html b/index.html
index 01334a9..88ec66f 100644
--- a/index.html
+++ b/index.html
@@ -3224,6 +3224,103 @@ Representation: ecdsa-jcs-2019 with curve P-384
+
+ Representation: ecdsa-sd-2023
+
+ Add Base Proof
+
+In order to add a selective disclosure base proof to a document the issuer needs
+the following cryptographic key material:
+
+
+ -
+The issuers private/public key pair, i.e., the key pair corresponding to the
+verification method that will be part of the proof.
+
+ -
+A per proof private/public key pair created by the issuer just for this proof.
+This is an ephemeral, single use key pair where the private key is not kept
+after the proof has been generated.
+
+ -
+An HMAC key. This used to randomize the order of the blank node ids to avoid
+potential information leakage from the blank node id ordering. This is used only
+once and is shared between issuer and holder. The HMAC in this case is
+functioning as a pseudorandom function (PRF).
+
+
+
+The key material used for generating the add base proof test vectors is shown
+below. Multibase representation is use for the P-256 key pairs and the HMAC key
+is given as a hexadecimal string.
+
+
+
+
+In our scenario a sailor is registering with a race organizer for a series of
+windsurfing races to be held over a number of days on Maui. The organizer will
+inspect the sailors equipment to certify that what has been declared is
+ accurate. The sailors unsigned equipment inventory is shown below.
+
+
+
+In addition to let other sailors know what kinds of equipment their competitors
+maybe sailing on each sailor must disclose the year of their most recent
+windsurfing board and full details on two of their sails. Note that all sailors
+are identified by a sail number that is printed on all their equipment. This
+information is specified via an array of JSON pointers as shown below.
+
+
+
+The result of applying the above JSON pointers to the sailors equipment document
+is shown below.
+
+
+
+Transformation of the unsigned document begins with canonicalizing the document
+as shown below.
+
+
+
+To prevent possible information leakage from the ordering of the blank node ids
+these are processed through a PRF, i.e., the HMAC to give the canonized HMAC
+document shown below. This represents an ordered list of statements that will be
+subject to mandatory and selective disclosure, i.e., it is from this list that
+statements are grouped.
+
+
+
+Now the above canonical document gets grouped in to mandatory and non-mandatory
+statements. The final output of the selective disclosure transformation process
+is shown below. Each statement is now grouped as mandatory and non-mandatory and
+its index in the previous list of statements is remembered.
+
+
+
+To do: proof config
+
+
+To do: hashing
+
+
+To do: signatures
+
+
+To do: final serialization and signed document
+
+
+
+
Add Derived Proof
From 9ba1257771489f68a050c52d6be13e60dd83d367 Mon Sep 17 00:00:00 2001
From: Wind4Greg
Date: Wed, 6 Sep 2023 17:53:57 -0700
Subject: [PATCH 3/8] More work on derived proof test vectors.
---
.../ecdsa-sd-2023/derivedGroupIndexes.json | 6 +++
.../derivedRecoveredBaseData.json | 27 ++++++++++
.../ecdsa-sd-2023/derivedUnsignedReveal.json | 36 +++++++++++++
TestVectors/ecdsa-sd-2023/windSelective.json | 1 +
index.html | 51 +++++++++++++++++++
5 files changed, 121 insertions(+)
create mode 100644 TestVectors/ecdsa-sd-2023/derivedGroupIndexes.json
create mode 100644 TestVectors/ecdsa-sd-2023/derivedRecoveredBaseData.json
create mode 100644 TestVectors/ecdsa-sd-2023/derivedUnsignedReveal.json
create mode 100644 TestVectors/ecdsa-sd-2023/windSelective.json
diff --git a/TestVectors/ecdsa-sd-2023/derivedGroupIndexes.json b/TestVectors/ecdsa-sd-2023/derivedGroupIndexes.json
new file mode 100644
index 0000000..d5ddc52
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/derivedGroupIndexes.json
@@ -0,0 +1,6 @@
+{
+ "combinedIndexes": [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 20, 22, 23, 24, 25 ],
+ "mandatoryIndexes": [ 5, 6, 7, 8, 15, 16, 18, 20, 22, 23, 24, 25 ],
+ "nonMandatoryIndexes": [ 0, 1, 2, 3, 4, 9, 10, 11, 12, 13, 14, 17, 19, 21 ],
+ "selectiveIndexes": [ 3, 4, 5, 9, 10, 11, 15, 16, 17 ]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/derivedRecoveredBaseData.json b/TestVectors/ecdsa-sd-2023/derivedRecoveredBaseData.json
new file mode 100644
index 0000000..b1dab80
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/derivedRecoveredBaseData.json
@@ -0,0 +1,27 @@
+{
+ "baseSignature": "5a26e45631504cf42f445b751f01677d5c4b33d89b90d6750429103a8c7ca54a81ca365079d96772920a35e561ef663882fbd4e89d4d10ccab0ce78c5f7d9103",
+ "proofPublicKey": "zDnaeTHfhmSaQKBc7CmdL3K7oYg3D6SC7yowe2eBeVd2DH32r",
+ "hmacKey": "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
+ "signatures": [
+ "29560a336e740c370d58e610a549980b567935984947089ef2f5547aff78406b2df375a1a16eff50ce8950bb0a8cd5478f1665650ca8bcde31c3533f9a19fa4c",
+ "b2a312833d0479a3ded079a8e5237524d6660a3899f8234907849c9b22b8eacee10e8b4d66e187c4a19a0050b8dced05c5c29e502f7aabfcfd3c6785e42dd5a5",
+ "99ea0453c235673c45c91f90331c284a4a911bd13cfc2692ae11fc4c3dadfad577d872800b884990a97ac47bb3e972f61be574726e9dfeb5a8ce386699568c8d",
+ "6d030c724a5c300128d79582e82f0ca376c2116146b4e4e4331343f8b24c75f9024a8bc1ed19c247b497ce4e7ed1856282d27917383bd400286f9ca0d5634d93",
+ "a501e56111a551592ff965f53a3258275f4ec3b8a9bd5c14be6f744a7dc88cd44bbb2f69af90c79b7c1595530f5692ea8d2f84f3f8c90de255e696346df2bf03",
+ "3bf1e3d2fc6cb89673a551ad82830a2b666518abe12d7dffbd40af74bf8c4e5b3356bda20b75c9a426ce73c07f5bf3a7f9cb1a2cfcd44af9520ed35e73565593",
+ "766d87b78b2ffde737b351d1a9eba5fbec841b1e12ae9c3235045d2dae592b224382aaf887e12d54dcdcf89f95965bcaac737cc012ad52a6aba88e0da67af1ed",
+ "39130b5d8cf7979f4ecdced20e4d9e8fb725adeafd067e9e6815101bbef702a439e9b73ea065de7a67a4c1908d1e314b38448da0dabba9eb4ef0545b8851dbe0",
+ "5bea2d48556550f166835d7d9f74de484eeea798414b7e00a8fd93194400e690c6c8e4deb6b7fcaaaddb5a3d65a42bb567ac84649950ea7acb882a1a3558692f",
+ "d705bf1e1b133d47d496a317e9932c2de9bc85b59a15efeb643a4fa7934dd36bcc1c89c38ced469f406b5d4c9500c9d36377c6ac38ecbb2dac1a033347e6e8d7",
+ "bce1925c7e75791a025ad57d2e5a590f5d22c7422eb950a76ade5f47153b86a1acd00cccd3d906b26b833118e8c29e75c6188527788c6a320e3a159484fc470a",
+ "bd25bdabcf112d9f6559d83665e2be71ff9c16553f3e3ab1d5b515017307437b5fe097e3d8850dbabcb71337cedec8f75585fb743be5113b53d07627debf834a",
+ "e7dd74deab1b23d508cdc537604a5a070a678809f28de9b0ffb11a3cdddfdfbb221fbf51c2897ab5fef6e9050f5226ab3729a085265e5ef21b8e9c6a94acfe50",
+ "43093442ebc81c551cac0647afedeb62f7d9cdacf0cd82500a9398738517dcf70507156dc88ed4f4f89e50e362f3710b155037d60a26c4b70262e9fbe7dd6b7d"
+ ],
+ "mandatoryPointers": [
+ "/sailNumber",
+ "/sails/1",
+ "/boards/0/year",
+ "/sails/2"
+ ]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/derivedUnsignedReveal.json b/TestVectors/ecdsa-sd-2023/derivedUnsignedReveal.json
new file mode 100644
index 0000000..263ec12
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/derivedUnsignedReveal.json
@@ -0,0 +1,36 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/credentials/v2",
+ {
+ "@vocab": "https://windsurf.grotto-networking.com/selective#"
+ }
+ ],
+ "type": [
+ "VerifiableCredential"
+ ],
+ "sailNumber": "Earth101",
+ "sails": [
+ {
+ "size": 6.1,
+ "sailName": "Lahaina",
+ "year": 2023
+ },
+ {
+ "size": 7,
+ "sailName": "Lahaina",
+ "year": 2020
+ }
+ ],
+ "boards": [
+ {
+ "year": 2022,
+ "boardName": "CompFoil170",
+ "brand": "Wailea"
+ },
+ {
+ "boardName": "Kanaha Custom",
+ "brand": "Wailea",
+ "year": 2019
+ }
+ ]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/windSelective.json b/TestVectors/ecdsa-sd-2023/windSelective.json
new file mode 100644
index 0000000..7371ebc
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/windSelective.json
@@ -0,0 +1 @@
+["/boards/0", "/boards/1"]
\ No newline at end of file
diff --git a/index.html b/index.html
index a5f125b..e84008f 100644
--- a/index.html
+++ b/index.html
@@ -3340,6 +3340,57 @@ Add Base Proof
Add Derived Proof
+
+In order to create a derived proof a holder starts with a signed document
+containing a base proof. The base document we will use for these test vectors is
+the final example from Section above. The first
+step is to run the algorithm of Section to
+recover `baseSignature`, `publicKey`, `hmacKey`, `signatures`, and
+`mandatoryPointers` as shown below.
+
+
+
+Next the holder needs to indicate what, if anything else, they wish to reveal
+to the verifiers by specifying JSON pointers for selective disclosure. In our
+windsurfing competition scenario a sailor (the holder) has just completed their
+first day of racing and wishes to reveal to the general public (the verifiers)
+all the details of the windsurfing boards they used in the competition. These are
+shown below. Note that this slightly overlaps with the mandatory disclosed
+information which included only the year of their most recent board.
+
+
+
+To produce the `revealDocument`, i.e., the unsigned document that will
+eventually be signed and sent to the verifier we append the selective pointers
+to the mandatory pointers and input these combined pointers along with the
+document without proof to the algorithm of Section
+to give the result shown below.
+
+
+
+Now that we know what the revealed document looks like we need to furnish
+appropriately updated information to the verifier on which statements are
+mandatory, the signatures for the selected non-mandatory statements, and the
+mapping between canonical blank node ids for the reveal document and a subset of
+the HMAC blank node ids. Running step 6 of the
+ yields an abundance of information about
+various statement groups relative to the original document. Below we show just a
+portion of the indexes for those groups.
+
+
+
+To do: adjusted mandatory indexes
+
+
+To do: adjusted signature/selective indexes and filtered signatures
+
+
+To do: label map
+
From fccba606aef94c4d4ffdbb301856cef1461f6c5a Mon Sep 17 00:00:00 2001
From: Wind4Greg
Date: Thu, 7 Sep 2023 08:40:16 -0700
Subject: [PATCH 4/8] First draft complete.
---
.../derivedAdjMandatoryIndexes.json | 3 ++
.../ecdsa-sd-2023/derivedAdjSignatures.json | 10 ++++
.../ecdsa-sd-2023/derivedDisclosureData.json | 23 +++++++++
.../ecdsa-sd-2023/derivedRevealDocument.json | 44 +++++++++++++++++
index.html | 47 +++++++++++++++++--
5 files changed, 123 insertions(+), 4 deletions(-)
create mode 100644 TestVectors/ecdsa-sd-2023/derivedAdjMandatoryIndexes.json
create mode 100644 TestVectors/ecdsa-sd-2023/derivedAdjSignatures.json
create mode 100644 TestVectors/ecdsa-sd-2023/derivedDisclosureData.json
create mode 100644 TestVectors/ecdsa-sd-2023/derivedRevealDocument.json
diff --git a/TestVectors/ecdsa-sd-2023/derivedAdjMandatoryIndexes.json b/TestVectors/ecdsa-sd-2023/derivedAdjMandatoryIndexes.json
new file mode 100644
index 0000000..88112b3
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/derivedAdjMandatoryIndexes.json
@@ -0,0 +1,3 @@
+{
+ "adjMandatoryIndexes":[2, 3, 4, 5, 9, 10, 12, 13, 14, 15, 16, 17]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/derivedAdjSignatures.json b/TestVectors/ecdsa-sd-2023/derivedAdjSignatures.json
new file mode 100644
index 0000000..634e8b9
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/derivedAdjSignatures.json
@@ -0,0 +1,10 @@
+{
+ "adjSignatureIndexes":[3, 4, 5, 6, 7, 11],
+ "filteredSignatures":[
+ "6d030c724a5c300128d79582e82f0ca376c2116146b4e4e4331343f8b24c75f9024a8bc1ed19c247b497ce4e7ed1856282d27917383bd400286f9ca0d5634d93",
+ "a501e56111a551592ff965f53a3258275f4ec3b8a9bd5c14be6f744a7dc88cd44bbb2f69af90c79b7c1595530f5692ea8d2f84f3f8c90de255e696346df2bf03",
+ "3bf1e3d2fc6cb89673a551ad82830a2b666518abe12d7dffbd40af74bf8c4e5b3356bda20b75c9a426ce73c07f5bf3a7f9cb1a2cfcd44af9520ed35e73565593",
+ "766d87b78b2ffde737b351d1a9eba5fbec841b1e12ae9c3235045d2dae592b224382aaf887e12d54dcdcf89f95965bcaac737cc012ad52a6aba88e0da67af1ed",
+ "39130b5d8cf7979f4ecdced20e4d9e8fb725adeafd067e9e6815101bbef702a439e9b73ea065de7a67a4c1908d1e314b38448da0dabba9eb4ef0545b8851dbe0",
+ "bd25bdabcf112d9f6559d83665e2be71ff9c16553f3e3ab1d5b515017307437b5fe097e3d8850dbabcb71337cedec8f75585fb743be5113b53d07627debf834a"]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/derivedDisclosureData.json b/TestVectors/ecdsa-sd-2023/derivedDisclosureData.json
new file mode 100644
index 0000000..1027e43
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/derivedDisclosureData.json
@@ -0,0 +1,23 @@
+{
+ "baseSignature": "5a26e45631504cf42f445b751f01677d5c4b33d89b90d6750429103a8c7ca54a81ca365079d96772920a35e561ef663882fbd4e89d4d10ccab0ce78c5f7d9103",
+ "publicKey": "zDnaeTHfhmSaQKBc7CmdL3K7oYg3D6SC7yowe2eBeVd2DH32r",
+ "signatures": [
+ "6d030c724a5c300128d79582e82f0ca376c2116146b4e4e4331343f8b24c75f9024a8bc1ed19c247b497ce4e7ed1856282d27917383bd400286f9ca0d5634d93",
+ "a501e56111a551592ff965f53a3258275f4ec3b8a9bd5c14be6f744a7dc88cd44bbb2f69af90c79b7c1595530f5692ea8d2f84f3f8c90de255e696346df2bf03",
+ "3bf1e3d2fc6cb89673a551ad82830a2b666518abe12d7dffbd40af74bf8c4e5b3356bda20b75c9a426ce73c07f5bf3a7f9cb1a2cfcd44af9520ed35e73565593",
+ "766d87b78b2ffde737b351d1a9eba5fbec841b1e12ae9c3235045d2dae592b224382aaf887e12d54dcdcf89f95965bcaac737cc012ad52a6aba88e0da67af1ed",
+ "39130b5d8cf7979f4ecdced20e4d9e8fb725adeafd067e9e6815101bbef702a439e9b73ea065de7a67a4c1908d1e314b38448da0dabba9eb4ef0545b8851dbe0",
+ "bd25bdabcf112d9f6559d83665e2be71ff9c16553f3e3ab1d5b515017307437b5fe097e3d8850dbabcb71337cedec8f75585fb743be5113b53d07627debf834a"
+ ],
+ "labelMap": {
+ "dataType": "Map",
+ "value": [
+ ["c14n0", "u4YIOZn1MHES1Z4Ij2hWZG3R4dEYBqg5fHTyDEvYhC38"],
+ ["c14n1", "uk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDk"],
+ ["c14n2", "uVkUuBrlOaELGVQWJD4M_qW5bcKEHWGNbOrPA_qAOKKw"],
+ ["c14n3", "ukR2991GJuy_Tkjem_x7pLVpS4C4GkZAcuGtiPhBfSSc"],
+ ["c14n4", "uQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U0"]
+ ]
+ },
+ "mandatoryIndexes": [2, 3, 4, 5, 9, 10, 12, 13, 14, 15, 16, 17]
+}
\ No newline at end of file
diff --git a/TestVectors/ecdsa-sd-2023/derivedRevealDocument.json b/TestVectors/ecdsa-sd-2023/derivedRevealDocument.json
new file mode 100644
index 0000000..3a4c4d3
--- /dev/null
+++ b/TestVectors/ecdsa-sd-2023/derivedRevealDocument.json
@@ -0,0 +1,44 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/credentials/v2",
+ {
+ "@vocab": "https://windsurf.grotto-networking.com/selective#"
+ }
+ ],
+ "type": [
+ "VerifiableCredential"
+ ],
+ "sailNumber": "Earth101",
+ "sails": [
+ {
+ "size": 6.1,
+ "sailName": "Lahaina",
+ "year": 2023
+ },
+ {
+ "size": 7,
+ "sailName": "Lahaina",
+ "year": 2020
+ }
+ ],
+ "boards": [
+ {
+ "year": 2022,
+ "boardName": "CompFoil170",
+ "brand": "Wailea"
+ },
+ {
+ "boardName": "Kanaha Custom",
+ "brand": "Wailea",
+ "year": 2019
+ }
+ ],
+ "proof": {
+ "type": "DataIntegrityProof",
+ "cryptosuite": "ecdsa-sd-2023",
+ "created": "2023-08-15T23:36:38Z",
+ "verificationMethod": "did:key:zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP#zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
+ "proofPurpose": "assertionMethod",
+ "proofValue": "u2V0BhVhAWibkVjFQTPQvRFt1HwFnfVxLM9ibkNZ1BCkQOox8pUqByjZQedlncpIKNeVh72Y4gvvU6J1NEMyrDOeMX32RA1gjgCQCKnLOGbY_FuM-ASpSkkOxsIR2E8n7Ml2q1UQ6tEwzi5OGWEBtAwxySlwwASjXlYLoLwyjdsIRYUa05OQzE0P4skx1-QJKi8HtGcJHtJfOTn7RhWKC0nkXODvUAChvnKDVY02TWEClAeVhEaVRWS_5ZfU6MlgnX07DuKm9XBS-b3RKfciM1Eu7L2mvkMebfBWVUw9WkuqNL4Tz-MkN4lXmljRt8r8DWEA78ePS_Gy4lnOlUa2CgworZmUYq-Etff-9QK90v4xOWzNWvaILdcmkJs5zwH9b86f5yxos_NRK-VIO015zVlWTWEB2bYe3iy_95zezUdGp66X77IQbHhKunDI1BF0trlkrIkOCqviH4S1U3Nz4n5WWW8qsc3zAEq1Spquojg2mevHtWEA5EwtdjPeXn07NztIOTZ6PtyWt6v0Gfp5oFRAbvvcCpDnptz6gZd56Z6TBkI0eMUs4RI2g2rup607wVFuIUdvgWEC9Jb2rzxEtn2VZ2DZl4r5x_5wWVT8-OrHVtRUBcwdDe1_gl-PYhQ26vLcTN87eyPdVhft0O-URO1PQdifev4NKpQBYIOGCDmZ9TBxEtWeCI9oVmRt0eHRGAaoOXx08gxL2IQt_AVggk0AeXgJ4e6m1XsV5-xFud0L_1mUjZ9Mffhg5aZGTyDkCWCBWRS4GuU5oQsZVBYkPgz-pbltwoQdYY1s6s8D-oA4orANYIJEdvfdRibsv05I3pv8e6S1aUuAuBpGQHLhrYj4QX0knBFggQ-qOZUDlozRsGk46ux9gp9fjT28Fy3g3nctmMoqi_U2MAgMEBQkKDA0ODxAR"
+ }
+}
\ No newline at end of file
diff --git a/index.html b/index.html
index e84008f..3d4fc71 100644
--- a/index.html
+++ b/index.html
@@ -3226,6 +3226,16 @@ Representation: ecdsa-jcs-2019 with curve P-384
Representation: ecdsa-sd-2023
+
+To demonstrate selective disclosure features including mandatory disclosure,
+selective disclosure, and overlap between mandatory and selective disclosure
+requires an input credential document with more content than previous test
+vectors. To avoid excessively long test vectors the starting document is based
+on a purely ficticious windsurfing (sailing) competition scenario. In addition
+we break the test vectors into two groups based on those that would be generated
+by the issuer (base proof) and those that would be generated by the holder
+(derived proof).
+
Add Base Proof
@@ -3377,20 +3387,49 @@
Add Derived Proof
mapping between canonical blank node ids for the reveal document and a subset of
the HMAC blank node ids. Running step 6 of the
yields an abundance of information about
-various statement groups relative to the original document. Below we show just a
+various statement groups relative to the original document. Below we show a
portion of the indexes for those groups.
-To do: adjusted mandatory indexes
+The verifier needs to be able to aggregate and hash the mandatory statements. To
+enable this we furnish them with a list of indexes of the mandatory statements
+adjusted to their positions in the reveal document. In the previous example the
+`combinedIndexes` show the indexes of all the original nquads (statements) that
+make up the reveal document, in order. To come up with the adjusted mandatory
+indexes shown below we obtain the index of each of original mandatory indexes
+relative to the `combinedIndexes` as shown below.
+
+
+
+We have to furnish the verifier with a list of signatures for those selective
+statements (nquads) that are not mandatory. The original list of signatures
+corresponds to every non-mandatory statement and the indexes of these in the
+original document are given above. We now compute a list of adjusted signature
+indexes by computing the index of each selective index in the non-mandatory
+index list, ignoring any selective index not present in the list. We then use
+the adjusted signature indexes to obtain the filtered signature list. These
+lists are shown below.
+
-To do: adjusted signature/selective indexes and filtered signatures
+The last important piece of disclosure data is a mapping of canonical blank node
+ids to HMAC based ids, the `labelMap`, computed according to Section
+ steps 12-14. This is shown below along with
+the rest of the disclosure data minus the reveal document.
+
-To do: label map
+Finally using the disclosure data above with the algorithm of Section
+ we obtain the signed derived (reveal)
+document shown below.
+
From 3dc20ea7be2ca4a33434339d187373f36dc522f6 Mon Sep 17 00:00:00 2001
From: Wind4Greg
Date: Thu, 7 Sep 2023 09:05:30 -0700
Subject: [PATCH 5/8] Remove "must" in description of mandatory reveal.
---
index.html | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/index.html b/index.html
index 3d4fc71..ec15cb1 100644
--- a/index.html
+++ b/index.html
@@ -3230,14 +3230,14 @@ Representation: ecdsa-sd-2023
To demonstrate selective disclosure features including mandatory disclosure,
selective disclosure, and overlap between mandatory and selective disclosure
requires an input credential document with more content than previous test
-vectors. To avoid excessively long test vectors the starting document is based
-on a purely ficticious windsurfing (sailing) competition scenario. In addition
-we break the test vectors into two groups based on those that would be generated
-by the issuer (base proof) and those that would be generated by the holder
-(derived proof).
+vectors. To avoid excessively long test vectors the starting document test
+vector is based on a purely ficticious windsurfing (sailing) competition
+scenario. In addition we break the test vectors into two groups based on those
+that would be generated by the issuer (base proof) and those that would be
+generated by the holder (derived proof).
- Add Base Proof
+ Base Proof
In order to add a selective disclosure base proof to a document the issuer needs
the following cryptographic key material:
@@ -3278,10 +3278,11 @@
Add Base Proof
data-include-format="text">
In addition to let other sailors know what kinds of equipment their competitors
-maybe sailing on each sailor must disclose the year of their most recent
-windsurfing board and full details on two of their sails. Note that all sailors
-are identified by a sail number that is printed on all their equipment. This
-information is specified via an array of JSON pointers as shown below.
+maybe sailing on it is mandatory that each sailor disclose the year of their
+most recent windsurfing board and full details on two of their sails. Note that
+all sailors are identified by a sail number that is printed on all their
+equipment. This mandatory information is specified via an array of JSON pointers
+as shown below.
@@ -3349,7 +3350,7 @@ Add Base Proof
data-include-format="text">
- Add Derived Proof
+ Derived Proof
In order to create a derived proof a holder starts with a signed document
containing a base proof. The base document we will use for these test vectors is
@@ -3361,19 +3362,19 @@
Add Derived Proof
-Next the holder needs to indicate what, if anything else, they wish to reveal
+Next, the holder needs to indicate what, if anything else, they wish to reveal
to the verifiers by specifying JSON pointers for selective disclosure. In our
windsurfing competition scenario a sailor (the holder) has just completed their
first day of racing and wishes to reveal to the general public (the verifiers)
-all the details of the windsurfing boards they used in the competition. These are
-shown below. Note that this slightly overlaps with the mandatory disclosed
+all the details of the windsurfing boards they used in the competition. These
+are shown below. Note that this slightly overlaps with the mandatory disclosed
information which included only the year of their most recent board.
To produce the `revealDocument`, i.e., the unsigned document that will
-eventually be signed and sent to the verifier we append the selective pointers
+eventually be signed and sent to the verifier, we append the selective pointers
to the mandatory pointers and input these combined pointers along with the
document without proof to the algorithm of Section
to give the result shown below.
@@ -3381,7 +3382,7 @@
Add Derived Proof
-Now that we know what the revealed document looks like we need to furnish
+Now that we know what the revealed document looks like, we need to furnish
appropriately updated information to the verifier on which statements are
mandatory, the signatures for the selected non-mandatory statements, and the
mapping between canonical blank node ids for the reveal document and a subset of
From 650a9b52f088248aeca244f781e65ad16947e292 Mon Sep 17 00:00:00 2001
From: Wind4Greg
Date: Thu, 7 Sep 2023 09:31:34 -0700
Subject: [PATCH 6/8] Fix reference to base proof.
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index ec15cb1..8fd9c67 100644
--- a/index.html
+++ b/index.html
@@ -3354,7 +3354,7 @@ Derived Proof
In order to create a derived proof a holder starts with a signed document
containing a base proof. The base document we will use for these test vectors is
-the final example from Section above. The first
+the final example from Section above. The first
step is to run the algorithm of Section to
recover `baseSignature`, `publicKey`, `hmacKey`, `signatures`, and
`mandatoryPointers` as shown below.
From 470193baa0dcc71911804455cd4f7c84cb98c2ac Mon Sep 17 00:00:00 2001
From: Greg Bernstein
Date: Mon, 18 Sep 2023 10:18:25 -0700
Subject: [PATCH 7/8] Update TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
Non-normative re-grouping and renaming of key parameters used in test vector.
Co-authored-by: Dave Longley
---
TestVectors/ecdsa-sd-2023/SDKeyMaterial.json | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json b/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
index 9ec9426..773aea7 100644
--- a/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
+++ b/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
@@ -1,7 +1,11 @@
{
- "publicKeyMultibase": "zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
- "privateKeyMultibase": "z42twTcNeSYcnqg1FLuSFs2bsGH3ZqbRHFmvS9XMsYhjxvHN",
- "proofPublicKeyMultibase": "zDnaeTHfhmSaQKBc7CmdL3K7oYg3D6SC7yowe2eBeVd2DH32r",
- "proofPrivateKeyMultibase": "z42tqvNGyzyXRzotAYn43UhcFtzDUVdxJ7461fwrfhBPLmfY",
+ "baseKeyPair": {
+ "publicKeyMultibase": "zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
+ "privateKeyMultibase": "z42twTcNeSYcnqg1FLuSFs2bsGH3ZqbRHFmvS9XMsYhjxvHN"
+ },
+ "proofKeyPair": {
+ "publicKeyMultibase": "zDnaeTHfhmSaQKBc7CmdL3K7oYg3D6SC7yowe2eBeVd2DH32r",
+ "privateKeyMultibase": "z42tqvNGyzyXRzotAYn43UhcFtzDUVdxJ7461fwrfhBPLmfY"
+ },
"hmacKeyString": "00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF"
}
\ No newline at end of file
From 2883fcc223b533521c3b4e6709f579ee0e0e638f Mon Sep 17 00:00:00 2001
From: Greg Bernstein
Date: Mon, 18 Sep 2023 10:37:48 -0700
Subject: [PATCH 8/8] Update TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
Non-normative change to rename privateKeyMultibase to secretKeyMultibase in line with recent agreements.
Co-authored-by: Dave Longley
---
TestVectors/ecdsa-sd-2023/SDKeyMaterial.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json b/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
index 773aea7..c3b6dde 100644
--- a/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
+++ b/TestVectors/ecdsa-sd-2023/SDKeyMaterial.json
@@ -1,11 +1,11 @@
{
"baseKeyPair": {
"publicKeyMultibase": "zDnaepBuvsQ8cpsWrVKw8fbpGpvPeNSjVPTWoq6cRqaYzBKVP",
- "privateKeyMultibase": "z42twTcNeSYcnqg1FLuSFs2bsGH3ZqbRHFmvS9XMsYhjxvHN"
+ "secretKeyMultibase": "z42twTcNeSYcnqg1FLuSFs2bsGH3ZqbRHFmvS9XMsYhjxvHN"
},
"proofKeyPair": {
"publicKeyMultibase": "zDnaeTHfhmSaQKBc7CmdL3K7oYg3D6SC7yowe2eBeVd2DH32r",
- "privateKeyMultibase": "z42tqvNGyzyXRzotAYn43UhcFtzDUVdxJ7461fwrfhBPLmfY"
+ "secretKeyMultibase": "z42tqvNGyzyXRzotAYn43UhcFtzDUVdxJ7461fwrfhBPLmfY"
},
"hmacKeyString": "00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF"
}
\ No newline at end of file