The thing is, it has to work completely offline. Not everyone uses computers.
Generate a private key on the card, have the government sign it, keep it locked up with a PIN/password (and self destruct after X number of invalid attempts). You can verify authenticity offline as long as you can request the card to sign a response and verify the signature, problem solved.