# Is the concept of a biometric smart gun that will detonate when anyone besides its owner touches the weapon unrealistic?

This is basically an extension of the idea of the smart gun, a gun that will only fire when in the hands of its biometrically linked owner, but two steps up.

The idea is that someone won't dare to steal your gun or loot your corpse, unless they want to be blown to bits. I originally wanted to go for a high voltage electric shock, but I feel like someone tech-savvy could workaround this dangerous countermeasure and reprogram the weapon for themselves.

Having the gun literally explode with the parts composing it serving as the shrapnel, would guarantee that no one would want a part with trying to reprogram it for their own purposes.

This raises the question though: wouldn't this practice be resource-wasteful? My setting isn't unlike real-life where the military has exorbitant amounts of money and resources, but having all of their issued firearms become deadly explosives when out of the hands of their owners would be costly. Do the means appease the end?

• Comments are not for extended discussion; this conversation has been moved to chat. – L.Dutch - Reinstate Monica Jul 27 '20 at 12:28
• You could be interested in Judge Dredd LawGiver "A Lawgiver can only be operated by its designated Judge owner, whose palm print is programmed into the gun's memory." – Drag and Drop Jul 27 '20 at 13:31
• As an inventor of a mysteriously similar concept, the flaw in your reasoning is that detonation occurs when one merely touches the gun. Someone isn't trying to kill you with your own gun until they pull the trigger. – SSight3 Jul 27 '20 at 14:28
• You might first look into current laws about setting booby traps and such. Unless your society is very different, you could be in major legal trouble if someone else picked up the weapon. You might also look at the problems caused by leftover land mines and such. – jamesqf Nov 3 '20 at 16:07

A smart gun which only fires in the hands of an authorised individual -- which may include any soldier in your army -- is a useful and practical concept. It may have issues when transferring weapons between units, if someone's fingerprints change etc.

A weapon which explodes in the wrong hands is a dangerous liability. It means all a captive has to do is try and grab a gun to kill their captor (and themselves). It means whenever the ID system glitches, due to a change in fingerprints (wear, injury), someone may be injured or killed. And it opens up a huge vulnerability to cyber or other attack.

It would also have plenty of opportunity for accidents -- "Take those weapons to the quartermaster" BOOM! "Oops, didn't realize he was a civilian contractor."

