-
Notifications
You must be signed in to change notification settings - Fork 294
Description
Overview
I've developed a bash script that enhances Yggdrasil's security posture by leveraging Trusted Platform Module (TPM) hardware to protect private keys. This script provides several security benefits that could be valuable to the Yggdrasil community, especially for users in high-security environments.
Key Features
- Hardware-backed key storage: Uses TPM to securely store Yggdrasil private keys, protecting them from extraction even if the system is compromised
- In-memory configuration only: Keeps configuration in RAM (/dev/shm) to avoid persistent disk storage
- Secure cleanup: Implements proper shredding of sensitive data when Yggdrasil exits
- Randomized TPM handles: Uses unpredictable TPM handles for improved security
- Process lifecycle management: Monitors Yggdrasil process and automatically cleans up when it exits
Security Benefits
This approach mitigates several potential attack vectors:
- Prevents private key theft from filesystem access
- Reduces risk from filesystem forensics
- Provides additional protection against memory dumps through hardware-backed key storage
- Ensures configuration secrets don't persist after program termination
Target Users
This script would be valuable for:
- Enterprise/organizational deployments requiring heightened security
- Network administrators in regulated environments
- Users in potentially hostile network environments
- Anyone concerned about private key protection
Community Contribution
I'm sharing this as a potential addition to the contrib folder or as inspiration for official integration of TPM support in future Yggdrasil releases. I welcome feedback on the approach and would be happy to make improvements based on suggestions from the Yggdrasil team.
Script
You can find the script here: https://github.com/kiljoy001/tpm-backed-yggstartup
Questions
- Would this be a valuable addition to the contrib folder?
- Are there aspects of the TPM integration that could be improved?
- Would the Yggdrasil team be interested in native TPM support in the future?
Thank you for considering this contribution!