Skip to the content
2 layers40.6 × 16.3 mmSOIC, the printed circuit board in 3D

The Hardware Login Key is an ATtiny85-based USB device that securely automates password entry using a physical button or touch sensor. It offers a simple, hardware-driven way to log into systems or websites.

Size
40.6 × 16.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
15
Nets
12
Pads
48
Tracks, vias
93, 15
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
23 Apr 2024
Updated
30 Apr 2026

Overview

SOIC is an open-source printed circuit board by Paschalis, from the Paschalis/Hardware-Login-Key repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 40.6 × 16.3 mm with 15 parts on 12 nets, routed with 93 tracks and 15 vias.

It is built around the ATTINY85-20PU and PTS525SM15SMTR2LFS. Its parts include 4 capacitors, 4 resistors, 2 diodes, 2 connectors and 1 IC. It belongs with the interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

🔐 Hardware Login Key

Hardware Login Key preview
Build status MCU ATtiny85 V-USB firmware Firmware size 1.86 KB flash Flash usage 22% License

Press or tap to auto-type your password suffix — the full password never exists in one place.
The prefix stays in your mind, the suffix lives in your hand.

Introduction

This project offers a straightforward solution for reducing password exposure when logging into a system or website. By pressing a physical button (or touching a capacitive pad) connected to an ATtiny85 microcontroller, the device automatically types a pre-stored password suffix, completing the login without exposing the full credential to observers.

Alt Text

Pressing the tactile switch on the breadboard prototype sends a keystroke that appears in the terminal.

🎯 Purpose

The aim is to provide a practical alternative to manually typing long or complex passwords in environments where shoulder surfing or observation is a risk. The key injects only a suffix. The prefix stays in the user's memory, so physical possession of the device alone is not enough to authenticate.

Benefits

  • Reduced exposure — the full password is never typed in one place or stored in one location
  • Convenience — complex suffixes are entered automatically with a button press
  • Privacy — reduces shoulder surfing risk in public or shared environments
  • Portability — a USB key fits on a keyring and works on any host

⚠️ Security Model & Limitations

This device is a convenience tool, not a cryptographic security device.

What it protects against: shoulder surfing and partial credential capture.

What it does NOT protect against:

  • Flash extraction — the suffix is stored as plaintext in ATtiny85 flash memory. An attacker with physical access and a standard programmer can dump it in under a minute with AVRDUDE. There is no encryption, no secure boot, and no hardware protection on the ATtiny85.
  • Compromised host — keystroke injection via USB HID is visible to any software-level keylogger running on the host.

[!WARNING] The ATtiny85 has no hardware security primitives. This device is appropriate for personal, low-threat scenarios. For threat models involving physical access by a motivated attacker, a device with secure boot and encrypted storage is required.

See SECURITY.md for the full threat model.

How it Works

The hardware key utilizes an ATtiny85 microcontroller with the V-USB library to implement USB Human Interface Device (HID) keyboard functionality. This allows the ATtiny85 to act as a keyboard when connected to a computer via USB. When the button connected to the ATtiny85 is triggered, it injects a pre-stored password suffix followed by Enter.

Alt Text

Sequence: (1) user types the prefix, (2) user triggers the device (tactile button or TTP223), and (3) the ATtiny85 injects suffix + Enter via USB HID. The host concatenates the parts to form the full credential.

Alt Text

From code to reality! The ATtiny85 Hardware Login Key project and its various prototypes. What started as a simple idea is now a fully functional set of secure login devices.

Firmware Variants

VariantTriggerFolder
Tactile switchPush button on PB1 (active-low, internal pull-up)C_implementation/tactile_switch/
Touch padTTP223 capacitive sensor on PB1 (active-high)C_implementation/touch_pad/

Both variants share the same V-USB HID keyboard implementation and the same two-piece password concept.

Compilation Instructions

[!TIP] First time working with the ATtiny85?

Before diving into this project, it's highly recommended to test your hardware setup and compilation process with a simpler program. The ATtiny85_Simple_Code_Test project is a perfect "Hello, World!" for your hardware. It plays music through a speaker and confirms that your ATtiny85, programmer, and toolchain are all working correctly before you tackle the more complex V-USB library.

You can modify the permissions of /dev/ttyACM0 to facilitate communication with your serial device. For detailed instructions, click here.

[!IMPORTANT] One-Time Fuse Setup for External Crystal

