tfpauly / privacy-proxy

Specifications for Privacy Proxy Implementations
Other
29 stars 11 forks source link

Groth-Sahai based alternative? #96

Open wbl opened 2 years ago

wbl commented 2 years ago

This is a radically different looking approach to solve a somewhat different but related problem. We would like clients to produce tokens that are a function of their IP address, an issuer secret parameter, and the origin where the token is displayed. We'd like these tokens not to be linkable across sites, but not mangleable on a site. IP address is used as an example, other identifiers could also work.

To do this I propose the following: The Issuer I takes a request from a client C, computes z=h(IP(C), secret) for some hash function h, and sends back z along with a structure signature of a special value zg_1,zg_2 with a structure preserving signature on zg_1, zg_2. Maybe we have to fiddle a bit with this. The client just has to do this once.

The client connects to a site S by computing w=H(S), T=zw, where H is a hash function to G_1. The client then sends a zero knowledge Groth-Sahai proof that T is correctly formed (by pairing equations involving the special value) and that the issuer signed the special value. The special value isn't revealed by the ZK properties of the Groth-Sahai proof.

The site can use T the way it uses IP addresses today. Crucially a different site will have a different token T', with no way to link them.

This has a number of differences from the current proposal:

tfpauly commented 2 years ago

Interesting idea!

I have a couple comments/questions:

wbl commented 2 years ago

This is the part of the conversation where I would be suggesting we find a cafe next week. Alas! You raise some excellent points.

tfpauly commented 2 years ago

Yes, absolutely something for a discussion over coffee!

The other aspect I'm thinking about is the risk for abuse when you allow and expect token replay. With a challenge-based system, the origin knows that the client had to fetch the token within a certain time; you could try to run the issuance through some other device that was more trusted than you, but you'd need to proxy for each new token challenge. If we only talk to an issuer to get a secret once, what stops a client from leaking that information to many other clients? The origin could still rate limit that entire group as "one", but it means that it's fairly trivial to start giving access to clients that otherwise wouldn't be trusted.

I think what I'm seeing is that a model that tries to put enforcement back on the origin based on one-time information from an issuer can work as a replacement for some captcha-style use cases, but has more trouble with the cases like metered paywalls or trusting that a client is in a specific geolocation. Does that sound right?

wbl commented 2 years ago

Was off by a week on IETF timing, but yes.

I think the geolocation policy would definitely be a problem as the token is easily liftable and long lasting, unless we have frequent rotation which has its own issues. For paywall metering the supercookie concern is an issue, especially on subrequests. If it's only presented on a top level navigation, given the paywall durations (typically per month) and limits (~10 views) it might not be so bad, provided we don't have additional, especially cross site tracking vectors. I think for captcha you really want one time tokens, not persistent ones because of the ability to farm.