Skip to content

Commit

Permalink
Add logs for zkp debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Jdu278 committed Aug 23, 2024
1 parent 3cfaa73 commit f815575
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ class PostWalletResponseLive(
logger.info("Starting zkp verification for SDJWT")
val descriptorId: String = descriptor.id.toString()
logger.info("ZKP-SDJWT: descriptorId=$descriptorId")
logger.info("This is the whole presentation: $presentation")

val key = presentation.zkpKeys?.get(descriptorId)
logger.info("ZKP-SDJWT: key=$key")
ensureNotNull(key) { raise(WalletResponseValidationError.InvalidVPToken) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class PostZkpJwkRequestLive(
val ephemeralKeyResponses = challengeRequests.map { challengeRequest ->
val challengeRequestData = ChallengeRequestData(digest = challengeRequest.digest, r = challengeRequest.r)
val (challenge, key) = verifier.createChallenge(challengeRequestData)
logger.info("This is the challenge requestID: ${challengeRequest.id}")
zkpKeys[challengeRequest.id] = key

val x = challenge.w.affineX
Expand All @@ -102,7 +103,6 @@ class PostZkpJwkRequestLive(
storePresentation(updatedPresentation)
logger.info("updatedPresentation $updatedPresentation")
}
// TODO: check if zkpKeys is saved properly
return ephemeralKeyResponses
}
}

0 comments on commit f815575

Please sign in to comment.