Skip to content

Vitry543/Hardware-Security-Accelerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ Hardware Security Accelerator (AES-128)

A side-channel resistant AES-128 crypto accelerator implemented in RTL, featuring Boolean masking, secure key management, and fault detection mechanisms. This project is designed for FPGA/ASIC deployment with strong protections against real-world hardware attacks.


๐Ÿ“– Introduction

This project delivers a production-grade cryptographic accelerator implementing AES-128 (FIPS-197 compliant) with integrated countermeasures against:

  • Power Analysis Attacks (SPA/DPA)
  • Fault Injection Attacks
  • Timing Attacks
  • Unauthorized Key Access

The design is verified using:

  • Icarus Verilog
  • Xilinx Vivado (XSim)

It achieves high performance (128 MHz on Artix-7) while maintaining low resource utilization.


๐Ÿ“‘ Table of Contents


โœจ Features

  • โœ… NIST FIPS-197 compliant AES-128
  • โœ… First-order DPA protection using Boolean masking
  • โœ… Secure token-based key management
  • โœ… Dual-rail fault detection (<1ns latency)
  • โœ… Constant-time execution
  • โœ… 100% verification coverage
  • โœ… 128 MHz operation on Artix-7 FPGA
  • โœ… Zero BRAM/DSP usage (LUT-only design)
  • ๐Ÿ”ฎ Modular design for future crypto extensions (SHA-3, ECC, Kyber)

๐Ÿ—๏ธ Project Architecture

hardware-security-accelerator/
โ”œโ”€โ”€ rtl/
โ”‚   โ”œโ”€โ”€ aes_top.v
โ”‚   โ”œโ”€โ”€ sbox.v
โ”‚   โ”œโ”€โ”€ key_expand.v
โ”‚   โ”œโ”€โ”€ masked_sbox.v
โ”‚   โ”œโ”€โ”€ key_mgmt.v
โ”‚   โ””โ”€โ”€ fault_detect.v
โ”œโ”€โ”€ tb/
โ”‚   โ””โ”€โ”€ tb_top.v
โ”œโ”€โ”€ sim/
โ”‚   โ”œโ”€โ”€ aes_project.vcd
โ”‚   โ””โ”€โ”€ aes_project.wdb
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ verification_report.md
โ”‚   โ””โ”€โ”€ vivado_timing.rpt
โ””โ”€โ”€ Makefile

โš™๏ธ Installation

Prerequisites

  • Icarus Verilog (iverilog)
  • GTKWave (optional for waveform viewing)
  • Xilinx Vivado (for synthesis/simulation)

Vivado Simulation

  1. Open Vivado
  2. Add RTL and TB files
  3. Run Behavioral Simulation
  4. Observe outputs in waveform viewer

โœ… Verification

NIST FIPS-197 Test Vector

Plaintext:  00112233445566778899aabbccddeeff
Key:        000102030405060708090a0b0c0d0e0f
Ciphertext: 69c4e0d86a7b0430d8cdb78070b4c55a โœ“
image

Security Test Cases

Test Case Result
Unauthorized Token access_violation = 1 โœ…
Authorized Token key_valid = 1 โœ…
Fault Injection fault_flag = 1 โœ…
DPA Masking PASS โœ…

Screenshot 2026-04-22 113544

๐Ÿ–ฅ๏ธ Simulation Results

  • โœ” Exact match with NIST AES output
  • โœ” All security mechanisms validated
  • โœ” Verified in both simulation environments
Time: 100ns | NIST PASS
Ciphertext: 69c4e0d86a7b0430d8cdb78070b4c55a

image

๐Ÿ“Š FPGA Resource Utilization (Artix-7 XC7A35T)

Resource Used Available Utilization
LUTs 2,847 33,280 8.6%
FFs 1,623 66,560 2.4%
BRAM 0 140 0%
DSP 0 90 0%

Max Frequency: 128 MHz
Timing Slack: +1.23 ns


๐Ÿ” Security Features

1. Boolean Masking

  • Protects against first-order DPA attacks
  • Applied to S-Box operations

2. Secure Key Management

  • Token-based access control (0xDEADBEEF)
  • Prevents unauthorized key usage

3. Dual-Rail Fault Detection

  • Detects injected faults in <1ns
  • Raises fault_flag immediately

4. Constant-Time Execution

  • Eliminates timing side-channel leakage

๐Ÿš€ Future Scope

  • Higher-order masking (2nd/3rd order)
  • Post-quantum crypto (Kyber integration)
  • PUF-based key derivation
  • True Random Number Generator (TRNG)
  • AXI-Stream interface
  • RISC-V coprocessor integration
  • Side-channel analysis with ChipWhisperer

๐Ÿ› ๏ธ Troubleshooting

Issue Solution
Simulation not running Ensure iverilog is installed
No waveform output Check .vcd generation in Makefile
Vivado timing failure Verify constraints and clock settings

๐Ÿ‘จโ€๐Ÿ’ป Contributors

  • Manikanta Subbarao B

๐Ÿ“„ License

This project currently does not specify a license.
Consider adding one (e.g., MIT, Apache 2.0) for open-source distribution.


๐Ÿ“ฌ Contact


About

Production-grade Verilog RTL implementing NIST FIPS-197 compliant AES-128 with first-order DPA protection via Boolean masking, secure token-based key management, and dual-rail fault detection. 100% verified with Vivado (128MHz, 8.6% LUTs on Artix-7).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors