Decode Drivers Licence Barcode

hmmm on what camera spec? It didnt like my 5mp moto x camera. microblink was the only one i could get working.

If you've got a higher spec camera it might be worth checking google vision api out - they have a native barcode reader
Thanks. Might be the fact that I tested in a 16mp camera (Galaxy S5)
 
Decryption details are here: http://pastebin.com/gb049dfx
Still tricky to get the implementation right.
Once the data is decrypted, the decoding is not that complicated (may post details later if I get the time to write it all up).
Decoding the photo is complicated - no idea how zeely does it.
Would be nice to get some open-source code for this sometime.
 
Others may have said this before, but adding again just for clarification:

- These are just the public keys used to read the barcode - it can't be used to print licenses.
- Only info visible in plain text on the license is present in the barcode. You don't get access to additional info - you just get access faster (barcode scanning instead of OCR / typing).

That means there is no reason the keys shouldn't be publically available.

Some companies have a monopoly on libraries to do the decoding, just because these keys are hard to get (it seems to be impossible to get these keys even from department of transport). Nothing else in the decoding process is complicated (except for the photo), but they still charge a lot for these libraries.

So I'm posting the keys here, hoping it will help others.
 
- Only info visible in plain text on the license is present in the barcode. You don't get access to additional info - you just get access faster (barcode scanning instead of OCR / typing).

the photo is also encoded into that barcode, and THAT is what makes it so special. Its a VERY secure form of identity. If the photo in the barcode matches the photo on front and it looks like the person showing the card, then you can be almost certain its a legit form of identity
 
So you're saying that it would be fun to publish some free stand-alone code which can read a pdf417 barcode and decrypt all info (maybe excluding the image) ?
 
the photo is also encoded into that barcode, and THAT is what makes it so special. Its a VERY secure form of identity. If the photo in the barcode matches the photo on front and it looks like the person showing the card, then you can be almost certain its a legit form of identity

Unfortunately it's very easy to make a broken barcode and blame it on the scanner that inexplicably can't scan it (in my experience it happens often enough with valid barcodes).
 
the photo is also encoded into that barcode, and THAT is what makes it so special. Its a VERY secure form of identity. If the photo in the barcode matches the photo on front and it looks like the person showing the card, then you can be almost certain its a legit form of identity
Like my photos is broken in Barcode:)
 
I don't know how apps work and if de-compiling is possible (easy to do) but Compendium Assist just released their app which has drivers license barcode scanning functionality (it decodes the photo too) as well as vehicle registration barcode decoding.

Pretty cool how it works and can think of other uses of this functionality for other apps (access control, data collection, accident, etc).

Anyone else tried it?
 
Decryption details are here: http://pastebin.com/gb049dfx
Still tricky to get the implementation right.
Once the data is decrypted, the decoding is not that complicated (may post details later if I get the time to write it all up).
Decoding the photo is complicated - no idea how zeely does it.
Would be nice to get some open-source code for this sometime.

This looks interesting, care to share some C# code how to use the public keys I cannot import them using my code it gives me 'Bad Data' Exception :( (look at my Stackoverflow link) http://stackoverflow.com/questions/...1531169?noredirect=1#comment70268346_41531169
 
Code

Here is the code I tried but due to the fact that the Exponent is 16 bytes `ImportParameters` is throwing an exception, if anyone managed to get the decrypt working please share some code

string longKey = @"-----BEGIN RSA PUBLIC KEY-----
MIGWAoGBAMqfGO9sPz+kxaRh/qVKsZQGul7NdG1gonSS3KPXTjtcHTFfexA4MkGA
mwKeu9XeTRFgMMxX99WmyaFvNzuxSlCFI/foCkx0TZCFZjpKFHLXryxWrkG1Bl9+
+gKTvTJ4rWk1RvnxYhm3n/Rxo2NoJM/822Oo7YBZ5rmk8NuJU4HLAhAYcJLaZFTO
sYU+aRX4RmoF
-----END RSA PUBLIC KEY-----";
using (var reader = new StringReader(longKey))
{
var pem = new PemReader(reader);
var o = (RsaKeyParameters)pem.ReadObject();
using (var rsa = new RSACryptoServiceProvider())
{
var parameters = new RSAParameters
{
Modulus = o.Modulus.ToByteArray(),
Exponent = o.Exponent.ToByteArray()
};
rsa.ImportParameters(parameters);
}
}
 
After many attempts I managed to load the key with RSACng in .Net 4.6.2 however I stumbled on a new issue(s)
1) Private key is required for decryption (all hashing algorithms gives exception 'Keyset does not exist')
2) Using the Encrypt as stated in pastebin doesn't work with any of the Hashing algorithms in .Net 4.6.2, exception being thrown is 'Additional information: The parameter is incorrect.' ie
- OaepSHA1,OaepSHA256, OaepSHA384, OaepSHA512, MD5 or Pkcs


