Device fingerprinting library with hardware identification and post-quantum cryptography
Project description
Device Fingerprinting Library
A Python library for generating unique device identifiers based on hardware characteristics. Includes post-quantum cryptographic signatures using NIST-standardized algorithms.
Features
- Hardware Detection: CPU, memory, storage, and network interface identification
- Cross-Platform: Windows, macOS, and Linux support
- Post-Quantum Crypto: ML-DSA (Dilithium) signatures via pqcrypto library
- Configurable: Choose which hardware components to include
- Persistent: Device IDs remain stable across software changes
Installation
pip install device-fingerprinting-pro
Quick Start
Basic Usage
from device_fingerprinting import generate_fingerprint
# Generate device fingerprint
fingerprint = generate_fingerprint()
print(f"Device ID: {fingerprint}")
With Post-Quantum Cryptography
from device_fingerprinting import enable_post_quantum_crypto, generate_fingerprint
# Enable quantum-resistant signatures
enable_post_quantum_crypto(algorithm="Dilithium3")
# Generate signed fingerprint
fingerprint = generate_fingerprint()
print(f"Quantum-safe device ID: {fingerprint}")
Custom Configuration
from device_fingerprinting import DeviceFingerprinter
fingerprinter = DeviceFingerprinter(
include_cpu=True,
include_memory=True,
include_storage=True,
include_network=False, # Skip network interfaces
hash_algorithm='sha256'
)
device_id = fingerprinter.generate()
Hardware Components
CPU Information
- Processor model and architecture
- Core count and thread count
- CPU features and instruction sets
Memory Details
- Total physical memory
- Memory module configuration
- Memory type and speed
Storage Devices
- Disk serial numbers and models
- Storage interface types
- Drive capacity and health status
Network Interfaces
- MAC addresses
- Interface types (Ethernet, WiFi, etc.)
- Network adapter hardware IDs
Post-Quantum Cryptography
Supported Algorithms
- ML-DSA (Dilithium): NIST-standardized signature scheme
- Security Levels: NIST Level 3 equivalent
- Key Sizes: 1952/4032 bytes (public/private)
- Signature Size: ~6KB
Implementation Details
from device_fingerprinting import enable_post_quantum_crypto, get_crypto_info
# Enable PQC with specific algorithm
success = enable_post_quantum_crypto(
algorithm="Dilithium3",
hybrid_mode=True
)
# Check current crypto configuration
info = get_crypto_info()
print(f"Algorithm: {info['algorithm']}")
print(f"Library: {info['pqc_library']}")
print(f"Quantum Resistant: {info['quantum_resistant']}")
Use Cases
- Device Authentication: Verify device identity for access control
- Software Licensing: Bind licenses to specific hardware configurations
- Fraud Detection: Identify suspicious login attempts from new devices
- Asset Management: Track and inventory computing devices
- Security Auditing: Monitor device changes in enterprise environments
Cross-Platform Support
| Platform | CPU | Memory | Storage | Network | Status |
|---|---|---|---|---|---|
| Windows | ✅ | ✅ | ✅ | ✅ | Stable |
| macOS | ✅ | ✅ | ✅ | ✅ | Stable |
| Linux | ✅ | ✅ | ✅ | ✅ | Stable |
Performance
- Generation Time: 50-200ms typical
- Memory Usage: <5MB
- Dependencies: psutil, pqcrypto (optional)
- Caching: Configurable hardware info caching
Requirements
- Python 3.7+
- psutil (for hardware detection)
- pqcrypto (for post-quantum cryptography, optional)
License
MIT License - see LICENSE file for details.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file device_fingerprinting_pro-1.1.5.tar.gz.
File metadata
- Download URL: device_fingerprinting_pro-1.1.5.tar.gz
- Upload date:
- Size: 69.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cae577b94169bacd32d870643884e28008dae80676bc5a64c80fd07f2f6c5fe
|
|
| MD5 |
fca487fd4e440c9ffdb05aa980a40095
|
|
| BLAKE2b-256 |
80e0180befb60edc09e27b9340e4eede0f04a162d7ae853653d8bb10b4a6716f
|
File details
Details for the file device_fingerprinting_pro-1.1.5-py3-none-any.whl.
File metadata
- Download URL: device_fingerprinting_pro-1.1.5-py3-none-any.whl
- Upload date:
- Size: 61.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
634dce92945a961c6e232072b7a716e3bfb0bede5e264e20ddaf95ee99d9fd93
|
|
| MD5 |
590c9caf9444e964ad4b23020bfa3c98
|
|
| BLAKE2b-256 |
4cb89655bb4aef3e39849a732da08bc70f1449d11e43495085e9b1191af5f826
|