Encrypted registry

I've been kicking around this idea of a secure, encrypted registry of firearm ownership. Something that protects the personal details of individuals, but still serves the purpose of being able to find the registered owner of any particular firearm that you have on hand, IE recovered from a crime scene.

Using AES, 256-bit encryption and the make, model, & serial number of a firearm, we can generate a hash for an ID and encrypted text entry for registration. I used "Ruger 10/22" as the make/model and "ABCD1234" as the serial number. That gives me:

Registry ID:

WeNuAVwlHzAuYMQu4EoBBw==

Registration data:

w0JTu+s9jalFmnk5621Z3hLKV3FIpPrx4fSuUOKVc5DKgi63wUxE22LR9HBO92WhIk4Kprvd561hEYTxoNRqN7vUWvCR5ttVE4mMyfs+Nb/pFyk76wPtHL4MiDEUJsUx

So a national firearm registry would be supplied with and store something like this:

"WeNuAVwlHzAuYMQu4EoBBw== " : "w0JTu+s9jalFmnk5621Z3hLKV3FIpPrx4fSuUOKVc5DKgi63wUxE22LR9HBO92WhIk4Kprvd561hEYTxoNRqN7vUWvCR5ttVE4mMyfs+Nb/pFyk76wPtHL4MiDEUJsUx"

Along with millions and millions of other similar, but unique entries.

Essentially, you need would need the weapon in hand in order to be able to find the correct entry and decrypt the registration info. Go ahead and copy the registration data into this webform, enter 'ABCD123' as the key, make sure it's set to 256 Bit, and hit the decrypt button.

Currently, brute-force methods for a 256-bit key size is 3.31 X 10^56 years, which is essentially impossible from what I understand: https://www.eetimes.com/document.asp?doc_id=1279619

Maybe someone with more knowledge of encryption and decryption methods can advise me on whether or not this is a viable solution.

Posted Mar 28, 2018, 9:52 PM UTC · edited

028
yesman782•

Nope. No registry at all. Nothing not now, not never

20
SniperGX1•

Serials aren't secret, you could just enumerate all the records by incrementing serial numbers.

9
CBruceOP•

That's basically a brute-force attack. This is the part of encryption security I'm not clear on, but I know it has to do with the length and potential characters of a password that determine it's entropy. Serial numbers are generally case insensitive alphanumeric of indeterminate length, which is 5.17 bits of entropy per symbol. So even an 8 character serial number could be brute-forced relatively quickly with a massive cracking array.

But, that's per entry. And there's undoubtedly ways of creating a more secure passkey than just using the serial number directly.

I think the basic idea is that there's enough unpredictable data of indeterminate length on any given firearm that we should be able to securely encrypt it in a centralized database in a way that's theoretically impossible to decrypt through brute force.

0
SniperGX1•

Length and character set is complexity not entropy. Entropy is simply randomness added to the plaintext message to randomize the result to help protect against pattern detection. This is why when encrypting a linux device you often have to wiggle your mouse around randomly to add randomness. It's not even brute force since serial numbers aren't secret. You can just call glock and get a list of every block of serial number they issued. Then all you're doing is checking to see if that gun is registered or not. You are verifying the known, not throwing random characters at something encrypted.

So long as you're using known information to generate a passphrase you can attack encryption pretty easily. To add complexity (like you would with user passwords) you would incorporate a salt. The salt being a secret only known to the encrypting party and can be supplied during decryption. Then you would need to know passphrase + salt to decrypt. Since the salt owner in this case would be the government, the one party we want to prevent from having the data would have the ability to retrieve it.

3
unrulywind•

Will you agree that we need a religious registry? That way if a church calls for a jihad, or interferes with a government function (like a military funeral), we can find out who all the members are quickly. I mean, we would never use this to persecute anyone. I know you think this was a bad idea when the Germans did this with tattoos, but this is different, we just want to ensure that everyone has a good, government qualified religion.

3
CBruceOP•

This is apples to oranges. The stated purpose of a firearm registry is not to keep tabs on gun owners, but to keep a record of who a specific firearm belongs too. That is a useful tool for law enforcement for the investigation of criminal activity, to restore lost property, to help investigate potential straw buyers or crooked FFLs, etc.

The fundamental problem with such a registry is that it can be easily abused to fascilate mass confiscation. Or that database can be released to the general public and used to target gun owners. Either for political reasons or targetted theft. But, if a database could be built in such a way that the personal information for each registry is impossible to read without passkey, and that passkey is only available on the specific firearm, then it could serve law enforcement purposes without exposing everyone else to risks of abuse.

