this post was submitted on 30 Nov 2024
119 points (99.2% liked)

Programming

17565 readers
168 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

Many might've seen the Australian ban of social media for <16 y.o with no idea of how to implement it. There have been mentions of "double blind age verification", but I can't find any information on it.

Out of curiosity, how would you implement this with privacy in mind if you really had to?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 day ago* (last edited 1 day ago) (1 children)

Who has age authority? A state agency or service. Like the state issues an ID with age.

Preferable, we want the user to interact with a website, that website request age authentication, but not the website to talk to the government, but through the user.

Thus, something/somewhat like

  1. State agency issues a certificate to the user
  2. User assigns a password to encrypt the user certificate
  3. User connects to random website A
  4. Random website A creates an age verification request signed to only be resolveable by state agency but sends it to the user
  5. User sends the request to a state service with their user certificate for authentication
  6. State agency confirms-signs the response
  7. User passes the responds along to the random website A

There may be alternative, simpler, or less verbose/complicated alternatives. But I'm sure it would be possible, and I think it lays out how "double-blind"(?) could work.

The random website A does not know the identity or age of the user - only to the degree they requested to verify - and the state agency knows only of a request, not its origin or application - to the degree the request and user pass-along includes.

[–] [email protected] 2 points 1 day ago

I never realised it was that simple to do. Thanks a lot to answer the OP question. I had the same for longer than I wish to admit given how easy the answer was!

[–] [email protected] 13 points 1 day ago (1 children)

Sites are just going to ask people 'Are you over 16? (Y/N)'. Site is now legally covered, and that is all anyone cares about.

[–] [email protected] 2 points 1 day ago

Just like porn and grog is Australia already .

Not to mention my space you needed to be over 16vor something so we all lied

[–] [email protected] 14 points 2 days ago* (last edited 1 day ago) (1 children)

If the governments would get their shit together, we could have something like age assertion with the eid chips in our IDs. Imagine that. The important thing is that website.com just asks the government "is this user an adult?" And the government replies "yes". No information besides the relevant one is provided, and it's through a trusted authority.

Yeah, not gonna happen, just like using the keys in my Personalausweis to send encrypted mail.

[–] FooBarrington 10 points 1 day ago (1 children)

The system would have to be built so that the government can't connect the user to the website, as you don't want the government to build profiles on website usage by person. Though the bigger challenge here is trust - even a technically perfect system could be circumvented by the operators.

A good example for this were the COVID tracking apps. The approach was built so that as little information was leaked as possible.

[–] Buddahriffic 4 points 1 day ago

Could have a system where a government site cryptographically signs a birth year plus random token provided by the site you want to use.

Step 1: access site
Step 2: site sends random token
Step 3: user's browser sends token plus user authentication information
Step 4: gov site replies with a string containing birth year, token, and signature
Step 5: send that string to the other site where it uses the government's public key to verify the signature, showing the birth year is attested by the government

No need to have any direct connection with the user's identity and the site or been the gov and site.

[–] [email protected] 1 points 1 day ago

It can't be. The entire concept is a Trojan horse to kill the anonymous internet.

[–] [email protected] 4 points 1 day ago

Well Australia will probably so something privacy invading and fascist.

I guess if you want it to be somewhat private you could have some kind of hash or token generated from your identification information. I bet that would be fairly private

[–] [email protected] 26 points 2 days ago

You can't.

Age verification is not compatible with any remotely acceptable version of the internet. It's an obscene privacy violation in all cases by definition.

Any implementation short of a webcam watching you while you use the site is less than trivial to bypass with someone else's ID while opening numerous massive tracking/security holes for no reason.

[–] eyeon 12 points 2 days ago (1 children)

All I can think of are some variations of you trusting a service to validate your id and give you a token that just asserts your id has been validated.

But it's still not really privacy preserving because it relies on trusting both parties to not collaborate against your privacy. if at some point the id provider decides to start keeping records of what tokens were generated from your id, and the service provider tracking what was consumes with that token, then you can still put it all back together.

[–] [email protected] 1 points 2 days ago (1 children)

That's when you add an extra ~~point of failure~~ validator.
Server 1 generates a token for server 2 to validate.
You send the token to server 2, who validates and generates you a token for server 3. Then finally server 3 validates the token and grants/denies your access.

