This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Amarite1's profile picture

KeyKard [Secure Locking System]

Started by Amarite1, 07 October 2012 - 01:40 PM
Amarite1 #1
Posted 07 October 2012 - 03:40 PM
KeyKard is the next step towards completely secure locking systems! Instead of having a user type stuff into the console, and potentially override your security, simply have them insert a keykard (floppy disk with data) to unlock it. The console can be completely hidden from the user! For a key to get accepted, it must have the correct data for each of these:
  • Disk ID
  • Lock ID
  • UID (Randomly generated secondary UniqueID)
See below for list of version compatibilities

KeyKard can be downloaded here:
Support me/the program: http://adf.ly/2516982/keykard
Direct link: https://www.dropbox.com/s/z6t70syvvtte88f/KeyKard.zip

Setup:

The software consists of two main parts, and 2 APIs. The "keykard" program is the main UI, which handles setup, keykard creation and deactivation, etc. "keykardmain" is the program that actually checks the keykards for the correct authentication. Those two programs can be placed anywhere, so long as they are in the same folder. The first API is an advanced terminal API, "AdvTerm", which is still a work in progress. It MUST be installed to "/customAPI". The second is another work in progress called "CCrypt". CCrypt is an API with the encryption/decryption functions for the current KK data.

Notes:
If there is more than one disk drive attached to the computer, it will use ANY of them to unlock whatever it is your are locking, but, will only use ONE for key creation, deactivation, etc. The priority for the UI is:
  1. left
  2. right
  3. top
  4. bottom
  5. back
  6. front
Compatibility Tests:
  • 1.0.0
    • CC 1.42
    • Minecraft 1.3.2
  • 2.0.0
    • CC 1.43, 1.45
    • Minecraft 1.3.2
  • 2.0.1
    • CC 1.45
    • Minecraft 1.3.2
  • 2.0.2
    • CC 1.45
    • Minecraft 1.3.2
  • 2.0.3
    • CC 1.47
    • Minecraft 1.4.5
Releases:
  1. 1.0.0 - First release [CC 1.42]
  2. 2.0.0 - Added encryption and refined code [CC 1.43]
  3. 2.0.1 - Fixed bug when decrypting data [CC 1.45]
  4. 2.0.2 - Fixed bug when creating keykard [CC 1.45]
  5. 2.0.3 - Added support for monitor output (Advanced monitor only)
Coming Soon:
  • Ability to securely store the encryption key in an online database
tommyroyall #2
Posted 10 October 2012 - 04:23 AM
So, I took a look at your code. The primary part of "security" here is the ID validation, but, that's a simple value within the file? With no means of encryption, this is child's play to break through sir :. Child's play.

Edit: I decided to check the UID

if fs.exists(disk.getMountPath(param1) .. "/keydata") then
print("disk has keydata!")
file = fs.open(disk.getMountPath(param1) .. "/keydata", "r")
diskLockID = file.readLine()
UID = file.readLine()
file.close()
The UID is read without any forms of encryption of which are typically necessary to keep data secure, therefore rendering it as vulnerable as the ID verification.

My recommendation is to have extremely advanced methods of encryption. Also, assymetric encryption would be useful :P/>/>,
jesusthekiller #3
Posted 10 October 2012 - 03:45 PM
You can make a PHP authentication server on free hosting to validate data and send data from floppy password file to it by HTTP API. Problem: requires PHP knowledge. :P/>/>
Amarite1 #4
Posted 10 October 2012 - 09:04 PM
Thanks guys for the input! Tommyroyall - I haven't made any asymmetrical encryption systems, so I have no idea where to start. Could you please direct me to a site for writing one in LUA? Jesusthekiller - I also make websites, so I have some knowledge of PHP. The issue being that you need the HTTP API enabled, which some users may not want to do. However, I'll consider it as an option in future versions.
Amarite1 #5
Posted 19 October 2012 - 09:12 PM
Version 2.0.0 Released!

This release features:
  • Data encryption
  • Foundation for saving the encryption key securely in an online database (coming soon!)
Version 2.0.0 can be downloaded here:
http://adf.ly/DqfkQ

Please read the setup instruction in the main post, and all feedback is welcome! :P/>/>
DMACNZ #6
Posted 21 October 2012 - 01:50 AM
i cant get it to create the keykard stuff to my disk it fails when i tell it to create the keykard
Amarite1 #7
Posted 24 October 2012 - 09:15 PM
Version 2.0.1 [HOTFIX] Released!

ALL USERS MUST DOWNLOAD THIS FOR THE KEYKARDS TO BE READ!

Changelog:
  • Fixed cipher bug
Amarite1 #8
Posted 25 October 2012 - 09:14 PM
Version 2.0.2 [HOTFIX] Released!

ALL USERS MUST DOWNLOAD THIS FOR THE KEYKARDS TO BE CREATED!

Changelog:
  • Fixed bug when attempting to store cipher
DMACNZ #9
Posted 31 October 2012 - 05:21 AM
i cant get it to create the keykard stuff to my disk it fails when i tell it to create the keykard
yea the problem is when i put the disk in no mater which program is runned it just comes up with an error and i cant get it in time to post it
Jian #10
Posted 31 October 2012 - 07:21 PM
Wow you really don't need to use adf.ly for this. Greedy. Not even gonna check this out for that reason alone.
Amarite1 #11
Posted 03 December 2012 - 11:16 AM
Version 2.0.3 Released!
Not too much different; just added support for monitor output (advanced monitory only so far).

Also…

Wow you really don't need to use adf.ly for this. Greedy. Not even gonna check this out for that reason alone.

I've added a direct link to the file, so you don't need to see the ad if you don't want to.

As always, download link is in the main post.