That being said it means that (Decrypt each block separately. Decrypted with RSA ENCRYPT with
the public key.) is either incorrect or more information is needed on how to do this
 
After many attempts I managed to load the key with RSACng in .Net 4.6.2 however I stumbled on a new issue(s)
1) Private key is required for decryption (all hashing algorithms gives exception 'Keyset does not exist')
2) Using the Encrypt as stated in pastebin doesn't work with any of the Hashing algorithms in .Net 4.6.2, exception being thrown is 'Additional information: The parameter is incorrect.' ie
- OaepSHA1,OaepSHA256, OaepSHA384, OaepSHA512, MD5 or Pkcs


That being said it means that (Decrypt each block separately. Decrypted with RSA ENCRYPT with
the public key.) is either incorrect or more information is needed on how to do this

So would you say this is just a wild goose chase then? My colleague and I have also thrown many efforts at trying to use those keys. No joy so far!
 
So would you say this is just a wild goose chase then? My colleague and I have also thrown many efforts at trying to use those keys. No joy so far!

Nah im not saying that they are incorrect, im hoping for that these codes are good, maybe a longshot but I have also thrown many efforts into it. Im hoping for a breakthrough sooner rather than later and I cannot afford to go through exid or any other 3rd parties as an alternative.

The monopoly on 'public' information must end.
Till then my project can wait and my research will continue

Maybe it is a wild goose chase but im hoping that it is not
 
Nah im not saying that they are incorrect, im hoping for that these codes are good, maybe a longshot but I have also thrown many efforts into it. Im hoping for a breakthrough sooner rather than later and I cannot afford to go through exid or any other 3rd parties as an alternative.

The monopoly on 'public' information must end.
Till then my project can wait and my research will continue

Maybe it is a wild goose chase but im hoping that it is not

I jsut acquired a 3310g scanner from one of those companies. But they now say that they do not have an SDK, as their website promises, and the devryption done by the scanner is primitive at best. It appears to me that they are all still just figuring it out themselves..
 
I jsut acquired a 3310g scanner from one of those companies. But they now say that they do not have an SDK, as their website promises, and the devryption done by the scanner is primitive at best. It appears to me that they are all still just figuring it out themselves..

You have to buy a licence for each device, this licence all comes from one company if you do research litterly all leads will lead back to this company. The company name is Excelent ID, but now they are Codentity (same people have created multiple companies doing the same thing)

BUT the licence cost R1000 (the first time I spoke with them it was 500, a week later it was 1000) and more per device, and if you don't buy the device directly from them you pay R3000 or more per device, but the devices cost tons more from them than from the Original Suppliers.

That is why I have not purchased the licence.

Hopefully the guy that posted the keys will read this and come with some code samples on how to use them or someone else come and give suggestions.

There is a guy named Zian who managed to figure out (or he is using these other guys) but he doesn't want to share the key (if he has it) and his email response to me was 'Pricing is R1500 per terminal per month per estate'

I didn't take it because im not writing a software for estates and 1500 per device per month is just expensive.

I am doing some part time programming for another company who are using the SDK from Exid, it is working great but if you don't have money just to throw away like toilet paper it is not worth it.
 
Last edited:
You have to buy a licence for each device, this licence all comes from one company if you do research litterly all leads will lead back to this company. The company name is Excelent ID, but now they are Codentity (same people have created multiple companies doing the same thing)

BUT the licence cost R1000 (the first time I spoke with them it was 500, a week later it was 1000) and more per device, and if you don't buy the device directly from them you pay R3000 or more per device, but the devices cost tons more from them than from the Original Suppliers.

That is why I have not purchased the licence.

Hopefully the guy that posted the keys will read this and come with some code samples on how to use them or someone else come and give suggestions.

There is a guy named Zian who managed to figure out (or he is using these other guys) but he doesn't want to share the key (if he has it) and his email response to me was 'Pricing is R1500 per terminal per month per estate'

I didn't take it because im not writing a software for estates and 1500 per device per month is just expensive.

I am doing some part time programming for another company who are using the SDK from Exid, it is working great but if you don't have money just to throw away like toilet paper it is not worth it.

I get what you're saying. This is just a pet project for me. Not looking to make any financial gain here. In fact if anything, the people selling the scanners would make money because my software would still require a scanner to scan the barcode. So they gave me a scanner to test with. But it is useless without an SDK or some software.
 
Top
Sign up to the MyBroadband newsletter
X