A comprehensive IoT security demonstration system that integrates multiple hardware components for secure data provenance tracking. The system captures camera frames triggered by motion detection and cryptographically signs them for tamper-evident logging.
- LIS3DH Accelerometer: Motion detection and interrupt generation
- USB Camera: Image capture functionality
- ATECC608: Hardware cryptographic signing (with software fallback)
- DS3231: Real-time clock for precise timestamping
- SQLite Database: Event logging and provenance chain storage
- Hardware-based ECDSA signing using ATECC608
- Software fallback for demonstration purposes
- Cryptographic provenance chain linking all events
- Data integrity verification
- LIS3DH accelerometer monitors for motion
- Automatic camera capture on movement detection
- Manual capture capability via web interface
- Real-time image streaming to web dashboard
- Immutable event logging with SQLite
- Cryptographic hash chain for event ordering
- Timestamp verification using RTC
- Visual comparison of signed vs unsigned data
- Real-time system status monitoring
- Live camera feed display
- Event log with verification status
- Interactive provenance chain visualization
- Hardware status indicators
# Install Node.js dependencies
npm install
# Install OpenCV (required for camera functionality)
# Ubuntu/Debian:
sudo apt-get install libopencv-dev
# Enable I2C on Raspberry Pi
sudo raspi-config
# Navigate to Interface Options > I2C > Enable
LIS3DH Accelerometer:
- VCC β 3.3V
- GND β Ground
- SDA β GPIO 2 (SDA)
- SCL β GPIO 3 (SCL)
- Address: 0x18
ATECC608 Crypto Chip:
- VCC β 3.3V
- GND β Ground
- SDA β GPIO 2 (SDA)
- SCL β GPIO 3 (SCL)
- Address: 0x60
DS3231 RTC:
- VCC β 3.3V
- GND β Ground
- SDA β GPIO 2 (SDA)
- SCL β GPIO 3 (SCL)
- Address: 0x68
- Connect any USB UVC-compatible camera
- System will auto-detect on /dev/video0
# Development mode with auto-restart
npm run dev
# Production mode
npm start
Navigate to http://localhost:3000
to access the dashboard.
GET /api/status
# Get events
GET /api/events?limit=50&offset=0
# Get specific event
GET /api/events/:id
# Verify event signature
POST /api/verify/:id
# Manual capture
POST /api/capture
# Get chain status
GET /api/provenance/status
- Motion Detection: LIS3DH detects movement and triggers interrupt
- Image Capture: Camera captures frame automatically
- Timestamping: DS3231 provides precise RTC timestamp
- Signing: ATECC608 cryptographically signs event data
- Logging: Event stored in SQLite with provenance chain
- Verification: Web interface displays signed vs unsigned comparison
src/
βββ drivers/
β βββ lis3dh.js # Accelerometer driver
β βββ camera.js # USB camera interface
β βββ ds3231.js # RTC driver
βββ crypto/
β βββ atecc608.js # Crypto chip interface
βββ data/
β βββ database.js # SQLite database management
β βββ provenance.js # Provenance tracking logic
βββ web/
βββ server.js # Main application server
public/
βββ index.html # Web dashboard
βββ css/style.css # Styling
βββ js/app.js # Frontend JavaScript
captures/ # Stored camera images
logs/ # Application logs
data/ # SQLite database files
- Each event is cryptographically signed
- Hash chain links events in chronological order
- Tamper detection through signature verification
- Hardware security module (ATECC608) for key storage
- Image hash calculation for content verification
- Timestamp authentication via RTC
- Chain of custody maintenance
- Audit trail for all system events
The web interface provides a clear visual comparison between:
- Cryptographic signature present
- Hardware-verified timestamps
- Tamper-evident logging
- Chain of custody maintained
- No cryptographic protection
- Questionable data integrity
- No tamper detection
- Vulnerable to modification
The system gracefully handles missing hardware:
- No ATECC608: Falls back to software signing
- No DS3231: Uses system time
- No LIS3DH: Manual capture only
- No Camera: Simulated capture mode
npm test
Set environment variable for verbose logging:
DEBUG=true npm run dev
MIT License - See LICENSE file for details
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Create Pull Request
This is a demonstration system. For production use:
- Implement proper key management
- Add network security (HTTPS/TLS)
- Enhance authentication mechanisms
- Add secure boot verification
- Implement hardware tamper detection