Skip to content

Latest commit

 

History

269 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android PIN Unblocker

A simple Android app written in Basic4Android (preferably version 12.50 with its older resources and the B4X Help Viewer).

Its purpose is to generate smartcard unblock codes using your Admin key and your phone instead of requiring a computer.

The common SLE4442 cards are memory cards only and lack a built-in processor, and thus are for data storage only.

Real smartcards are the ones such as the Gemalto IDPrime 930, YubiKey, Javacards [...]. Its Windows equivalent would be the Gemalto Response Code calculator.

Features

Android PIN Unblocker has a very simple set of features, it cans generate the Response code, get the Request code from a QR code as well as hashing text using SHA-256 or SHA-512.

Generate the Unblock code

Main application screen. Generating the smartcard response code.

Here you can type the Request code and also choose to hide the Admin key with the checkbox below it.

The supported algorithms for unblock code generation are 3DES, 2DES, AES-128 and AES-256.

The algorithm to use is automatically determined by the application based on your Admin key and Request code.

Hide & reveal the Admin key

Main application screen with a visible Admin key. Hiding the previously entered Admin key.

This application has been intended for situations where you're entering unblock codes for employees or people who stand-by next to you.

You can thus now easily type your Admin key once, then hide it with the appropriate checkbox below it.

This way nobody accidentally grabs a picture of your Admin key while unblocking your employees' smartcards.

Scan QR code for Request code

I added the ability to scan QR codes in Android PIN Unblocker using the below Basic4Android library:

You can click on the QR code button to scan a Request code.

It's used alongside a PC application such as CodeTwo QR Code Reader & Generator to do the card unblocking more efficiently.

The Request code then gets automatically input in the appropriate field once detected.

Generate Admin key text hashes

Generating the Admin key hash from text is possible inside this app. Generated Admin key hash inside this app.

It's possible with Android PIN Unblocker to directly generate text hashes within the app instead of having to generate it from other ones.

The possible choices are currently SHA-256 and SHA-512 only.

The generated hash will automatically replace the previous Admin key text.

Share the Response code

Sharing the Response code with the native Android Intent chooser.

You can see on the previous screenshots a Share To button next to the generated Response code, which will pop the Android native Intent chooser.

From there you can share the Response code over to Telegram, Signal, WhatsApp, by SMS, and so on.

Otherwise you could e.g. type the Response code automatically on employees' computers with an agent program, using the Android Share To functionality.

Tip

You can also generally type passwords & sensitive input material using your phone and the USB InputStick device, which is hardware and works for full-disk encryption as well.
It also has a KeePass2Android plugin, for example.

Share Admin keys to the App

Sharing an Admin key text to the app. The shared Admin key text is now unrevealable in the app.

Here you can see that it's possible to write your Admin key in any third-party Android note-taking application then select the text, then directly share it to Android PIN Unblocker.

That's also how you can generate Admin key hashes yourself with a different app then share the generated hashes to Android PIN Unblocker.

The app automatically verifies whether the shared text is a valid Hexadecimal string with an even length of atleast 32 characters (Hex strings only contain the characters 0-9 and A-F).
The app discards shared texts that are invalid Admin keys and will simply behave as if you launched it yourself from your application launcher.

There is no maximum length limit to the shared Admin key texts, but it must be atleast 32 characters long, be Hexadecimal and have an even length.
You may later trim the length of the text as desired from within the app, so you can share entire-length hashes to it if you wish.

Prevent disclosing Admin keys

Admin key texts shared to the app cannot be unhidden. Admin key texts hashed by long-pressing the hashing buttons are cannot be unhidden as well.

Whenever you share an Admin key to the app instead of copy-pasting it yourself, the Hide Admin Key checkbox becomes disabled and you cannot unhide it.

This feature prevents accidental disclosure of your Admin key while e.g. unblocking cards on your employees' computers.

Caution

Make sure to verify that your Android ROM doesn't have a clipboard history feature prior to copy-pasting Admin keys, Samsung & Huawei ROMs have one.

If clipboard history cannot be disabled on your phone then don't use the clipboard at all, or use a password manager with a built-in secure keyboard (e.g. KeePassDX with its Magic Keyboard, recommended version 3.2.0 for older devices).

You can also type your original text in the Admin Key field and directly generate a SHA-256 or SHA-512 hash of it within this app, by long-pressing the hashing buttons.

Long-pressing the SHA-256 or SHA-512 buttons actually generates the hash but also makes the Admin Key field unrevealable afterwards (a single-click generates the hash normally without making it unrevealable).

License

The Android PIN Unblocker application is licensed under the copyleft license GNU GPLv3 (or later version) since my friends at the Free Software Foundation recommend it.

Basic4Android also allows completely free usage of their IDE for both commercial and non-commercial purposes so it should be OK.

And also the additional allowances below for this app which are useful for use in restricted or sensitive environments.

Action Status Reason
Modify the app's package name Allowed Security / Hardening
Sign the app with a different key Allowed Security / Hardening
Compile the app from source Allowed Security / Hardening

Legalese

Maybe oneday if somebody randomly stumbles upon this app and likes it, they might be interested about legalese information for this app.
So here's below a list of assets that are currently (or have previously been) used for this app.

Asset name Author License Commercial use
Basic4Android Anywhere Software Apache 2.0 Allowed
FontAwesome Dave Gandy SIL OFL 1.1 Allowed
Material Icons Google Apache 2.0 Allowed
NewQRCodeReaderView Johan Schoeman Apache 2.0 Allowed
ZXing ZXing Project Apache 2.0 Allowed
Clipboard Library mtw Apache 2.0 Allowed
Threading Library Andrew Graham Apache 2.0 Allowed
Devices secure card Icon Oxygen Team LGPL 3.0 Allowed
Info 24 Icon Github MIT License Allowed
Credit card Icon Newidols Attribution Allowed
Very Basic Unlock Icon Icons8 Attribution Allowed
Color Quantizer x128 No License Allowed
7-Zip Igor Pavlov LGPL 2.1 Allowed
MyApkTool Pro Ali Sakkaf MIT License Allowed
dex2jar & jar2dex pxb1988 Apache 2.0 Allowed
Google R8 The Android Open Source Project Eclipse Distribution License 1.0 Allowed
ProGuard Guardsquare GPL 2.0 Allowed
eIDSuite egelke AGPL 3.0 Allowed

About

Android PIN Unblocker :: Generate unblock codes for PKI smartcards using your Admin key and phone.

Topics

Resources

Code of conduct

Stars

3 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages