Skip to content

Lune1l/dotguard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Secure Triangle Key Access System

Project Logo

This project is a proof of concept for a physical security access system using a triangular key engraved with a unique dot pattern representing an AES encryption key. The key system relies on a laser scanner that reads the dot-encoded keys on each face of the triangle to validate access.

Project Overview

The Secure Triangle Key Access System combines physical and digital security by using a physical triangular key engraved with unique dot patterns to control access. Each face of the key encodes a unique AES-128 encryption key in a dot matrix format, ensuring that only the correct key provides access.

TO DO LEFT

All contributions are welcome

  • Script to read from a camera the dots on the key and reconstruct the key with accuracy.
  • Makes P.O.C of the physical key (3d + STL).

License

This project is licensed under the following terms:

Attribution: The original concept and proof of concept (P.O.C.) of the Secure Triangle Key Access System must be attributed to the creator of this project in all derivative works, distributions, or implementations.

Open Source Contributions: All contributions to this project are open source and must adhere to the same licensing terms. Contributions remain part of the collective project framework.

Usage Restrictions:
    Non-Commercial Use: The system, framework, and related resources can be reused, modified, and distributed for non-commercial purposes, provided attribution is maintained.
    Professional Context: The project may also be utilized in professional or in-situ contexts (e.g., in secure access systems), but direct commercial exploitation or resale of the framework is not permitted without explicit permission from the original creator.

Framework Development: The goal is to establish a robust technical foundation for this security access system. Derivatives should aim to improve, adapt, or expand the framework while adhering to these license terms.

By contributing to or utilizing this project, you agree to abide by these terms. For any questions or inquiries about licensing exceptions, please contact the original creator.

System Details

  1. Triangular Key Design: The physical key has three faces, each engraved with a unique dot pattern encoding a 128-bit AES key.
  2. Dot Encoding: Each face’s dot matrix has 3 rows by 40 bits (120 bits per face), representing a unique encoded AES key.
  3. Laser Reader: A laser scanner reads the dot pattern on each face, verifying the key's authenticity based on the dotcode.
  4. Two-Factor Security:
    • AES Encryption: Each face encodes a unique 128-bit AES key for secure validation.
    • User Code: A 10-digit user code is required along with the physical key to confirm access. This code is cryptographically combined with the dotcode to validate the key.

Python Key Generation Script

The Python script keygen.py generates three AES-128 keys, converts each to a dot matrix, and saves the following files:

  • Dotcode Images: PNG images with circular dot patterns for each face (face_1_dotcode.png, face_2_dotcode.png, face_3_dotcode.png).
  • Binary Files: Each face’s AES key stored in binary format (face_1_key.bin, face_2_key.bin, face_3_key.bin).
  • Combined Private Key: A single file, private_key.bin, storing the combined keys of all faces for verification purposes.
  • Cryptographic Signature: The script generates a SHA-256 hash signature that combines the complete private key with the 10-digit user code. This signature is saved in signature.bin for secure validation.

Verification and Validation Script

The verification script verify_key.py reads the dot pattern images from each face, reconstructs the key, and combines it with the 10-digit user code to validate against the stored private key and signature. The script performs the following:

  • Uses OpenCV to read dot matrices from the face images.
  • Reconstructs the key from the dotcode images.
  • Combines the reconstructed key with the user code to generate a new cryptographic signature.
  • Compares this new signature with the original signature stored in signature.bin to validate the key.

Generated Files Summary

  • Dotcode Images: PNG files for each face, showing the dot patterns (face_1_dotcode.png, face_2_dotcode.png, face_3_dotcode.png).
  • Binary AES Key Files: Each face's AES key stored in binary format (face_1_key.bin, face_2_key.bin, face_3_key.bin).
  • Private Key File: A single private_key.bin file containing all keys for verification.
  • Signature File: signature.bin, containing the cryptographic signature generated with the user code.

Getting Started

Prerequisites

Install the required libraries:

pip install numpy pillow opencv-python

Running the Key Generation Script

Run the following command to generate keys, dotcode images, and the signature:

python keygen.py

Running the Verification Script

To verify a key against the private key and signature, use:

python verify_key.py

Ensure that face_1_dotcode.png, face_2_dotcode.png, face_3_dotcode.png, private_key.bin, and signature.bin are in the same directory as the script.

Dependencies

Python 3.x
NumPy
Pillow (PIL)
OpenCV

About

DotGuard Access key

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages