There are actual implementations that do not compromise privacy and anonymity. For example the EU is currently doing large scale field tests in several countries of such a system.
It involves your government issuing you a signed digital copy of your ID documents which gets cryptographically bound to the security hardware in your smart phone (support for other hardware security devices is planned for later).
To verify your age to a site your phone and the site use a protocol based on zero-knowledge proofs to demonstrate to the site that your phone has a bound ID document signed by your government that says your age is above the site's threshold, without disclosing anything else from your ID document to the site.
This demonstration requires the use of a key that was generated in the security hardware when the ID was bound, which shows that the site is talking to your phone and that the security hardware is unlocked, which is sufficient evidence that you have authorized this verification to satisfy the law.
Note that your government is not involved beyond the initial installation of the bound ID document on the phone. They get no information on what sites you later age verify for or when you do any age verifications.
There are actual implementations that do not compromise privacy and anonymity. For example the EU is currently doing large scale field tests in several countries of such a system.
It involves your government issuing you a signed digital copy of your ID documents which gets cryptographically bound to the security hardware in your smart phone (support for other hardware security devices is planned for later).
To verify your age to a site your phone and the site use a protocol based on zero-knowledge proofs to demonstrate to the site that your phone has a bound ID document signed by your government that says your age is above the site's threshold, without disclosing anything else from your ID document to the site.
This demonstration requires the use of a key that was generated in the security hardware when the ID was bound, which shows that the site is talking to your phone and that the security hardware is unlocked, which is sufficient evidence that you have authorized this verification to satisfy the law.
Note that your government is not involved beyond the initial installation of the bound ID document on the phone. They get no information on what sites you later age verify for or when you do any age verifications.