You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: sd-jwt/sd_jwt.go
+18-13Lines changed: 18 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,12 @@ import (
18
18
"github.com/pkg/errors"
19
19
)
20
20
21
+
const (
22
+
sdClaimName="_sd"
23
+
sdAlgClaimName="_sd_alg"
24
+
sha256Alg="sha-256"
25
+
)
26
+
21
27
// CreatePresentation creates the Combined Format for Presentation as specified in https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-04.html#name-combined-format-for-present
22
28
// jwtAndDisclosures is a Combined Format for Issuance as specified in https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-04.html#name-combined-format-for-issuanc.
23
29
// disclosuresToPresent is a set of which the indices of the disclosures that the presentation should contain.
// VerifySDPresentation takes in a combined presentation format as defined in https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-04.html#name-combined-format-for-present
426
431
// and Verifies it according to https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-04.html#name-verification-by-the-verifie
427
432
// Succesful verifications return a processed SD-JWT payload.
428
-
// TODO: only accept certain algos for validating the JWT, and the holder binding JWT
433
+
// TODO(https://github.com/TBD54566975/ssi-sdk/issues/378): only accept certain algos for validating the JWT, and the holder binding JWT
//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.
480
-
//TODO: get the algo from the cnf
485
+
//TODO(https://github.com/TBD54566975/ssi-sdk/issues/377): support holder binding properly as specified in RFC7800. Alg should be coming from CNF.
481
486
holderBindingAlg:=jwa.ES256K
482
487
483
488
//Validate the signature over the Holder Binding JWT.
0 commit comments