The more nodes you have across different countries, the harder it is for the last server to discover your identity.

Definitely not without its flaws, but I wonder if a decentralised node setup similar to the tor network could work.

[–] AnUnusualRelic 2 points 1 day ago (1 children)

Could we add a blockchain somewhere? They're really good with the investors.

[–] [email protected] 2 points 1 day ago (1 children)

We can, but blockchain is old technology.
We should use an LLM to create and verify the tokens.

[–] AnUnusualRelic 1 points 22 hours ago

Oh, right, I haven't been keeping up it seems.

[–] [email protected] 31 points 3 days ago (2 children)

Not a cryptographic expert by any means but maybe something like this would work. This'd be implemented in common places people shop: supermarkets for instance. You'd go up to customer service and show your ID for visual confirmation only; no records can be created. In return the service rep would give you a list of randomised GUIDs against which the only permissible record can be "has been taken". Each time you need to prove your age you'd feed in one of those GUIDs.

[–] nutsack 7 points 3 days ago (1 children)

this is an actual answer which is therefore interesting

[–] [email protected] 15 points 3 days ago* (last edited 3 days ago) (2 children)

Sadly, this type of scheme suffers from: 1) repudiation, and 2) transferability. An ideal system would be non-repudiable, meaning that when a GUID is used, it is unmistakably an action that could only be undertaken by the age-verified person. But a GUID cannot guarantee that, since it's easy enough for an adult to start selling their valid GUIDs online to the highest bidder en-masse. And being a simple string, it can easily and confidentially be transferred to the buyer, so that no one but those two would know that the transaction actually took place, or which GUID was passed along.

As a general rule, when complex questions arise which might possibly be solved by encryption, it's fairly safe to assume that expert cryptographers have already looked at the problem and that no easy or obvious solution exists. That's not to say that cryptographers must never be questioned, but that the field is complicated enough that incomplete answers abound.

IMO, the other comments have it right: there does not exist a general solution to validate age without also compromising anonymity or revealing one's identity to someone. And that alone is already a privacy compromise.

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 49 points 3 days ago (18 children)

Homomorphic encryption (zero knowledge cryptography) is a known solution to this problem.

https://crypto.stackexchange.com/questions/96232/zkp-prove-that-18-while-hiding-age

[–] actually 13 points 3 days ago (1 children)

Doesn’t this assume the issuing agency has all employees who are morally sound and not leaking data, unnoticed by an internally badly designed system, which is designed by people who are out of touch? Most things like this are designed that way, irregardless of country .

I’m sure one can make it watertight but it’s so hard and still depends in trusting people. The conversation here is about one thing of a larger system. There are probably a hundred moving parts in any bureaucracy.

[–] [email protected] 35 points 3 days ago (2 children)

This is the understanding ANYWHERE. How do we know there aren’t back doors in our OS’s? We literally have no clue. We do THE BEST WE CAN using the clues we have.

[–] [email protected] 17 points 3 days ago* (last edited 3 days ago) (1 children)