• Cause of death: forgot to take off gloves – John Dvorak Jul 24 '20 at 19:16
• Smart guns have actually been considered on a number of occasions as a concept. They almost never get anywhere because of the engineering problems inherent in designing them (there's just not enough room on a semi-automatic handgun for a useful power source, and handguns are the biggest target for this type of thing), as well as the fact that failing safe would make the gun impractical as an actual weapon (jams and misfires when you need to actually shoot something are bad enough, no sane person is going to want a weapon that may randomly refuse to work). – Austin Hemmelgarn Jul 24 '20 at 19:22
• This is the main reason booby traps are illegal in real life. Real intruders are rare, rarer than (for example) the gas company or a fireman needing access to the building. So who's the typical booby trap victim? An emergency responder, or a utility worker, or a neighbor trying to be helpful. – Ton Day Jul 25 '20 at 4:12
• @FrankHopkins It can do that in cases where you actually do need to shoot someone though, too. Imagine a home invader coming at you with a knife, while your gun fails to recognize your fingerprint. – Ryan_L Jul 26 '20 at 0:11
• it also turn every dead soldier into a landmine for locals, including children. and landmines and booby traps are against the Geneva convention for a reason. – John Jul 26 '20 at 2:13

There are cases where you want someone to handle the gun without firing it.

Just to name a few:

• the legitimate holder has lost the gun and someone returns it to them
• the legitimate holder is dead but a comrade can still use the weapon
• the gun has to be serviced/inspected
• the gun has to be handed over in custody

Moreover, having the explosive gun would give to anybody a hand grenade. Forget about allowing carrying a gun with no ammunition as a way of preventing accidents.

I think you are creating more problems than you are solving.

• I think you are creating more problems than you are solving. This is what's most fun about reality-check. – The Square-Cube Law Jul 24 '20 at 15:35
• A hand grenade with an incredibly complex software problem as a pin! – Cort Ammon Jul 24 '20 at 16:51
• Imagine owning a gun that automatically kills your next of kin when they inherit it from you – Robyn Jul 24 '20 at 20:54
• @Robyn Or if, during a moment of inattention, your young child get their hand on your gun. Instead of possible accidental discharge (normal gun) with-or-without injury, or zero discharge (normal smartgun), you have a guaranteed maiming on your... bloody stumps. – Chronocidal Jul 27 '20 at 15:16
• I can give a personal example. RCMP officer I knew was stabbed in the shoulder while he had a carbine on a tactical sling. He was taken to the emergency room by a bylaw officer and was still lying on the bed with it. The nurses didn't want to touch the gun and he didn't want to release control to someone who didn't know how to handle it. He knew I'd been the Canadian Forces and that I'd been trained on the M-16/C7 platform, so he asked me to deal with it, so I took it, unloaded and cleared the misfired round, and made it safe. It would have been awkward if it had killed us all while I did it. – Keith Morrison Nov 4 '20 at 14:40

I once read somewhere that you should not bring a smart gun to a gun fight. In a world where weapons are commonplace and cheap, you are already at a terrible disadvantage if your weapon glitches, or requires time to boot and become ready.

Supposing you are suicidal enough to turn your piece into that kind of explosive, you have two extra problems:

• Since electronics can glitch at any time, at best you have a weapon that can "soft jam" at random. At worst you're carrying a Schrödinger grenade.

• Depending on the type of electronics and explosives you use, your weapon may explode when being hit by a shot, when it is exposed to high temperatures, when exposed to certain electromagnetic fields etc. And while these things are rare, you are exponentially increasing your chances of being referenced in a new DumbWays2Die video.

• These are issues, but they wouldn't be what makes this concept infeasible. It is possible to make electronics, well, not 100% failsafe of course but at least so reliable that it's orders of magnitude less likely than the mechanical parts of the weapon glitching catastrophically. – leftaroundabout Jul 25 '20 at 21:29
• ... Definitely something like time to boot can be eliminated. This concept doesn't require an operating system. Of course that would mean the programmers don't get to use a comfy garbage-collected language or anything, as well as plenty of other factors that would make this 1000× more expensive to develop than you typical throwaway consumer device, but... – leftaroundabout Jul 25 '20 at 21:29
• @leftaroundabout There's a big difference between the electronics being near-guaranteed to work and a working smart system. Sometimes no amount of money you throw at an issue can get around basic problems (things in the real world fail for lots of reasons no matter how much you over-engineer it). Lots of money has been thrown at the problem already and they are lucky to get reliability rates of 90%, never mind 99.99999% (and even then I'd still be nervous to use such a device). And that's in lab settings. – eps Jul 26 '20 at 18:40
• @eps Engineers can make car airbags work, despite the fact they have to trigger reliably and near-instantly in emergency situations, the fact there are hundreds of billions of hours of car operation per year, and the fact spurious deployments would be very bad. Drivers have not rejected airbags due to a fear of false alarms. In a sci-fi fictional world, it's completely plausible that an equally reliable smart gun could be developed, with the \$ of a big military contract. – mjt Jul 27 '20 at 9:36
• There's no doubt that smart guns have engineering hurdles to overcome, but I don't think you should dismiss the idea so quickly. Nobody's overcome these issues because no one with serious money has tried and those that do face very strong ideological opposition. Yes, it's an engineering challenge but it's not insurmountable. Moreover, it's not like regular firearms are 100% reliable either. Weapon malfunctions are a thing that every shooter has encountered. That said, a lethally exploding gun is probably a bad idea, just prevent others from using it. – Dragongeek Jul 27 '20 at 13:15

