Skip to content

Commit f4df942

Browse files
bc-piSakurann
andauthored
shepherd review updates (#552)
* updates to media type registrations per shepherd review * Move RFC8725 and RFC6838 references from informative to normative per shepherd review * hash digest to just digest per Hannes * typo * Attempt to improve statement about digest claims only being for conveying digests * big MAY to little can * remove the first "Issuer-signed" qualification to improve the readability of the sentence as suggeted by Hannes * say it needs to be computationally hiding rather than MUST be computationally hiding * Verification * considered here -> discussed below * Apply suggestions from code review * Richard "fnord" Barnes has expressed a slight preference for an unadorned name and an appreciation for orthography * doc history too --------- Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com>
1 parent 2a1e13a commit f4df942

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

draft-ietf-oauth-selective-disclosure-jwt.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The Holder may elect to disclose only the address to one Verifier, and only the
6464
Privacy principles of minimal disclosure in conjunction with this model demand a mechanism enabling selective disclosure of data elements while ensuring that Verifiers can still check the authenticity of the data provided.
6565
This specification defines such a mechanism for JSON-encoded payloads of JSON Web Signatures, with a primary use case being JWTs.
6666

67-
SD-JWT is based on an aproach called "salted hashes": For any data element that should be selectively disclosable, the Issuer of the SD-JWT does not include the cleartext of the data in the JSON-encoded payload of the JWS structure; instead, a hash digest of the data takes its place.
67+
SD-JWT is based on an approach called "salted hashes": For any data element that should be selectively disclosable, the Issuer of the SD-JWT does not include the cleartext of the data in the JSON-encoded payload of the JWS structure; instead, a digest of the data takes its place.
6868
For presentation to a Verifier, the Holder sends the signed payload along with the cleartext of those claims it wants to disclose.
6969
The Verifier can then compute the digest of the cleartext data and confirm it is included in the signed payload.
7070
To ensure that Verifiers cannot guess cleartext values of non-disclosed data elements, an additional salt value is used when creating the digest and sent along with the cleartext when disclosing it.
@@ -321,7 +321,7 @@ The payload of an SD-JWT is a JSON object according to the following rules:
321321
4. The payload MAY contain one or more non-selectively disclosable claims.
322322
5. The payload MAY contain the Holder's public key(s) or reference(s) thereto, as explained in (#key_binding).
323323
6. The payload MAY contain further claims such as `iss`, `iat`, etc. as defined or required by the application using SD-JWTs.
324-
7. The payload MUST NOT contain the reserved claims `_sd` or `...` except for the purpose of transporting digests as described below.
324+
7. The payload MUST NOT contain the claims `_sd` or `...` except for the purpose of conveying digests as described in (#embedding_object_properties) and (#embedding_array_elements) respectively below.
325325

326326
The same digest value MUST NOT appear more than once in the SD-JWT.
327327

@@ -385,7 +385,7 @@ For each claim that is an object property and that is to be made selectively dis
385385
* Create an array of three elements in this order:
386386
1. A salt value. MUST be a string. See (#salt-entropy) for security considerations. It is RECOMMENDED to base64url-encode a minimum of 128 bits of cryptographically secure random data, producing a string. The salt value MUST be unique for each claim that is to be selectively disclosed. The Issuer MUST NOT reveal the salt value to any party other than the Holder.
387387
2. The claim name, or key, as it would be used in a regular JWT payload. It MUST be a string and MUST NOT be `_sd`, `...`, or a claim name existing in the object as a non-selectively disclosable claim.
388-
3. The claim value, as it would be used in a regular JWT payload. The value MAY be of any type that is allowed in JSON, including numbers, strings, booleans, arrays, null, and objects.
388+
3. The claim value, as it would be used in a regular JWT payload. The value can be of any type that is allowed in JSON, including numbers, strings, booleans, arrays, null, and objects.
389389
* JSON-encode the array, producing an UTF-8 string.
390390
* base64url-encode the byte representation of the UTF-8 string, producing a US-ASCII [@!RFC20] string. This string is the Disclosure.
391391

@@ -426,7 +426,7 @@ For each claim that is an array element and that is to be made selectively discl
426426

427427
* The array MUST contain two elements in this order:
428428
1. The salt value as described in (#disclosures_for_object_properties).
429-
2. The array element that is to be hidden. This value MAY be of any type that is allowed in JSON, including numbers, strings, booleans, arrays, and objects.
429+
2. The array element that is to be hidden. This value can be of any type that is allowed in JSON, including numbers, strings, booleans, arrays, and objects.
430430

431431
The Disclosure string is created by JSON-encoding this array and base64url-encoding the byte representation of the resulting string as described in (#disclosures_for_object_properties). The same considerations regarding
432432
variations in the result of the JSON encoding apply.
@@ -804,7 +804,7 @@ an SD-JWT to validate the SD-JWT and extract the payload:
804804

805805
1. Separate the SD-JWT into the Issuer-signed JWT and the Disclosures (if any).
806806
2. Validate the Issuer-signed JWT:
807-
1. Ensure that a signing algorithm was used that was deemed secure for the application. Refer to [@RFC8725], Sections 3.1 and 3.2 for details. The `none` algorithm MUST NOT be accepted.
807+
1. Ensure that a signing algorithm was used that was deemed secure for the application. Refer to [@!RFC8725], Sections 3.1 and 3.2 for details. The `none` algorithm MUST NOT be accepted.
808808
2. Validate the signature over the Issuer-signed JWT per Section 5.2 of [@!RFC7515].
809809
3. Validate the Issuer and that the signing key belongs to this Issuer.
810810
5. Check that the `_sd_alg` claim value is understood and the hash algorithm is deemed secure (see (#hash_function_claim)).
@@ -882,7 +882,7 @@ To this end, Verifiers MUST follow the following steps (or equivalent):
882882
4. Process the SD-JWT as defined in (#sd_jwt_verification) to validate the presentation and extract the payload.
883883
5. If Key Binding is required:
884884
1. Determine the public key for the Holder from the SD-JWT (see (#key_binding)).
885-
2. Ensure that a signing algorithm was used that was deemed secure for the application. Refer to [@RFC8725], Sections 3.1 and 3.2 for details. The `none` algorithm MUST NOT be accepted.
885+
2. Ensure that a signing algorithm was used that was deemed secure for the application. Refer to [@!RFC8725], Sections 3.1 and 3.2 for details. The `none` algorithm MUST NOT be accepted.
886886
3. Validate the signature over the Key Binding JWT per Section 5.2 of [@!RFC7515].
887887
4. Check that the `typ` of the Key Binding JWT is `kb+jwt` (see (#kb-jwt)).
888888
5. Check that the creation time of the Key Binding JWT, as determined by the `iat` claim, is within an acceptable window.
@@ -975,7 +975,7 @@ Additionally, as described in (#key_binding_security), the application of Key Bi
975975

976976
## Mandatory Signing of the Issuer-signed JWT {#sec-is-jwt}
977977

978-
The Issuer-signed JWT MUST be signed by the Issuer to protect integrity of the issued
978+
The JWT MUST be signed by the Issuer to protect integrity of the issued
979979
claims. An attacker can modify or add claims if this JWT is not signed (e.g.,
980980
change the "email" attribute to take over the victim's account or add an
981981
attribute indicating a fake academic qualification).
@@ -1035,7 +1035,7 @@ the hash function MUST ensure that it is infeasible to calculate any portion of
10351035
(salt, claim name, claim value) from a particular digest. This implies the hash function MUST
10361036
be preimage resistant, but should also not allow an observer to infer any partial information about
10371037
the undisclosed content. In the terminology of cryptographic commitment schemes, the hash function
1038-
MUST be computationally hiding.
1038+
needs to be computationally hiding.
10391039

10401040
To ensure the integrity of selectively disclosable claims, the hash function MUST be second-preimage
10411041
resistant. That is, for any combination of salt, claim name and claim value, it is infeasible to find a different combination of salt,
@@ -1133,7 +1133,7 @@ The precise set of required validity claims will typically be defined by
11331133
ecosystem rules, application-specific profile, or the credential format and MAY include claims other than
11341134
those listed herein.
11351135

1136-
## Issuer Signature Key Distribution and Rotation {#issuer_signature_key_distribution}
1136+
## Distribution and Rotation of Issuer Signature Verification Key {#issuer_signature_key_distribution}
11371137

11381138
This specification does not define how signature verification keys of
11391139
Issuers are distributed to Verifiers. However, it is RECOMMENDED that
@@ -1179,8 +1179,8 @@ modified the list of Disclosures.
11791179

11801180
## Explicit Typing {#explicit_typing}
11811181

1182-
[@RFC8725, section 3.11] describes the use of explicit typing as one mechanism to prevent confusion attacks
1183-
(described in [@RFC8725, section 2.8]) in which one kind of JWT is mistaken for another. SD-JWTs are also potentially
1182+
[@!RFC8725, section 3.11] describes the use of explicit typing as one mechanism to prevent confusion attacks
1183+
(described in [@!RFC8725, section 2.8]) in which one kind of JWT is mistaken for another. SD-JWTs are also potentially
11841184
subject to such confusion attacks, so in the absence of other techniques, it is RECOMMENDED that application profiles of SD-JWT specify an explicit type
11851185
by including the `typ` header parameter when the SD-JWT is issued, and for Verifiers to check this value.
11861186

@@ -1225,7 +1225,7 @@ intended to disclose, for example:
12251225
originally anonymous information presented to Verifier B, therefore revealing
12261226
the identities of users of Verifier B.
12271227

1228-
The following types of unlinkability are considered here:
1228+
The following types of unlinkability are discussed below:
12291229

12301230
* Presentation Unlinkability: A Verifier should not be able to link two
12311231
presentations of the same credential.
@@ -1406,7 +1406,7 @@ Orie Steele,
14061406
Paul Bastian,
14071407
Peter Altmann,
14081408
Pieter Kasselman,
1409-
Richard "fnord" Barnes,
1409+
Richard Barnes,
14101410
Rohan Mahy,
14111411
Ryosuke Abe,
14121412
Sami Rosendahl,
@@ -1463,7 +1463,7 @@ IANA "JSON Web Token Claims" registry [@IANA.JWT] established by [@!RFC7519].
14631463

14641464
This section requests registration of the following media types [@RFC2046] in
14651465
the "Media Types" registry [@IANA.MediaTypes] in the manner described
1466-
in [@RFC6838].
1466+
in [@!RFC6838].
14671467

14681468
Note: For the media type value used in the `typ` header in the Issuer-signed JWT
14691469
itself, see (#explicit_typing).
@@ -1475,10 +1475,10 @@ To indicate that the content is an SD-JWT:
14751475
* Required parameters: n/a
14761476
* Optional parameters: n/a
14771477
* Encoding considerations: binary; application/sd-jwt values are a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') and tilde ('~') characters.
1478-
* Security considerations: See the Security Considerations section of [[ this specification ]], [@!RFC7519], and [@RFC8725].
1478+
* Security considerations: See the Security Considerations section of [[ this specification ]], [@!RFC7519], and [@!RFC8725].
14791479
* Interoperability considerations: n/a
14801480
* Published specification: [[ this specification ]]
1481-
* Applications that use this media type: TBD
1481+
* Applications that use this media type: Applications requiring selective disclosure of integrity protected content.
14821482
* Fragment identifier considerations: n/a
14831483
* Additional information:
14841484
* Magic number(s): n/a
@@ -1498,11 +1498,11 @@ To indicate that the content is a JWS JSON serialized SD-JWT:
14981498
* Subtype name: sd-jwt+json
14991499
* Required parameters: n/a
15001500
* Optional parameters: n/a
1501-
* Encoding considerations: binary; application/sd-jwt+json values are represented as a JSON Object; UTF-8 encoding SHOULD be employed for the JSON object.
1501+
* Encoding considerations: binary; application/sd-jwt+json values are represented as a JSON Object.
15021502
* Security considerations: See the Security Considerations section of [[ this specification ]], and [@!RFC7515].
15031503
* Interoperability considerations: n/a
15041504
* Published specification: [[ this specification ]]
1505-
* Applications that use this media type: TBD
1505+
* Applications that use this media type: Applications requiring selective disclosure of content protected by ETSI JAdES compliant signatures.
15061506
* Fragment identifier considerations: n/a
15071507
* Additional information:
15081508
* Magic number(s): n/a
@@ -1522,11 +1522,11 @@ To indicate that the content is a Key Binding JWT:
15221522
* Subtype name: kb+jwt
15231523
* Required parameters: n/a
15241524
* Optional parameters: n/a
1525-
* Encoding considerations: binary; A Key Binding JWT is a JWT; JWT values are encoded as a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') characters.
1526-
* Security considerations: See the Security Considerations section of [[ this specification ]], [@!RFC7519], and [@RFC8725].
1525+
* Encoding considerations: binary; A Key Binding JWT is a JWT; JWT values are encoded as a series of base64url-encoded values separated by period ('.') characters.
1526+
* Security considerations: See the Security Considerations section of [[ this specification ]], [@!RFC7519], and [@!RFC8725].
15271527
* Interoperability considerations: n/a
15281528
* Published specification: [[ this specification ]]
1529-
* Applications that use this media type: TBD
1529+
* Applications that use this media type: Applications utilizing a JWT based proof of possession mechanism.
15301530
* Fragment identifier considerations: n/a
15311531
* Additional information:
15321532
* Magic number(s): n/a
@@ -1543,7 +1543,7 @@ To indicate that the content is a Key Binding JWT:
15431543

15441544
This section requests registration of the "+sd-jwt" structured syntax suffix in
15451545
the "Structured Syntax Suffix" registry [@IANA.StructuredSuffix] in
1546-
the manner described in [RFC6838], which can be used to indicate that
1546+
the manner described in [@!RFC6838], which can be used to indicate that
15471547
the media type is encoded as an SD-JWT.
15481548

15491549
* Name: SD-JWT
@@ -1552,7 +1552,7 @@ the media type is encoded as an SD-JWT.
15521552
* Encoding considerations: binary; SD-JWT values are a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') or tilde ('~') characters.
15531553
* Interoperability considerations: n/a
15541554
* Fragment identifier considerations: n/a
1555-
* Security considerations: See the Security Considerations section of [[ this specification ]], [@!RFC7519], and [@RFC8725].
1555+
* Security considerations: See the Security Considerations section of [[ this specification ]], [@!RFC7519], and [@!RFC8725].
15561556
* Contact: Daniel Fett, mail@danielfett.de
15571557
* Author/Change controller: IETF
15581558

@@ -1975,6 +1975,7 @@ data. The original JSON data is then used by the application. See
19751975

19761976
-16
19771977

1978+
* Updates following review of -15 by Hannes Tschofenig, document shepherd
19781979
* Editorial updates to text introduced in -15
19791980

19801981
-15

0 commit comments

Comments
 (0)