I'm not suggesting this a good idea, just a better idea than a plain-text registry, which is virtually impossible to secure or prevent abuse.

I mainly posted this to see if the idea was even feasible. And after a number of comments I don't think it currently is. There's just not enough unpredictability or complexity to the information that's currently stamped on firearm receivers to really make it secure.

1
unrulywind•

It's always amazing to me that whenever someone wants to remove another persons 4th amendment rights, they do it by simply making hiding things illegal. Why do you think the kids have to have clear backpacks now. Because if we ban walls and boxes, then we don't have to search.

It's not apples and oranges. I didn't say the religious registration was to keep tabs on religion members, but to keep a record of who is in each religion in case that church goes rogue. Similarly, a gun registry is useless until you tie it to a person, which it instantly does. The registry does not lead you to the weapon, but to a person. How many stolen police weapons are used in crimes? These are very well tracked weapons. How much does it help?

In the end, if a new power is granted, then people will look for was to use it. How many times has the patriot act been used to catch drug dealers and such. I'm not saying I like those guys, but that is specifically not what those powers were for.

I agree that the registry information we already have should be better encrypted and controlled, but most encryption is only temporary against all but the most amateur attacks.

1
keeleon•

Im actually fairly ok with a registry but this argument honestly makes me rethink it.

0
StudlyMadHatter•

The purpose of the second amendment is to defend against tyranny. Any type of registry makes it harder to do that (because registration inevitably leads to confiscation) without improving safety at all. “No” to registration under any circumstances.

3
keeleon•

I keep hearing registry leads to confiscation. Ive lived in CA for over 30 years and Ive never been concerned with confiscation. Perhaps you should say registration ENABLES confiscation. Saying it LEADS to it is like saying gun ownership LEADS to murder.

-1
CBruceOP•

https://www.washingtonpost.com/national/these-california-agents-are-coming-for-your-guns/2018/02/24/b72fb252-183a-11e8-92c9-376b4fe57ff7_story.html?utm_term=.48e4d312174c

http://krcrtv.com/archive/california-gun-confiscation-law-takes-effect-jan-1-1

There's also the kerfluffle that happened with the SKS and the yet unanswered question as to what's going to eventually happen to registered "assault weapons" based on what's happening right now with legally-owned "high capacity" magazines.

2
StudlyMadHatter•

Let me put it to you another way. What is the purpose of registration other than confiscation?

2
keeleon•

To make sure that weapons stay out of the hands of people who shouldnt have them. So I suppose it IS for confiscation. But Im pretty sure we can all agree there are people who shouldnt have them.

0
StudlyMadHatter•

That’s what background checks are for. As for who “shouldn’t have them”, there are a lot of people who like to move that goal post. How about having your guns removed because someone accused you of being a terrorist, or because someone says your hit or wife, or because someone says they think you’re sad? Nothing proven in a court of law, mind you, just someone’s accusation. These are all real proposals.

1
SleezyD510•

whats the purpose of encrypting a registry? what does that do to curb the possibility of the government using it as a list to confiscate guns if the government has the ability to decrypt it?

2
CBruceOP•

The government wouldn't have the ability to decrypt it. They would need a specific passkey for a specific record in order to decrypt it. That passkey would be generated by the identifying marks that exist on a firearm, so you'd need to have the firearm in hand in order to access the records associated with that firearm.

Unfortunately, I don't think the idea of using the make, model, & serial number would be secure/unpredictable enough.

But I still think the general principle has merit in lieu of a universal registration scheme that stores records in plain text.

0
mightyarrow•

If you can build a system, you can UNbuild a system.

2
kubrick66•

The difference with password hashes is that the actual password is never stored, just the hashed value like above. There is no useful data stored in the database so this method wouldn't be useful for anything really since you couldn't look up any actual data, just the hash.

Now, if you wanted to use the hashed value as the key to lookup the actual data, it would be fairly trivial to get all that data since firearm serial number ranges are often public knowledge so someone could just hash the make/model + random serial num and pull up anyone's data. No physical firearm needed.

1
Kimber_EDC•

So no one can read it except authorized personnel, great. But what protects the owners from the biggest threat, the government?

1
CBruceOP•

The encryption does that. The whole idea is that the data is encrypted in a way that is impossible to access by anyone without having the relevant information on hand.

0
[deleted]•

[deleted]

1
DBDude•