OK, I'm going to take a slightly different approach to frame challenging this, because other answers have covered why making it explode when someone other than the owner picks it up is a bad idea.

There are two big issues here:

### Smart guns are actually not as amazing of an idea as people make them out to be.

Conceptually, it's awesome, only you can use the gun. I've even seen some concepts where you can remotely lock or brick the weapon. The thing is though, nobody who advocates for these considers what happens when this tech fails. You either fail unsafe and the gun operates as if it weren't a smart gun (at which point you're just protecting against casual usage by spending a lot of extra money, possibly worth it for someone with kids in the house, worthless for law enforcement and the military), or you fail safe, and the gun stops working.

Failing safe is the only option that makes sense given the main reasons most people who advocate for smart guns are advocating for them. The problem with this though is that when you need a gun, you need it to work, period. The importance of reliability is why Kalashnikov rifles, and Uzi SMGs, and Glock handguns are all so popular, they're damn near impossible to kill, no matter how badly you treat them. A weapon that you do not know for certain will work is actually worse than no weapon at all, because most people will assume in the heat of the moment that it will work, and acting on that when it will in fact not work is more dangerous than acting as if you did not have a weapon in the first place.

There are then the numerous engineering problems inherent in trying to fit all the required electronics into the gun and making sure the impact loading on the parts resulting from the weapon firing does not break things. All of those engineering issues are technically solvable at this point in time, but they are far from cheap to do right.

### For your specific case, you couldn't actually get enough of an explosion to do anything more than destroy the gun.

As mentioned above, there's not much 'free' space in a gun. On top of that, you couldn't safely pack most explosives into the gun anyway because of them being heat sensitive (firing a gun produces a lot of heat, which has to be dissipated somehow). That leaves you with the powder in the ammunition itself, but the reality is that that's not actually as dangerous as it sounds. Without the chamber to support the casing, a single round of most small arms ammunition detonating just kind of pops. The bullet doesn't really go much of anywhere, the casing might fragment if you're unlucky but probably will stay mostly intact (but end up very distorted). The biggest hazard is really the risk of the heat from the combustion of the powder starting a fire (and this is a very real risk, the combustion temperature of most modern smokeless powders is high enough to ignite paper or cardboard and sear wood). Even if all of the rounds go off at the same time, all it's really going to do is damage the magazine and probably the gun itself.