Yeah, these things quickly boil down to the trusting trust thing (see Ken Thompson's Turing award lecture). You can't trust any system until you've designed every bit from scratch.

You gotta put your trust somewhere, or you won't be able to implement jack.

[–] [email protected] 1 points 1 day ago

This isn't as limiting as it seems at first glance though. Sending pictures of a true one time pad cipher doesn't rely on the security of the transport or the camera. From there you can choose to make a compromise of convenience and get to things like Private key cryptography where the ciphers are done via basic xor arithmetic you can do by hand.

load more comments (1 replies)
load more comments (17 replies)
[–] [email protected] 39 points 3 days ago* (last edited 3 days ago)

Frankly, the only sane option is an "Are you over the age of (whatever is necessary) and willing to view potentially disturbing adult content?" style confirmation.

Anything else is going to become problematic/abusive sooner or later.

[–] [email protected] 9 points 2 days ago

Choose the classic "are you 18 or older" dialog. KISS.

[–] [email protected] 11 points 2 days ago (1 children)

My friend has worked with a government to create zero-knowledge proof from IDs. Turns out there's a lot of good software engineered to solve that problem.

The UX is still shit tho

[–] [email protected] 3 points 2 days ago (1 children)

Any open projects you could point to on the subject or articles about the government efforts? I would love to learn more on that!

[–] [email protected] 3 points 2 days ago

https://github.com/openpassport-org/openpassport

I need to get back to Florent to ask him about his advances but this is the repo he worked on! Seems pretty exciting !

[–] [email protected] 18 points 3 days ago

It can't. It requires invasion of privacy to verify information about the individual they don't have the right to access.

Digital age verification goes against privacy. Let's not delude ourselves into thinking it can.

[–] Asidonhopo 23 points 3 days ago (2 children)

I seem to remember Leisure Suit Larry verified age using trivia questions that only older people would answer correctly. I know this because at 8 years old I guessed enough of them on my father's friends computer to play it.

[–] [email protected] 2 points 1 day ago (1 children)

I talked to a friend of mine last week and they didn't know of the old PS/2 mouse/keyboard cable/sockets. They've seen it before, but it wasn't familiar to them. Nobody only having used USB devices will remember those.

[–] Asidonhopo 2 points 1 day ago (1 children)

I was just getting used to PS/2 connectors replacing serial mice and keyboards and then friggin USB comes along....

[–] [email protected] 2 points 15 hours ago* (last edited 15 hours ago)

Tell me when you're getting used to USB so I can prepare for the next switch /s 😅

load more comments (1 replies)
[–] [email protected] 20 points 3 days ago (6 children)

A joke answer, but with the kernel of truth - IRL age verification often requires a trusted verifier (working under threat of substantial penalty) but often doesn't require that verifier to maintain any documentation on individual verification actions

https://chinwag.au/verification/

load more comments (6 replies)
[–] [email protected] 13 points 3 days ago (1 children)

If I really had to, I would require everyone to whip out whatever assets of sexual maturity they happen to have, and let the computer analyze it and decide a maturity level.

I would also keep copies for blackmail purposes, because the world is a better place if we all mistrust this solution and anything remotely like it. It'll be in the legal fine print, which I'm confident no one will read.

Every answer (other than "trust the user to self identify") is at least remotely like mine, but I'm proposing we cut out the half-measures on the way.

To avoid personal consequences, the system I architect will probably wait on a dead-man-switch for me to die or be incarcerated.

Then it will publish everything it has ever seen, along with AI generated commentary. I'm confident that some of it will be hilarious, and I am hopeful that it will piss everyone off enough that we stop doing this kind of thing.

load more comments (1 replies)
[–] [email protected] 5 points 2 days ago (2 children)

in blockchain tech, there's the concept of "zero knowledge proofs", where you can prove having certain information without revealing the info itself

[–] sinceasdf 5 points 2 days ago

Would be interesting to see a govt tackle setting up a trustless system like it required for cybersecurity best practices. I think it's a thorny issue without a trusted authority though.

What stops an ID for being posted publicly or shared en masse? So one ID can be used unlimited times - just share the key with minors for $1 at no risk to oneself since there's no knowledge of the 'transaction' being sent around. Better for individual privacy but that undermines the political impetus for wanting the verification. Usage would probably have to be monitored or capped, kind of defeating the advantage of the anonymous protocol (or accept that abuse is unenforceable).

[–] IphtashuFitz 3 points 2 days ago (1 children)

So how would you use it to solve this problem? There still needs to be some sort of foolproof way of saying “person X is only 14 years old”.

[–] [email protected] 6 points 2 days ago

You would prove something like "I possess a private key that matches a public key that is in this list of public keys belonging to people at least X years old". But without revealing which item in the list is the specific one for you. Which is the zero knowledge proofs' cool trick.

[–] chaospatterns 13 points 3 days ago* (last edited 3 days ago) (7 children)

Its possible to implement something that hides your actual age from a website, but the tricky part is hiding what website you're visiting from an identity provider.

Let's walk through a wrong solution to get some fundamentals. If you're familiar with SSO login, a website makes a request token to login the user and makes claims (these request pieces of user information.) One could simply request "is the user older than 18?" And that hides the actual age and user identity.

The problem is how do you hide what website you're going to from the identity provider? In most SSO style logins, you need to know the web page to redirect back to the original site. Thus leaking information about websites you probably don't want to share.

The problem with proposals that focus on the crypto is that they actually have to be implemented using today's browser and HTTP standards to get people to use them.

load more comments (7 replies)
load more comments
view more: next ›