sLokR — android security re-imagined

It starts with a simple (and stupid) consideration… all the actual android security system have something odd (imho).

Let’s have a first look at the actual unlock systems:

pin code unlock

It’s the oldest security system, provided since the first android release (and since the beginning of mobile phones by SIMs).

It allow you to set a custom pin within the settings that you are needed to type in order to unlock your device.


Multiple touches needed
Time consuming operation if you use your device a lot
Pin can be stolen looking at device during unlock
Pin is always the same during each unlock

pattern unlock

A “little new” system to quickly unlock your device, added within the latest relase of android.

The user is needed to set a pattern within a custom matrix and then it is needed to re-draw it with a single slide in order to unlock the device.


Look at your smarphone screen you can notice fingerprint traces showing the path
Pattern can be stolen looking at device during unlock
Pattern is always the same during each unlock

face unlock

It’s the latest unlock system provided by android.

The user is needed to store his/her face within the settings app, then the user is needed to blink to unlock the device.


Photo hack is easy if you have some photoshop skill (and facebook is a great repo)
Your face is (quite) always the same

And what about sLokR?

sLokR first of all stands for: s(wipe)Lo(c)kR(andom).

Within the full name are hidden its two main features: swipe and random.

Swipe is the main feature, allow you to quick unlock your device only with a single tap and then dragging your finger according your private code length.
Random allow you to avoid that your screen will keep your fingerprints as a clear path to unlock your device.

This method is quite fast to setup, let’s try to explain how does it work:

  • the user is needed to setup a custom (min 3 max 5 numbers length) private code
  • on lock screen will be shown N boxes (according your private code length) with inside a random number in each one
  • user, starting from the first box, will have to draw a line till the last box according a sLokR rules

unlock rules

The unlock rules of sLokR are quite easy to be described, starting from the first box on the left user will have to draw a line that moves following those rules:

  • if the number shown is the same of my code in the right position
draw a left to right horizontal line
  • if the number shown is higher than my one in that position
draw a line moving to the top of the box
  • if the number shown is lower than my one for that position
draw a line moving to the bottom of the box

Let’s see a quick example. I setup my private code as: 123

On my lock screen the system now prompts me these three numbers inside three separate boxes.

sLokR provides boxes with random numbers inside each time

According the rules above I will have to start drawing a line that:

  • moves up because 5 is bigger than 1
  • pass in the right middle of second box because 2 is also my number in that position
  • moves down because 1 is smaller than 3
sLokR usage example, the yellow line shows the finger path for this unlock schema

So the pros of this method are:

Quick method, as fast as pattern one, with an unique tap
Fingerprint traces can’t help other people to reproduce your code
Even if someone take a look at you meanwhile unlocking the next time the unlock scheme will be different
Like what you read? Give Matteo Crippa a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.