Maker Pro
Maker Pro

Door Lock - USB key

reynonic

Mar 22, 2013
3
Joined
Mar 22, 2013
Messages
3
I have an Idea I would like to try, A front door lock that is unlocked by a encrypted file on a 1gb USB flash drive. It would be cool If I could also make an app that could control the lock remotely too, maybe from my phone or something but that might be to much trouble. I'm not sure where to start :confused:
 

GreenGiant

Feb 9, 2012
842
Joined
Feb 9, 2012
Messages
842
well to start unless you are using some SERIOUS encryption methods you wont need anything nearly as large as a 1GB, in fact you would probably be better with a smaller one since it will be easier to read by a microcontroller.

On that note, you will need a microcontroller, that has the ability to read a USB stick (PIC or Arduino should be fine). Then it will just be a matter of programming it to read and inspect a text file, and then turn a deadbolt with a motor/servo. I would start with that first before moving into encryptions, though having a specific file on a specific sized flash drive should be enough encryption.

You are going to need a fairly significant power supply to drive the servo, as deadbolts can be a little tought to turn, and even more so if you want to control it via 3g/text message (much more)

An interesting thought I just had was if you were to have it set up so that you could plug in a flash drive, have it read the file and use that as the current "password" so to speak, and then have it look for that file when you come back, that way its set everytime you leave, and its "encrypted" essentially.
 

reynonic

Mar 22, 2013
3
Joined
Mar 22, 2013
Messages
3
well to start unless you are using some SERIOUS encryption methods you wont need anything nearly as large as a 1GB, in fact you would probably be better with a smaller one since it will be easier to read by a microcontroller.

On that note, you will need a microcontroller, that has the ability to read a USB stick (PIC or Arduino should be fine). Then it will just be a matter of programming it to read and inspect a text file, and then turn a deadbolt with a motor/servo. I would start with that first before moving into encryptions, though having a specific file on a specific sized flash drive should be enough encryption.

You are going to need a fairly significant power supply to drive the servo, as deadbolts can be a little tought to turn, and even more so if you want to control it via 3g/text message (much more)

An interesting thought I just had was if you were to have it set up so that you could plug in a flash drive, have it read the file and use that as the current "password" so to speak, and then have it look for that file when you come back, that way its set everytime you leave, and its "encrypted" essentially.

Where can I but the parts?
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Where can I but the parts?

Do you have any micro programing experience, and are you setup to program micros? If not it's not as simple as getting the parts, you will need to get an entire development platform up and running, learn to program and learn to design the hardware... Now using an Arduino cuts cost and development a lot as much of that is included for free but only if you choose to learn the Ardunio and use it...

On that note of the lock system, since the USB stick is 'dumb' you will not have two way communication, meaning the key on the USB stick will be static and anyone that simply copies the USB stick will be able to open the door... Now there are ways to make this harder, one being develop your own USB stick that is 'smart' (aka a USB key dongle) or use a proprietary file system on the USB stick that will complicate (slightly) reading and copying of the information on it on the computer end...

If you want to explore a more secure setup, look at smart cards that have a micro built in, this way you can have two way key encrypted exchanges and challenges, making it much, much harder to crack...
 

reynonic

Mar 22, 2013
3
Joined
Mar 22, 2013
Messages
3
Do you have any micro programing experience, and are you setup to program micros? If not it's not as simple as getting the parts, you will need to get an entire development platform up and running, learn to program and learn to design the hardware... Now using an Arduino cuts cost and development a lot as much of that is included for free but only if you choose to learn the Ardunio and use it...

On that note of the lock system, since the USB stick is 'dumb' you will not have two way communication, meaning the key on the USB stick will be static and anyone that simply copies the USB stick will be able to open the door... Now there are ways to make this harder, one being develop your own USB stick that is 'smart' (aka a USB key dongle) or use a proprietary file system on the USB stick that will complicate (slightly) reading and copying of the information on it on the computer end...

If you want to explore a more secure setup, look at smart cards that have a micro built in, this way you can have two way key encrypted exchanges and challenges, making it much, much harder to crack...

Ok how expensive are we talking? I though the usb thing would be cool, if its encrypted no one can copy it anyways and wouldnt see it as a key like you would a smart card. I can get the software we use to encrypt all our usb drives at work. Ive done programing but not any microcontrollers. I always thought it would be fun and kinda cool to make something usefull to me.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Ok how expensive are we talking?

On the cheap if you luck out, maybe $100 after a few trials and errors realistically more...

I though the usb thing would be cool, if its encrypted no one can copy it anyways

Encryption does not equate to copy protection, trust me it's trivial to copy or clone that USB drive and get a 1:1 copy... The encryption will stop me from easily accessing the data and decrypting it but not copying it... Trust me software companies spent the better part of the 80s and 90s trying to develop copy protection for media, and at the end of the day it was an utter failure on all levels... Come the 2000s media companies tried it all over again with DVD and Bluray, both resulting in failure due to simple exploits...

I can get the software we use to encrypt all our usb drives at work.

Can you write your own software for a micro that can decrypt that data?

Ive done programing but not any microcontrollers. I always thought it would be fun and kinda cool to make something usefull to me.

It's a lot of fun, it's just not as easy as it appears sometimes...
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
How would copy protection or encryption help anyway? In order for someone to steal it, they would have to get a hold of the key (the USB flash drive). And if they have that, then, well, they have the key, no need to copy or decrypt it.

Bob
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
And if they have that, then, well, they have the key, no need to copy or decrypt it.

Some criminals are opportunist, this is why you have criminals like cashiers skimming credit cards and returning the original so that they can later make a clone and strike unsuspectingly when they choose without you suspecting a thing... If they simply 'stole' the USB drive you would likely notice in short and change the lock, but if they cloned it you would have no idea and they are open to use it at any time...
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Some criminals are opportunist, this is why you have criminals like cashiers skimming credit cards and returning the original so that they can later make a clone and strike unsuspectingly when they choose without you suspecting a thing... If they simply 'stole' the USB drive you would likely notice in short and change the lock, but if they cloned it you would have no idea and they are open to use it at any time...
True, but unlike the credit card, you would not be handing this to someone. I suppose, if you put it on the your keychain and handed it all to a valet parker or auto repair shop it might be in danger. However, they would have to be specifically targetting you, since no one else would have a flash drive that opens their house.

Bob
 
Top