Is your identifying record in the database and your encryption key the same thing? If so, they just decrypt using that record. Or are you not storing that hash in the database? If you are not storing the hash, then we have no way to identify a specific record in plaintext. We would have to start attempting to decrypt all of the records until we hit the right one.

But that doesn't matter. Keying on the make, model and serial is doomed from the beginning.

As far as guns manufactured in the last decade or so, the government already has the make, model, and serial for almost all of them because the manufacturers report them. All they would have to do is iterate through the database of manufactured guns, make the hashes, and then decrypt.

Even for guns where they don't already have the make, model and serial, all they have to do is get some samples of those guns and determine the what the serial numbering pattern looks like. Then they just run a progression of potentially valid serials against the database and record the hits.

Since hashing is fast, you've only slightly slowed down the listing of guns to confiscate.

1
CBruceOP•

All valid points. The problem here seems to be that there's not enough unpredictable or already recorded data of suitable length on currently existing firearms that could be used to generate a secure enough hash.

Thanks for your feedback.

1
DBDude•

If the idea is that the government can track a recovered gun, you can't encrypt it. They will have all the data necessary to decrypt the registration.

If the idea is that a citizen could prove a gun he has is registered, then it gets a bit better. The owner can possess the password, which he could give the government. The hashed password could allow them to search for the proper record when the hash is used as the primary key, and then the password can decrypt the record.

But this security is risky against a malicious government. A rainbow table is when you set a computer to just doing hashes and store all the results. Cracking a hashed record is as easy as looking it up in the rainbow table. Depending on the complexity of what is being hashed, this can take several terabytes of data. However, a malicious government could easily run one of these against each database record, discovering the password. Salting (adding extra data to your password before hashing) makes rainbow tables harder, but then they control the system so they can control the salt. So instead of hashes as a key, a citizen should have an ID and a password to decrypt all records under that ID, both unknown to the government.

In any such setup like this, after the person has given his information to prove registration, the government must generate a new password and ID, re-encrypt, and send him the new one unseen by government. Automated printing through sealed envelopes is old technology.

Now you see that gets really difficult, and it is really limited for useful functions such as criminal investigation of an owner and even returning a recovered gun to its owner.

Thus in our database we could only encrypt data at rest to make sure hackers (and curious system admins) couldn't access it. We would then enable tightly controlled access, with only a small number of people having any privileges on the database server, which means their credentials can decrypt the records. Every search and data view would be logged. A user would have to scan-in a warrant or subpoena to do a search. The system would be subject to regular third-party audits which check for the validity of the warrants for each search. If a search of the system doesn't have a valid warrant or subpoena behind it (they scanned a fake one), then that's felony charges for the person whose account did the search, and a civil tort for the citizen whose privacy he violated. Audit results would be subject to FOIA requests.

1
[deleted]•

[deleted]

1
pandaSmore•

No Step On Snek Pls

1
jsled•

As mentioned, this is just far too simple to be useful. The data you're using to generate the key is easily guessable/enumerable.

One improvement might be to have the keying info – basically a per-firearm secret – physically present on/in/obtainable from the firearm itself. It's a secret that you have by possession of the firearm itself.

But now you've created a mechanism that can be defeated to prevent the lookup of the registration, similar to scratching out the serial number.

0
CBruceOP•

But now you've created a mechanism that can be defeated to prevent the lookup of the registration, similar to scratching out the serial number.

Sure, but that's a currently existing problem with or without encryption.

Even if a registry were kept in plain text, destroying the serial number makes a firearm untraceable. This is more about is it possible to protect the privacy of firearm owners from having a centralized database while still allowing a registry to function for the specific, law-enforcement needs.

-1
deck_hand•

That's a better idea than others that I've heard. Not sure it will go anywhere, or even if it's a good enough idea to implement, but it's much more reasonable than just a clear-text database of weapon owners.

The questions I would have are: how do entries into the database get made without a record being kept, and a second, clear text list being kept - you know, for safety (or confiscation) purposes.

Secondly, how would updates be made? Say, for instance, that I sold a firearm to someone else and want the ownership data updated. I put the serial number on a piece of paper with the new owner's name and send it to Washington?

Third, if the serial number on a piece of paper works, then how someone need to have the firearm in hand to use it? Do we each get to put the data in the encryptor, generate the hash, and send in the hash, without the Feds ever seeing the original data?

If the Feds never see the serial number or name and address, only the hashed data, how do they know we didn't just give them gibberish? I mean, if I have nefarious designs on gun ownership, why would I give them my name and address and connect that to the firearm serial number I'm interested in using for such evil deeds?

-1