Skip to content

[WIP] Batched privately verifiable tokens#34

Open
thibmeu wants to merge 7 commits intocloudflare:mainfrom
thibmeu:batched-privately-verifiable-tokens
Open

[WIP] Batched privately verifiable tokens#34
thibmeu wants to merge 7 commits intocloudflare:mainfrom
thibmeu:batched-privately-verifiable-tokens

Conversation

@thibmeu
Copy link
Copy Markdown
Contributor

@thibmeu thibmeu commented Feb 28, 2025

Implementation of batched private tokens defined in https://datatracker.ietf.org/doc/html/draft-ietf-privacypass-batched-tokens-04

This implementation has been tested against go test vectors generated in cloudflare/pat-go#50

It also implement Token type 0x0005, which is VOPRF (ristretto225, SHA-512), using @noble crypto. This is the only token type supported and tested in this batched token implementation

TODOs:

  • Move token 0x0005 to private token. This means allowing to set the VOPRF parameter when building privatetoken
  • Test RFC 9000 varint implementation. For instance, using quic-go test vectors. The RFC does not provide any.
  • Inline draft algorithm as comments. This should help maintainability

Note for reviewer: the moduleResolution change is required to import noble crypto from @cloudflare/voprf-ts.

@thibmeu thibmeu self-assigned this Feb 28, 2025
@thibmeu thibmeu mentioned this pull request Feb 28, 2025
Instead of doing an adhoc implementation, use a shared module

Module is tested and benchmarked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant