Couldn't this sort of thing be solved via some kind of very short range radio based lock? For instance, a transmitter build into a ring that can only "unlock" the matching gun.
A comparable but significantly lower tech solution is using a high-strength magnet integrated into a ring which manipulates some part of the trigger mechanism, unlocking it for use, eg: http://www.tarnhelm.com/magna-trigger/gun/safety/magna1.html
It's not keyed to a specific weapon, but it seems like it would help prevent the most common dangers of either a kid finding and using it accidentally, or in an actual combat situation, being disarmed and having it used against you.
The only major benefit to per-device keying would be (marginal) additional security, and increased auditability