The ATtiny85 must be configured to use the external 16MHz crystal. This is done by setting its "fuse bits." This is a one-time operation for each chip. Run this once on each fresh chip.

  1. Connect your programmer to the ATtiny85.
  2. Run the following command to set the fuses for a 16MHz external crystal:
    bash
    avrdude -c avrisp -p attiny85 -P /dev/ttyACM0 -b 19200 -U lfuse:w:0xFF:m -U hfuse:w:0xDD:m

lfuse 0xFF selects the external crystal (8–16 MHz, full swing, maximum startup delay). hfuse 0xDD enables SPI programming, keeps the RESET pin active, and enables the Brown-Out Detector at 2.7 V — which prevents the chip from executing with an unstable supply during USB plug/unplug events.

How to Revert to the Internal Oscillator

If you later wish to use this ATtiny85 for a different project that does not require an external crystal, you can revert it to use its internal 8MHz oscillator.

To revert to the internal 8 MHz oscillator (no crystal needed), run the following command:

bash
avrdude -c avrisp -p attiny85 -P /dev/ttyACM0 -b 19200 -U lfuse:w:0xE2:m -U hfuse:w:0xDF:m

This restores the chip to use its internal 8MHz clock source, which is a common setting for many projects (like the ATtiny85_Simple_Code_Test).

[!WARNING] Be extremely careful when setting fuses. Incorrect fuse values can prevent the chip from being reprogrammed via ISP. Always verify values before running the command. Use https://www.engbedded.com/fusecalc/ to double-check.

Install the toolchain:

bash
# Linux
sudo apt-get install make gcc-avr binutils-avr avr-libc avrdude

# macOS
brew tap osx-cross/avr && brew install avr-gcc avrdude

Build and flash (from inside a variant folder):

bash
cd C_implementation/tactile_switch    # or touch_pad
make          # compile
make upload   # flash via Arduino-as-ISP

For detailed programmer wiring, port configuration, and manual build reference, see INSTRUCTIONS_C.md and C_Makefile_Instructions.md.

📋 Usage — Two-Piece Password

This hardware key uses a "Two-Piece Password" approach for enhanced security. The device does not store your full password. Instead, it stores only the complex second half, while you remember and type the simpler first half. This makes the physical key useless if it is ever lost or stolen.

[!IMPORTANT] The device stores only the complex suffix of a password. The simpler prefix lives in the user's memory. The full credential never exists in a single place.

The Concept in Action

Let's imagine your full, desired password is: Key_!#2025_complex

  • The part you remember and type first (The Prefix): Key_
  • The part stored on your hardware key (The Suffix): !#2025_complex

