Skip to content

Commit

Permalink
Bumping voprf-ts to v1.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
armfazh committed Aug 13, 2024
1 parent 57f21f0 commit 5c22219
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 27 deletions.
49 changes: 28 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"dependencies": {
"@cloudflare/blindrsa-ts": "0.4.2",
"@cloudflare/voprf-ts": "0.21.2",
"@cloudflare/voprf-ts": "1.0.0",
"asn1-parser": "1.1.8",
"asn1js": "3.0.5",
"rfc4648": "1.5.2"
Expand Down
9 changes: 4 additions & 5 deletions src/priv_verif_token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ const VOPRF_EXTRA_PARAMS: VOPRFExtraParams = {
Nk: Oprf.getOprfSize(VOPRF_SUITE),
hash: VOPRF_HASH,
dleqParams: {
gg: VOPRF_GROUP,
hashID: VOPRF_HASH,
hash: Oprf.Crypto.hash,
dst: '',
group: VOPRF_GROUP.id,
hash: VOPRF_HASH,
dst: new Uint8Array(),
},
} as const;

Expand Down Expand Up @@ -261,7 +260,7 @@ export class Client {
throw new Error('no token request was created yet');
}

const proof = DLEQProof.deserialize(VOPRF.dleqParams, tokRes.evaluateProof);
const proof = DLEQProof.deserialize(VOPRF_GROUP.id, tokRes.evaluateProof);
const evaluateMsg = VOPRF.group.desElt(tokRes.evaluateMsg);
const evaluation = new Evaluation(Oprf.Mode.VOPRF, [evaluateMsg], proof);
const [authenticator] = await this.finData.vClient.finalize(
Expand Down

0 comments on commit 5c22219

Please sign in to comment.