This leaves you with only one realistic possibility: the barrel gets sealed while someone other than the owner picks up the gun. One of the few truly dangerous failure modes for a modern firearm is when the barrel gets blocked. If you're really lucky, firing a gun with a blocked barrel just destroys the gun. In most cases though, it causes serious injury to the person trying to fire the gun, and potentially to those nearby as well, but it's really not an explosion in the sense most people would think about it (it's more like a pressure cooker with a blocked pressure relief valve detonating), and while it usually doesn't cause serious injury to anybody other than the person holding the gun, shrapnel from the detonation can easily fly quite a ways away and still be dangerous.

The problem with that though is that it makes it even more dangerous to have one of these than a smart gun that just disarms itself when it would not be active, because there is no way to make it fail safely (and of course the reasons that others have pointed out).

# It's cheaper to lie

The other answers explain why it's a bad idea to make all of your firearms explode when touched by the repair guy. I just finished the book Active Measures, which has me thinking about military intelligence and counterintelligence. There's a long history of armies inflating the capabilities of their forces (it's described in The Art of War and other famous texts). You could develop the technology and release training videos featuring a soldier firing a rifle and then handing it to a dummy that explodes when its hand is lowered onto the sensor. Whenever there's an explosion on a base with casualties (which tragically does happen sometimes) blame it on somebody trying to use the wrong rifle and causing an explosion. Train your quartermasters and troops that all rifles must never be used by anyone else. Then send rifles without any explosives to your soldiers. They can still have a fingerprint recognition system but no explosives.

For soldiers, the attack surface is just not that big in the first place. Maybe in a large, complicated battle with a well-equipped foe, you might have enough pockets of troops being overrun that some enemy troops will have the opportunity to grab your guns and use them against you, but how many of them will actually care? (Apparently their weapons aren't bad, since they managed to overwhelm your position.) Picking up and using a new weapon in the heat of the moment isn't that big of a game-changer.

The bigger potential is stealing your weapons to use them later - replacing their own worn-out or lost guns, building up their forces, sort of thing - or stealing weapons out of your supplies. In either of these cases, though, they have plenty of time to tamper with whatever anti-theft devices you might put in place.

I'm not in military appropriations, but putting in a complex, expensive device that poses a constant threat of blowing your troops into little bits to avoid a handful of incidents of stolen weapons seems like a bad trade to me. An extra grenade or a few dozen rounds of ammo to keep the enemy off you would be a more prudent investment.

Others have noted the many reasons why it would be a bad idea to have this on a gun. It means no maintenance, accidents, no sharing weapons, no imprisoning soldiers, no capturing people. That said, it could be useful in a narrow range of situations.

What you want is something that can only be used by particular people. Insert login genes to your soldiers, a barcode on their wrist or such, and so long as they hold it the gun is safe. They can swap it, use it on others, do lots of things. It can be set to different loadouts. If you are policing civilians, you probably don't want it exploding. If you are on a special forces mission where you are a deniable asset, the gun exploding if someone takes it is good, as then they can't steal your tech.

# Bluetooth Bracelet

Instead of an unreliable, slow, fingerprint scanner (which fails if the shooter is wearing gloves, etc.), add a Bluetooth (or equivalent - should be something reliable but short-range, and hopefully not subject to jamming) syncing device to the weapon, paired to a bracelet worn by the owner. This bracelet should be locked so that it cannot be removed without the key, which the soldier should not carry on their person.

When the gun needs maintenance, or is being transferred or sold to another person, the key is acquired from the base (these may be kept in a secure location controlled by a superior officer, much as ammunition often is on modern bases), the bracelet is removed, and both are given over to the repair shop/new owner.

The bracelet is set to trigger the gun's destruction if removed forcibly, such as by killing the soldier and/or severing their arm to get it off. (It can check the owner's pulse, so you can't just carry around a severed hand in order to keep the bracelet synced up.)

Most of this is possible with existing technology - the only exception being the self-destruct. It might be more feasible to simply prevent the gun from firing when not synced up.

• Hopefully not subject to jamming, indeed! The first time someone pulls off jamming in combat... explosions all around, as an entire regiment in the field is wiped out practically at once, and then that army has to abandon all their "smart" guns and use something else. – Dronz Jul 27 '20 at 6:22
• I would definitely suggest it explodes when someone attempts to use it without the bracelet, rather than simply when it loses connection. Otherwise recruits barracks would be in a constant state of explosion from all the forgotten sidearms. – DBS Jul 27 '20 at 15:23
• @DBS Another reason I still say the self-destruct feature is kind of silly to begin with. Much better to simply prevent them from firing. – Darrel Hoffman Jul 27 '20 at 15:26

wears gloves while handling gun

Gun: BOOOOM

Its far too risky to use that kind of technology in your weapons. Dirt, gloves or something else like the hands being very cold can make identification difficult. Weapons as a rule are also build to be as sturdy as possible so they can handle as many cycles as possible without damaging itself. Adding internal layers of explosives is going to mean you'll need to service your weapon more often as a failure is going to be a lot more catastrophic. I find using this kind of technology to lock a weapon to be the limit, as a momentary malfunction just means a momentarily locked weapon, not shrapnel all over your hands, arms, face and chest.

Then there's the already mentioned things like

• maintenance,

• the need to give fellows your weapons to borrow for whatever reason,

• mass-transport of weapons and supplies before distribution, just imagine having to key everyone's biometrics before combat or someone keyed his biometrics and put it back in the box...

• instructors and team leaders who should be able to handle your weapon,

• what battle damage does to your weapon (I dont want to walk around with a bomb in my hands because I had to swim/crawl through mud/the weapon got hit by bullets or shrapnel/wear and tear).

• lifespan of the explosives versus average lifespan of a weapon

## Depends on the weapon

Most small arms are not worth the risk of accidental collateral damage. In general, there is nothing so special about a pistol or a rifle that national security would be compromised if an enemy faction got thier hands on it; so, such tech would have to be reserved for something so advanced that it could completely change an enemy's technological threat level.

1 - Self aiming firearms: These have been around for a few years now on civilian markets, but when you make this concept military grade, it's not enough to just hit a person from 1000m away. Can it work with IR scanners to hit a person who is hidden by a smoke cloud? Is it's shake compensation good enough to fire while running? Does it work with bullets that can corse correct after leaving the barrel or shoot around walls? Can it read body language to fire at someone before you pull the trigger if they look like they will shoot 1st, or vise versa, not fire at someone who is unarmed even if you do pull the trigger? There are hundreds of features a military grade smart gun could have and risking the life of the soilder carrying it may be worth making sure the enemy never gets those same abilities.

2 - High Energy firearms: In a recent question, I brought up that the US military now has the technology to make lethal hand portable lasers by scaling down HEL beams, but if one were to be stolen, that means that enemies could replicate the technology and scale it back up to make all sorts of pretty bad-assed weapon systems. The military implications of what a HEL beam could do are so numerous, that it's probably worth the risk of putting a biometric bomb on them... assuming you even have a reason to give a soldier a hand held kilowatt laser rifle to begin with...

3- Things bigger than small arms: Tanks, missile systems, fighter jets, etc. are all very dangerous and full of military secrets. So let's say an enemy seized a SAM truck, and tries doing some test launches to record its exact capabilities, exploding on the launch pad would be a VERY good thing for your county, because if they know exactly how your weapons perform, it becomes a lot easier for them to design systems that are optimised to counter them.

There are a lot of ways to verify a user, but biometrics is probably not the best. Instead I would give each soldier a chip in thier hand with a personal activation code. The the weapon system can be keyed to any number of those codes so a single rifle might work for anyone in your squad for example. To prevent any issues, you store your weapon in a case or holster or behind a panel that verifies that both your chip and the weapon are working properly before you can open it. If YOU can't get the weapon out, you go see the armory to see if you need a new chip or if the weapon is malfunctioning. But if any enemy can't open the case, holster, or pannel, they do the next logical thing and cut it open. Then at that oh so rewarding moment they think they've gotten past the hard part, it exploded when they go to pick it up/use it.

All you need to do is have a smart gun that is biometrically locked to a given user or group of users. If someone else tries to use it, the smart gun refuses to work for them.

No need for silly gimmicks like high-voltage electric shocks or horrendously dangerous explosive devices. Guns are dangerous enough, do keep them idiot-proof too.

I'd say auto-disable is better than auto-detonation.

Otherwise, lost or discarded firearms will have to be treated the same way as IEDs, landmines and unexploded ordnance. Which would result in a lot for FUBAR for ordinary infantry, the logistics train, and inevitably the bomb disposal unit that has to be called just to "safe" a smart gun.

If you want a pistol for an assasin that destroys itself after the assasin is dead, you have a few options other than explosions:

1. The whole gun can be made out of a material that slowly decays or melts [even ice ... for something like a railgun f.e. ]
2. Instead of explosive packs inside the gun that detonate it, you can always trigger acid that disolves the material.
3. If for a suicide attack, you could have the whole assasin detonate instead only his gun lol.
4. Consider the option to remotely trigger the explosion rather than have it linked to the heartbeat / fingerprints of your Assassine. Remember - YOU want to have control over the gun, it should not be triggered randomly because your guy has dirty hands / got zapped and burnt his rfid implant. The downside with this is it could get hacked

Also: we already have smartguns these days. What's the point in including explosives when you just can tape / stick a bit c4 on the weapon and add a simcard and an Arduino Nano....

AFAICT no one else has mentioned this countermeasure yet:

Mix tiny skin flakes from your side (easily acquired) into a sticky aerosol substance and blow clouds of it at enemy encampments whenever the wind is right. Some of it lands on their guns or their hands. The next time they touch the trigger...

BOOM.

• Or just use regular poison gas? – clockw0rk Jul 27 '20 at 13:20
• "Tiny skin flakes" are already in the air everywhere. You may know them as "dust" (of course there are many other things in it). I agree with top answers that this entire concept is dumb, but I'm still pretty sure it wouldn't be that beyond stupid to react on each and every tiny skin flake. – Oleg V. Volkov Jul 27 '20 at 15:11

There are actually 3 questions:
Is it useful? Is it practicable? Will the gov or military fund it?

For the last one the answer is yes. No matter how silly it looks, there is a high probability that they will fund it.

For the rest:

Who has to identify the owner? The seller?
Is it a trivial task for the owner using the manual?
Is the task trivial enough to be done by a thief?
How long does it take to identify an user? Is it virtually as fast as a standard gun?

How does that work with gun in the street?
Does cartel have to keep a clear list of peoples, ADN, and guns?
How does privacy work? Do we have to reset the gun before dumping them in the river or does it retain the identity of the one that fire the gun?

How does security work?
How far do I need to be from the gun to reset the user, invalidate, or simply send the wrong information to the identifier? Could it be done with a drone flying over the base? Could I jam it and prevent any gun use in the area?

Maintenance?
Is the mean of identification durable enough to be used in a war situation? Is changing it hard?
Does it suffer from a lack of electricity? (Sorry, my gun is loaded)
How does it work if:
I have a glove? I am covered with oil? I am covered in mud?
I am covering in others people blood?

Do you have to register all my fingers?
How do you identify your gun in a bucket of guns?
In case of emergency, people rush out of the room, picking gun in the rack, now people have to call the roll and carefully check the serial.

How do you define legitimate use?
Could my wife use it to shoot at me, and claim that I'm the only use so it's suicide?
Can she use it in a home invasion situation?

For selling purpose, could you design a situation where it will be more useful than a simple gun. Peoples trained with normal gun will re-act the situation, and you are not the one that paid them.

• you don't need fingerprints for an asassin gun - an implanted rfid chip/a keycard should fit. this way it can detonate when the heartbeat stops,too – clockw0rk Jul 27 '20 at 13:14
• Yes we can use those sensor. But before commiting to a technology there is a ton of thing to specify. While biometric and reader will require physical contact. Things that do not require physical contact can be jammed or read. You can have a private key system to get auth with your gun and have no biometric or private info ni the gun nor in the key. But you will need a thing that certificate/provide the key etc. Their is a ton of solution using RF, sensor, key etc. And Auth protocole that may be applicable. – Drag and Drop Jul 27 '20 at 13:26
• Imo you should not choose fingerprints, it's too unreliable. Dirt, water and glove are too common To choose a system that fail with those. – Drag and Drop Jul 27 '20 at 13:27
• An other bad choice would be Face ID and the camera under the muzzle. – Drag and Drop Jul 27 '20 at 13:36
• Why not have the gun implanted in your arm, if we go full science fiction. This way there was room for explosions. I however feel that a gun that dissolves with acid would be more sublime and not as dangerous to yourself.... – clockw0rk Jul 27 '20 at 13:43

To misquote Jurassic Park: you spend all that time wondering whether you can, you forget to ask whether you should.

## Is it realistic?

In the realm of possibility.

Electronics manufacturers have forayed into biometric locks for a while now. There is no reason that couldn't be adapted on a gun.

Of course, the mechanisms you find commonly on phones and laptops have dubious degrees of reliability (at least my allegedly-smart phone does), so the technology most likely needs to mature more before it is reliable enough to be sold. But if it was a legal requirement, you can be certain the technology would catch-up.

The explosive charge itself would be more of a challenge. Many have noted there isn't much space to make a big enough boom to reliably kill someone. Still, you only need a charge big enough to send tiny pieces of metal flying. Even if it doesn't kill you, it's nothing to sneeze at and certainly not something you'd want to try your luck with. But if won't be nearly as cool as you envision it.

So while current technology may be lacking, it shouldn't be an unsurmontable obstacle.

## Should it blow up?

I'd answer that with another question:

Are you out of your mind?

While there is some merit to disabling a gun, making it blow up is a very bad idea indeed.

Beyond the fact anybody can use the gun to blow you up if they're willing to blow up with it, or issues with false-negatives, I'm not sure that adding an explosive charge in a tool which uses explosions as its main propelling mechanism is a particularly sane idea to begin with. The worst case scenario for any malfunction (e.g. jam, misfire, overheating, current surge) now become "self-destruct charge triggers". You don't have to be a physics major to know this has bad news written all over it.

You also have to imagine that if there is any chance that it could be triggered remotely (e.g. an electromagnetic signal that induces current in the mechanism, or something funny like that), you know you positively don't want it. You should be less worried about a malicious actor exploiting such a weakness than finding it out when your troops start exploding when they microwave their dinner at the base.

In general, keep in mind that if you are ever considering putting a self-destruct mechanism in a device, you have to compare the probability and impact of the worst case scenario (i.e. the gun blowing up unprompted) vs the probability and impact of the device being intentionally misused (i.e. somebody stealing your gun). Here, it's very much more trouble than it can ever hope to be worth.

## Should you even lock a gun?

No.

I said above there is some merit to it, and that's mostly for civilian uses. Actually, it's just for one case, to prevent kids from shooting themselves accidentally. I dare you to find a more useful and practical case for the technology. But that is of course 9000% negated if the gun blows up instead.

For law enforcement or military use however, it is supremely pointless. Assuming reasonable reliability, you cannot guarantee a false negative, which would be problematic in a shootout. Even if the gun doesn't explode, a gun that doesn't fire is the very definition of useless. And for all narrative purposes, this would obviously always happen at the worst possible time.

Even assuming perfect reliability, you have to ask why? If someone is in position to use your gun against you, there's a good chance either A) they have their own gun they can shoot you with, or B) they are in a position to beat you up with your biometrically-locked gun and that's arguably even more humiliating.

If a force can collect enough dead soldiers and unattended weapons, you also have to question whether they are really struggling for weapons to kill you with, or whether your troops are competent enough to win at all.

Ultimately, in your case, the only thing the lock prevents would be adding the insult of being shot by your own gun to the injury of being shot at all, which is of very little comfort. Even with an overblown budget it'll be a hard sell.

As others have pointed out, it is a dangerous idea for many reasons. For equally dangerous reasons, it makes for a nice plot device. The Lawgiver from Judge Dredd is one such. Another is the MP-35 from Scalzi's Old Man's War series. Part of the permission & firing system in the Old Man's War series was a computer embedded in the operators skull (the "BrainPal").

A similar concept was used in making Permissive Action Links for nuclear weapons. These were built inside nuclear weapons to ensure Always and Never: they must always go boom when intended (and authorized) to work, and they must never go boom when unauthorized. PALs were built into the "physics package" in such a way that removal is impossible and that if you stole one such weapon, you would need to effectively rebuilt it completely (the only way to use a stolen weapon would be to be a nuclear power able to build your own).