Login Steps

  1. Navigate to the password field of the login form.
  2. Manually type the first part of your password (e.g., Key_).
  3. Plug in your hardware key.
  4. Press the button on the key.
  5. The key will automatically type the complex second half of the password (!#2025_complex) and press Enter, logging you in securely.

PCB Designs

In KiCad

Alt Text

The hardware key is available in multiple PCB package versions to accommodate different assembly preferences:

  • Through-Hole (DIP): Easy to hand-solder, ideal for prototyping.
    • Through-Hole PCB With tactile switch.
  • SMD (SOIC): Compact and solderable by hand with a fine-tip iron.
    • SMD SOIC PCB With tactile switch.
  • SMD (QFN): Smallest footprint with push button.
    • QFN PCB With tactile switch.

    • QFN PCB QFN PCB designed for a touch pad using the TTP223 IC for enhanced reliability.

      • Uses a simple high/low output for touch detection, similar to a tactile switch, providing a straightforward 0 or 1 output.
      • The PCB is designed with 4 layers to optimize signal integrity and reliability.

🛒 Requirements

Through-Hole (DIP)

ReferenceValueFootprintQty
C1, C222 pFC_Disc_D5.0mm_W2.5mm_P5.00mm2
C3100 nFC_Disc_D5.0mm_W2.5mm_P5.00mm1
C410 µFCP_Radial_D4.0mm_P2.00mm1
D1, D23V6 ZenerD_DO-15_P10.16mm_Horizontal2
J1USB-AM-S-X-X-THSAMTEC_USB-AM-S-X-X-TH1
J2Conn 1×06Molex_PicoBlade_53047-06101
R1, R268 ΩR_Axial_DIN0204_P5.08mm2
R310 kΩR_Axial_DIN0204_P5.08mm1
R41.5 kΩR_Axial_DIN0204_P5.08mm1
S1B3F-1000SW_B3F-10001
U1ATtiny85-20PDIP-8_W7.62mm1
Y116 MHzCrystal_HC49-4H_Vertical1

Through-Hole PCB

DIP 3D render of the hardware login key’s PCB using the Through-Hole (DIP) package in KiCad

SMD — SOIC-8

ReferenceValueFootprintQty
C1100 nFC_0603_HandSolder1
C2, C322 pFC_0603_HandSolder2
C410 µFC_0805_HandSolder1
D1, D23V6 ZenerD_0603_HandSolder2
J1USB-AM-S-X-X-THUSB_PCB1
J2Conn 1×06JST_SH_SM06B-SRSS-TB1
R1, R268 ΩR_0603_HandSolder2
R31.5 kΩR_0603_HandSolder1
R510 kΩR_0603_HandSolder1
S2PTS525SM15SMTR2LFSSW_PTS525SM15SMTR2LFS1
U1ATtiny85-20PSOIC-8_5.3x5.3mm1
Y216 MHzCrystal_SMD_3225-4Pin1

SMD SOIC PCB

3D model of the hardware login key’s PCB using the SMD (SOIC) package in KiCad.

SMD — QFN-20 with tactile switch

ReferenceValueFootprintQty
C1100 nFC_0603_HandSolder1
C2, C322 pFC_0603_HandSolder2
C410 µFC_0805_HandSolder1
D1, D23V6 ZenerD_0603_HandSolder2
J1USB-AM-S-X-X-THUSB_PCB1
J2Conn 1×06JST_SH_SM06B-SRSS-TB1
R1, R268 ΩR_0603_HandSolder2
R31.5 kΩR_0603_HandSolder1
R510 kΩR_0603_HandSolder1
S2PTS525SM15SMTR2LFSSW_PTS525SM15SMTR2LFS1
U1ATtiny85-20MQFN-20-1EP_4x4mm1
Y216 MHzCrystal_SMD_3225-4Pin1

QFN PCB

3D model of the hardware login key’s PCB using the QFN package in KiCad.

SMD — QFN-20 with TTP223 capacitive touch (4-layer PCB) and Reversible USB Functionality

ReferenceValueFootprintQty
C1100 nFC_0603_HandSolder1
C2, C322 pFC_0603_HandSolder2
C41 µFC_0603_HandSolder1
C530 pFC_0603_HandSolder1
C610 µFC_0805_HandSolder1
D1, D23V6 ZenerD_0603_HandSolder2
J1USB-AM-S-X-X-THUSB_PCB1
J2M50-3930642HARWIN_M50-39306421
R1, R268 ΩR_0603_HandSolder2
R31.5 kΩR_0603_HandSolder1
R510 kΩR_0603_HandSolder1
TP1, TP2Test pointTestPoint_Pad_D3.0mm2
U1ATtiny85-20MQFN-20-1EP_4x4mm1
U2TTP223-BA6SOT23-61
Y216 MHzCrystal_SMD_3225-4Pin1

QFN PCB

3D model of the hardware login key’s PCB using the QFN package in KiCad.
With the TTP223 IC. (Uses simple high/low output for touch detection, similar to a tactile switch, with default code for straightforward 0 or 1 output.)

🏗️ 3D Printed Enclosure

Enclosure

A 3D printed case is available for the hardware key. To use it, follow these steps:

  1. Open the 3d_printed_case folder.
  2. Load the hardware_key_case.stl file into your 3D printer software.
  3. Print the case using your 3D printer.
  4. Once printed, assemble the hardware key inside the case for added protection and aesthetics.

📄 System Requirements Specification

SRS Cover

Click the image to open the full SRS (PDF).

🧑‍💻 Authors

  • Paschalis M.

👥 Contributors

🙏 Acknowledgements

This project stands on the shoulders of giants. A special thank you to the developers and communities behind these essential open-source tools:

  • V-USB: The core USB functionality of this hardware key is made possible by the V-USB library, a firmware-only USB driver for AVR microcontrollers from Objective Development.
  • KiCad: All PCB designs were created using KiCad, a powerful, free, and open-source electronics design automation (EDA) suite. Learn more at the KiCad website.

📜 License

This project is licensed under the GPLv3 License - see the LICENSE file for details.

Thank you for visiting Hardware-Login-Key! 🔐✨

Parts

15
QtyValueFootprintReferences
222pFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C3
23V6Diode_SMD:D_0603_1608Metric_Pad1.05x0.95mm_HandSolderD1, D2
268RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2
1100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1
110kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR5
110μFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC4
116MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY2
11k5Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR3
1ATtiny85-20PPackage_SO:SOIC-8_5.3x5.3mm_P1.27mmU1
1Conn_01x06_PinConnector_JST:JST_SH_SM06B-SRSS-TB_1x06-1MP_P1.00mm_HorizontalJ2
1PTS525SM15SMTR2LFSPTS525SM15SMTR2LFS:SW_PTS525SM15SMTR2LFSS2
1USB-AM-S-X-X-THUSB-AM-S-X-X-TH:USB_PCBJ1

More from Paschalis/Hardware-Login-Key

3
  • 4 layers46.7 × 19.3 mmQFN Touch TTP223, the printed circuit board in 3D

    QFN Touch TTP223

    Paschalis/Hardware-Login-Key

    The Hardware Login Key is an ATtiny85-based USB device that securely automates password entry using a physical button or touch sensor. It offers a simple, hardware-driven way to log into systems or websites.

    24 parts3GPL-3.0
  • 2 layers40.6 × 16.3 mmQFN, the printed circuit board in 3D

    QFN

    Paschalis/Hardware-Login-Key

    The Hardware Login Key is an ATtiny85-based USB device that securely automates password entry using a physical button or touch sensor. It offers a simple, hardware-driven way to log into systems or websites.

    15 parts3GPL-3.0
  • 2 layers53.1 × 15.2 mmThrough Hole DIP, the printed circuit board in 3D

    Through Hole DIP

    Paschalis/Hardware-Login-Key

    The Hardware Login Key is an ATtiny85-based USB device that securely automates password entry using a physical button or touch sensor. It offers a simple, hardware-driven way to log into systems or websites.

    15 parts3GPL-3.0

Similar boards

  • 2 layers35 × 40 mmFemto tester v1, the printed circuit board in 3D

    Femto tester v1

    mfolejewski/FEMTO

    FEMTO - RP2040 12x12mm PCB module

    78 parts159
  • 4 layers20 × 30 mmWiFi UART Bridge v3, the printed circuit board in 3D

    WiFi UART Bridge v3

    koggertech/Kogger_UART_WiFi_Bridge

    Open-source ESP32-C3 UART to Wi-Fi bridge: firmware (ESP-IDF), KiCad 10 board, datasheet. Two UART lines relayed to UDP/TCP as whole frames, station or AP with DHCP, control over Kogger SBP, OTA with rollback.

    41 parts1MIT
  • 2 layers64.8 × 25.5 mmPORTABLE ECG MACHINE, the printed circuit board in 3D

    PORTABLE ECG MACHINE

    jeis-aj/PORTABLE-ECG

    A Handheld ECG Machine with Mobile phone and Laptop interface. Cardiac condition prediction using ML

    92 partsMIT
  • 2 layers89.9 × 17.8 mmBivalveBit, the printed circuit board in 3D

    BivalveBit

    millerlp/BivalveBit_hardware

    Heart rate and valve gape sensor wearable for oysters and mussels

    58 partsGPL-3.0
  • 2 layers30.7 × 76.1 mmRepeater v2, the printed circuit board in 3D

    Repeater v2

    plusvic/simplebus2-intercom

    General description of the Simplebus2 protocol used by some Comelit's intercoms. Hardware for retransmitting Simplebus2 messages over UART.

    17 parts95CC0-1.0
  • 2 layers101.5 × 54 mmSimkarte, the printed circuit board in 3D

    Simkarte

    osmocom/osmocom-analog

    Software Implementation of analog cellular telephony systems like NMT, TACS, IMTS, A/B/C-Netz; mirror of https://gitea.osmocom.org/cellular-infrastructure/osmocom-analog

    15 parts32GPL-3.0
  • 2 layers76.2 × 50.8 mmJerboa-8, the printed circuit board in 3D

    Jerboa-8

    strickyak/jerboa-attiny85-mod-synth

    Modular Synthesizer using an ATtiny85 chip for each module.

    23 parts31MIT

Questions

How big is the SOIC PCB?

It measures 40.6 × 16.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the SOIC use?

15 parts, built around the ATTINY85-20PU and PTS525SM15SMTR2LFS. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the SOIC KiCad files?

From the Paschalis/Hardware-Login-Key repository on GitHub, at the commit this page was made from: the board is PCB_Designs/SMD_SOIC/SOIC.kicad_pcb and its schematic PCB_Designs/SMD_QFN/QFN.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the SOIC design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).