From 496a0ecee2b8ffa6568805268f24925a6412d981 Mon Sep 17 00:00:00 2001 From: Torsten Lodderstedt Date: Fri, 10 Feb 2023 17:44:38 +0100 Subject: [PATCH] example of a sd-jwt pid --- examples/pid/combined_issuance.txt | 43 +++++ examples/pid/combined_presentation.txt | 32 ++++ examples/pid/disclosures.md | 218 +++++++++++++++++++++++++ examples/pid/hb_jwt_serialized.txt | 0 examples/pid/sd_jwt_payload.json | 31 ++++ examples/pid/sd_jwt_serialized.txt | 19 +++ examples/pid/user_claims.json | 46 ++++++ examples/pid/verified_contents.json | 35 ++++ sd_jwt/examples/pid.yml | 63 +++++++ 9 files changed, 487 insertions(+) create mode 100644 examples/pid/combined_issuance.txt create mode 100644 examples/pid/combined_presentation.txt create mode 100644 examples/pid/disclosures.md create mode 100644 examples/pid/hb_jwt_serialized.txt create mode 100644 examples/pid/sd_jwt_payload.json create mode 100644 examples/pid/sd_jwt_serialized.txt create mode 100644 examples/pid/user_claims.json create mode 100644 examples/pid/verified_contents.json create mode 100644 sd_jwt/examples/pid.yml diff --git a/examples/pid/combined_issuance.txt b/examples/pid/combined_issuance.txt new file mode 100644 index 00000000..90780d56 --- /dev/null +++ b/examples/pid/combined_issuance.txt @@ -0,0 +1,43 @@ +eyJhbGciOiAiRVMyNTYifQ.eyJfc2QiOiBbIlE0bHpHWWstSzdMc2dvUm5aX1JCcTN6d +GNKcVItY0RkM2E4WjdfeGk3WUUiXSwgImlzcyI6ICJodHRwczovL2V4YW1wbGUuY29tL +2lzc3VlciIsICJpYXQiOiAxNTE2MjM5MDIyLCAidHlwZSI6ICJQZXJzb25JZGVudGlma +WNhdGlvbkRhdGEiLCAiY3JlZGVudGlhbFN1YmplY3QiOiB7Il9zZCI6IFsiMThVOEtTU +kJzSGlSaS1Mc203dU1ueWgtVXBudFVVc3F1NXBESldNNWNJSSIsICI0eFNXT2ZXTUliM +V9zazlJU3Q3dEdLMmhqMEtZY2Y1djJCY2pGUERvVk1BIiwgIkNGQnpNYnpWNF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KZFRLeENpakNnIiwgImxvY2FsaXR5 +IiwgIklyZ2VuZHdvIl0~WyJWX2tMbDdDWEwzU21xUHprYXdIZmhBIiwgInN0cmVldF9h +ZGRyZXNzIiwgIlNvbm5lbnN0cmFzc2UgMjMiXQ~WyJJbGpoODlOU241OEVWS19ncUYyc +W93IiwgImNvdW50cnlfY29kZSIsICJERSJd~WyJtRGVYRWt0ckVaM0pULUZXTmdMWWJn +IiwgImlzX292ZXJfMTgiLCB0cnVlXQ~WyJ2a0RBNER4d2NtT3hjRlRpcDlnZ2xnIiwgI +mlzX292ZXJfMjEiLCB0cnVlXQ~WyJiVEhSZFZRWWN5MHl3V0tzRHg2MF9nIiwgImlzX2 +92ZXJfNjUiLCBmYWxzZV0 \ No newline at end of file diff --git a/examples/pid/combined_presentation.txt b/examples/pid/combined_presentation.txt new file mode 100644 index 00000000..61e7a169 --- /dev/null +++ b/examples/pid/combined_presentation.txt @@ -0,0 +1,32 @@ +eyJhbGciOiAiRVMyNTYifQ.eyJfc2QiOiBbIlE0bHpHWWstSzdMc2dvUm5aX1JCcTN6d +GNKcVItY0RkM2E4WjdfeGk3WUUiXSwgImlzcyI6ICJodHRwczovL2V4YW1wbGUuY29tL +2lzc3VlciIsICJpYXQiOiAxNTE2MjM5MDIyLCAidHlwZSI6ICJQZXJzb25JZGVudGlma +WNhdGlvbkRhdGEiLCAiY3JlZGVudGlhbFN1YmplY3QiOiB7Il9zZCI6IFsiMThVOEtTU +kJzSGlSaS1Mc203dU1ueWgtVXBudFVVc3F1NXBESldNNWNJSSIsICI0eFNXT2ZXTUliM +V9zazlJU3Q3dEdLMmhqMEtZY2Y1djJCY2pGUERvVk1BIiwgIkNGQnpNYnpWNFViOWNQY +zJlMzVMSUd6emJiem1PWWk5bGlCeFJZMEdwRTQiLCAiRG9RNnFRc1M5cUdHSUltb2dyS +V96TWN2bFliV213Nm85Q0hCeFV0Z3BRVSIsICJMYjdkLThGcHJ0R05uWkxPR2JWQ1pHT +3NYZE5heXA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DdfUk41dzZDZjBoNFF5UTV2LTY1WUdqUV +IwX0YgRFcyUXZ6cVkzNjhRUU1pY0F0YVNxenM4S0paZ25ZYjljN2QwemdkQVpIenU2cU +1RdlJMNWhhanJuMW45IDFDYk9wYklTRDA4cU5MeXJka3QtYkZUV2hBSTR2TVFGaDZXZV +p1MGZNNGxGZDJOY1J3cjNYUGtzSU5IYSBRLUdfeEJuaUlxYncwTHMxakY0NC1jc0ZDdX +Ita0VnVThhd2FwSnpLbnFES2d3IiwgImUiOiAiQVFBQiJ9fX0sIHsidHlwZSI6ICJCaW +9tZXRyaWNCaW5kaW5nMjAyMiIsICJ0ZW1wbGF0ZSI6ICIuLi4ifV1d~WyJzeUEwb2hmO +HRuYUU0VjZaeG9tczZBIiwgImJpcnRoZGF0ZSIsICIxOTczLTAxLTAxIl0~WyJrOU9aV +2VoUE83LTNsbWxYYy04NnNBIiwgImZhbWlseV9uYW1lIiwgIk11c3Rlcm1hbm4iXQ~Wy +JyVnBCR1JMSWNYTFl1c29PeXdqU2JRIiwgImdpdmVuX25hbWUiLCAiRXJpa2EiXQ~ \ No newline at end of file diff --git a/examples/pid/disclosures.md b/examples/pid/disclosures.md new file mode 100644 index 00000000..7a10548f --- /dev/null +++ b/examples/pid/disclosures.md @@ -0,0 +1,218 @@ +__Disclosure for `binding`:__ + +``` +WyJfZjVNMktRWFZ0amNKWkhOQ1ViUzdnIiwgImJpbmRpbmciLCBbeyJ0eXBlIjogIkNy +eXB0b2dyYXBoaWNCaW5kaW5nMjAyMiIsICJjbmYiOiB7Imp3ayI6IHsia3R5IjogIlJT +QSIsICJuIjogIjB2eDdhZ29lYkdjUVN1dVBpTEpYWnB0TjlubmRyUW1iWEVwczJhaUFG +YldoTTc4TGhXeDRjYmJmIEFBdFZUODZ6d3UxUks3YVBGRnh1aERSMUw2dFNvY19CSkVD +UGViV0tSWGpCWkNpRlY0bjNva25qaE1zdCBuNjR0Wl8yVy01SnNHWTRIYzVuOXlCWEFy +d2w5M2xxdDdfUk41dzZDZjBoNFF5UTV2LTY1WUdqUVIwX0YgRFcyUXZ6cVkzNjhRUU1p +Y0F0YVNxenM4S0paZ25ZYjljN2QwemdkQVpIenU2cU1RdlJMNWhhanJuMW45IDFDYk9w +YklTRDA4cU5MeXJka3QtYkZUV2hBSTR2TVFGaDZXZVp1MGZNNGxGZDJOY1J3cjNYUGtz +SU5IYSBRLUdfeEJuaUlxYncwTHMxakY0NC1jc0ZDdXIta0VnVThhd2FwSnpLbnFES2d3 +IiwgImUiOiAiQVFBQiJ9fX0sIHsidHlwZSI6ICJCaW9tZXRyaWNCaW5kaW5nMjAyMiIs +ICJ0ZW1wbGF0ZSI6ICIuLi4ifV1d +``` + +Contents: + +``` +["_f5M2KQXVtjcJZHNCUbS7g", "binding", [{"type": +"CryptographicBinding2022", "cnf": {"jwk": {"kty": "RSA", "n": +"0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbf +AAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMst +n64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_F +DW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n9 +1CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHa +Q-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", "e": "AQAB"}}}, +{"type": "BiometricBinding2022", "template": "..."}]] +``` + +SHA-256 Hash: `Q4lzGYk-K7LsgoRnZ_RBq3ztcJqR-cDd3a8Z7_xi7YE` + +__Disclosure for `given_name`:__ + +``` +WyJyVnBCR1JMSWNYTFl1c29PeXdqU2JRIiwgImdpdmVuX25hbWUiLCAiRXJpa2EiXQ +``` + +Contents: + +``` +["rVpBGRLIcXLYusoOywjSbQ", "given_name", "Erika"] +``` + +SHA-256 Hash: `cMgR5Kc_WSkxkWBN6vulv-PBA3Jd2sJh54UKJmXCqs4` + +__Disclosure for `family_name`:__ + +``` +WyJrOU9aV2VoUE83LTNsbWxYYy04NnNBIiwgImZhbWlseV9uYW1lIiwgIk11c3Rlcm1h +bm4iXQ +``` + +Contents: + +``` +["k9OZWehPO7-3lmlXc-86sA", "family_name", "Mustermann"] +``` + +SHA-256 Hash: `4xSWOfWMIb1_sk9ISt7tGK2hj0KYcf5v2BcjFPDoVMA` + +__Disclosure for `nationalities`:__ + +``` +WyJoQmNidm9xNFZrQzJXUEE5LW80dUZBIiwgIm5hdGlvbmFsaXRpZXMiLCBbIkRFIl1d +``` + +Contents: + +``` +["hBcbvoq4VkC2WPA9-o4uFA", "nationalities", ["DE"]] +``` + +SHA-256 Hash: `CFBzMbzV4Ub9cPc2e35LIGzzbbzmOYi9liBxRY0GpE4` + +__Disclosure for `birth_family_name`:__ + +``` +WyJpaTJSbkFiU2pYTXUydkRZQnU2RDl3IiwgImJpcnRoX2ZhbWlseV9uYW1lIiwgIlNj +aG1pZHQiXQ +``` + +Contents: + +``` +["ii2RnAbSjXMu2vDYBu6D9w", "birth_family_name", "Schmidt"] +``` + +SHA-256 Hash: `Lb7d-8FprtGNnZLOGbVCZGOsXdNayp1rVegj83_oFf8` + +__Disclosure for `birthdate`:__ + +``` +WyJzeUEwb2hmOHRuYUU0VjZaeG9tczZBIiwgImJpcnRoZGF0ZSIsICIxOTczLTAxLTAx +Il0 +``` + +Contents: + +``` +["syA0ohf8tnaE4V6Zxoms6A", "birthdate", "1973-01-01"] +``` + +SHA-256 Hash: `18U8KSRBsHiRi-Lsm7uMnyh-UpntUUsqu5pDJWM5cII` + +__Disclosure for `place_of_birth`:__ + +``` +WyJjQlp3UDA4T1VpaWRmaExDQTJvcE13IiwgInBsYWNlX29mX2JpcnRoIiwgIlJlZ2Vu +c2J1cmciXQ +``` + +Contents: + +``` +["cBZwP08OUiidfhLCA2opMw", "place_of_birth", "Regensburg"] +``` + +SHA-256 Hash: `YTeCtVywmBqoxh-xynDFIJtq77TuhKlKsm9ok2YbC1o` + +__Disclosure for `postal_code`:__ + +``` +WyJIQUNhbHpsVE1nNlVwX3hfME53eE1RIiwgInBvc3RhbF9jb2RlIiwgIjEyMzQ1Il0 +``` + +Contents: + +``` +["HACalzlTMg6Up_x_0NwxMQ", "postal_code", "12345"] +``` + +SHA-256 Hash: `wrp5pBnFRPfphe6a-43gHFHk0UFYH9cCKsruEchHieg` + +__Disclosure for `locality`:__ + +``` +WyJtQ29iTFJKVU9oZUtKZFRLeENpakNnIiwgImxvY2FsaXR5IiwgIklyZ2VuZHdvIl0 +``` + +Contents: + +``` +["mCobLRJUOheKJdTKxCijCg", "locality", "Irgendwo"] +``` + +SHA-256 Hash: `5evAfvcviIwacDTpGNGZbLbxQHvYN9eh08b0i_vxEo0` + +__Disclosure for `street_address`:__ + +``` +WyJWX2tMbDdDWEwzU21xUHprYXdIZmhBIiwgInN0cmVldF9hZGRyZXNzIiwgIlNvbm5l +bnN0cmFzc2UgMjMiXQ +``` + +Contents: + +``` +["V_kLl7CXL3SmqPzkawHfhA", "street_address", "Sonnenstrasse 23"] +``` + +SHA-256 Hash: `O4ZvmWqMI9UqRGZ-lRpS5Qb7-eT7O11I8Vx86jsn-nA` + +__Disclosure for `country_code`:__ + +``` +WyJJbGpoODlOU241OEVWS19ncUYycW93IiwgImNvdW50cnlfY29kZSIsICJERSJd +``` + +Contents: + +``` +["Iljh89NSn58EVK_gqF2qow", "country_code", "DE"] +``` + +SHA-256 Hash: `n_10L3d78RLKmApaL1OTaLskrygoHlzNdTaBYuJig3M` + +__Disclosure for `is_over_18`:__ + +``` +WyJtRGVYRWt0ckVaM0pULUZXTmdMWWJnIiwgImlzX292ZXJfMTgiLCB0cnVlXQ +``` + +Contents: + +``` +["mDeXEktrEZ3JT-FWNgLYbg", "is_over_18", true] +``` + +SHA-256 Hash: `aGOyZ7mC3XmZXR9w-30VLizgz-vwyyZlkuMpRqvMIx4` + +__Disclosure for `is_over_21`:__ + +``` +WyJ2a0RBNER4d2NtT3hjRlRpcDlnZ2xnIiwgImlzX292ZXJfMjEiLCB0cnVlXQ +``` + +Contents: + +``` +["vkDA4DxwcmOxcFTip9gglg", "is_over_21", true] +``` + +SHA-256 Hash: `DoQ6qQsS9qGGIImogrI_zMcvlYbWmw6o9CHBxUtgpQU` + +__Disclosure for `is_over_65`:__ + +``` +WyJiVEhSZFZRWWN5MHl3V0tzRHg2MF9nIiwgImlzX292ZXJfNjUiLCBmYWxzZV0 +``` + +Contents: + +``` +["bTHRdVQYcy0ywWKsDx60_g", "is_over_65", false] +``` + +SHA-256 Hash: `f-rht-usD5F4mkwdriZW4Zu1l4wX9AOLrW4J8wpllEw` \ No newline at end of file diff --git a/examples/pid/hb_jwt_serialized.txt b/examples/pid/hb_jwt_serialized.txt new file mode 100644 index 00000000..e69de29b diff --git a/examples/pid/sd_jwt_payload.json b/examples/pid/sd_jwt_payload.json new file mode 100644 index 00000000..e0d36b3c --- /dev/null +++ b/examples/pid/sd_jwt_payload.json @@ -0,0 +1,31 @@ +{ + "_sd": [ + "Q4lzGYk-K7LsgoRnZ_RBq3ztcJqR-cDd3a8Z7_xi7YE" + ], + "iss": "https://example.com/issuer", + "iat": 1516239022, + "type": "PersonIdentificationData", + "credentialSubject": { + "_sd": [ + "18U8KSRBsHiRi-Lsm7uMnyh-UpntUUsqu5pDJWM5cII", + "4xSWOfWMIb1_sk9ISt7tGK2hj0KYcf5v2BcjFPDoVMA", + "CFBzMbzV4Ub9cPc2e35LIGzzbbzmOYi9liBxRY0GpE4", + "DoQ6qQsS9qGGIImogrI_zMcvlYbWmw6o9CHBxUtgpQU", + "Lb7d-8FprtGNnZLOGbVCZGOsXdNayp1rVegj83_oFf8", + "YTeCtVywmBqoxh-xynDFIJtq77TuhKlKsm9ok2YbC1o", + "aGOyZ7mC3XmZXR9w-30VLizgz-vwyyZlkuMpRqvMIx4", + "cMgR5Kc_WSkxkWBN6vulv-PBA3Jd2sJh54UKJmXCqs4", + "f-rht-usD5F4mkwdriZW4Zu1l4wX9AOLrW4J8wpllEw" + ], + "address": { + "_sd": [ + "5evAfvcviIwacDTpGNGZbLbxQHvYN9eh08b0i_vxEo0", + "O4ZvmWqMI9UqRGZ-lRpS5Qb7-eT7O11I8Vx86jsn-nA", + "n_10L3d78RLKmApaL1OTaLskrygoHlzNdTaBYuJig3M", + "wrp5pBnFRPfphe6a-43gHFHk0UFYH9cCKsruEchHieg" + ] + } + }, + "exp": 1516247022, + "_sd_alg": "sha-256" +} \ No newline at end of file diff --git a/examples/pid/sd_jwt_serialized.txt b/examples/pid/sd_jwt_serialized.txt new file mode 100644 index 00000000..67da0e05 --- /dev/null +++ b/examples/pid/sd_jwt_serialized.txt @@ -0,0 +1,19 @@ +eyJhbGciOiAiRVMyNTYifQ.eyJfc2QiOiBbIlE0bHpHWWstSzdMc2dvUm5aX1JCcTN6d +GNKcVItY0RkM2E4WjdfeGk3WUUiXSwgImlzcyI6ICJodHRwczovL2V4YW1wbGUuY29tL +2lzc3VlciIsICJpYXQiOiAxNTE2MjM5MDIyLCAidHlwZSI6ICJQZXJzb25JZGVudGlma +WNhdGlvbkRhdGEiLCAiY3JlZGVudGlhbFN1YmplY3QiOiB7Il9zZCI6IFsiMThVOEtTU +kJzSGlSaS1Mc203dU1ueWgtVXBudFVVc3F1NXBESldNNWNJSSIsICI0eFNXT2ZXTUliM +V9zazlJU3Q3dEdLMmhqMEtZY2Y1djJCY2pGUERvVk1BIiwgIkNGQnpNYnpWNFViOWNQY +zJlMzVMSUd6emJiem1PWWk5bGlCeFJZMEdwRTQiLCAiRG9RNnFRc1M5cUdHSUltb2dyS +V96TWN2bFliV213Nm85Q0hCeFV0Z3BRVSIsICJMYjdkLThGcHJ0R05uWkxPR2JWQ1pHT +3NYZE5heXAxclZlZ2o4M19vRmY4IiwgIllUZUN0Vnl3bUJxb3hoLXh5bkRGSUp0cTc3V +HVoS2xLc205b2syWWJDMW8iLCAiYUdPeVo3bUMzWG1aWFI5dy0zMFZMaXpnei12d3l5W +mxrdU1wUnF2TUl4NCIsICJjTWdSNUtjX1dTa3hrV0JONnZ1bHYtUEJBM0pkMnNKaDU0V +UtKbVhDcXM0IiwgImYtcmh0LXVzRDVGNG1rd2RyaVpXNFp1MWw0d1g5QU9Mclc0Sjh3c +GxsRXciXSwgImFkZHJlc3MiOiB7Il9zZCI6IFsiNWV2QWZ2Y3ZpSXdhY0RUcEdOR1piT +GJ4UUh2WU45ZWgwOGIwaV92eEVvMCIsICJPNFp2bVdxTUk5VXFSR1otbFJwUzVRYjctZ +VQ3TzExSThWeDg2anNuLW5BIiwgIm5fMTBMM2Q3OFJMS21BcGFMMU9UYUxza3J5Z29Ib +HpOZFRhQll1SmlnM00iLCAid3JwNXBCbkZSUGZwaGU2YS00M2dIRkhrMFVGWUg5Y0NLc +3J1RWNoSGllZyJdfX0sICJleHAiOiAxNTE2MjQ3MDIyLCAiX3NkX2FsZyI6ICJzaGEtM +jU2In0.qIjQbSjEkmZ6I_xAoE3WKYygEgIjDqZT3J_XWAzYstGQlx2SSeHao5txWgtCN +0wEQClSbgusQz5Kf2p5i1ySsQ \ No newline at end of file diff --git a/examples/pid/user_claims.json b/examples/pid/user_claims.json new file mode 100644 index 00000000..4e68b33a --- /dev/null +++ b/examples/pid/user_claims.json @@ -0,0 +1,46 @@ +{ + "iss": "https://pid_issuer.memberstate.eu", + "iat": 1541493724, + "type": "PersonIdentificationData", + "binding": [ + { + "type": "CryptographicBinding2022", + "cnf": { + "jwk": { + "kty": "RSA", + "n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4 + cbbf AAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n + 3oknjhMst n64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4Qy + Q5v-65YGjQR0_F DW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZ + Hzu6qMQvRL5hajrn1n9 1CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6We + Zu0fM4lFd2NcRwr3XPksINHa + Q-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", + "e": "AQAB" + } + } + }, + { + "type": "BiometricBinding2022", + "template": "..." + } + ], + "credentialSubject": { + "given_name": "Erika", + "family_name": "Mustermann", + "nationalities": [ + "DE" + ], + "birth_family_name": "Schmidt", + "birthdate": "1973-01-01", + "place_of_birth": "Regensburg", + "address": { + "postal_code": "12345", + "locality": "Irgendwo", + "street_address": "Sonnenstrasse 23", + "country_code": "DE" + }, + "is_over_18": true, + "is_over_21": true, + "is_over_65": false + } +} \ No newline at end of file diff --git a/examples/pid/verified_contents.json b/examples/pid/verified_contents.json new file mode 100644 index 00000000..84a93e8c --- /dev/null +++ b/examples/pid/verified_contents.json @@ -0,0 +1,35 @@ +{ + "iss": "https://example.com/issuer", + "iat": 1516239022, + "type": "PersonIdentificationData", + "credentialSubject": { + "address": {}, + "birthdate": "1973-01-01", + "family_name": "Mustermann", + "given_name": "Erika" + }, + "exp": 1516247022, + "_sd_alg": "sha-256", + "binding": [ + { + "type": "CryptographicBinding2022", + "cnf": { + "jwk": { + "kty": "RSA", + "n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4 + cbbf AAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n + 3oknjhMst n64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4Qy + Q5v-65YGjQR0_F DW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZ + Hzu6qMQvRL5hajrn1n9 1CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6We + Zu0fM4lFd2NcRwr3XPksINHa + Q-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", + "e": "AQAB" + } + } + }, + { + "type": "BiometricBinding2022", + "template": "..." + } + ] +} \ No newline at end of file diff --git a/sd_jwt/examples/pid.yml b/sd_jwt/examples/pid.yml new file mode 100644 index 00000000..b13c3e6c --- /dev/null +++ b/sd_jwt/examples/pid.yml @@ -0,0 +1,63 @@ +user_claims: + { + "iss": "https://pid_issuer.memberstate.eu", + "iat": 1541493724, + "type": "PersonIdentificationData", + "binding": + [ + { + "type": "CryptographicBinding2022", + "cnf": + { + "jwk": + { + "kty": "RSA", + "n": "0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbf + AAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMst + n64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_F + DW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n9 + 1CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHa + Q-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw", + "e": "AQAB", + }, + }, + }, + { "type": "BiometricBinding2022", "template": "..." }, + ], + "credentialSubject": + { + "given_name": "Erika", + "family_name": "Mustermann", + "nationalities": ["DE"], + "birth_family_name": "Schmidt", + "birthdate": "1973-01-01", + "place_of_birth": "Regensburg", + "address": + { + "postal_code": "12345", + "locality": "Irgendwo", + "street_address": "Sonnenstrasse 23", + "country_code": "DE", + }, + "is_over_18": true, + "is_over_21": true, + "is_over_65": false, + }, + } + +non_sd_claims: + { + "iss": true, + "iat": true, + "type": true, + "credentialSubject": { "address": {} }, + } + +holder_disclosed_claims: + { + "binding":[{"type":true}], + "credentialSubject": + { "given_name": true, "family_name": true, "birthdate": true }, + } + +holder_binding: false