Skip to main content

Cryptographic primitives for biometric template protection and key management.

Project description

fait-prism-core

Cryptographic primitives for biometric template protection and key management.

Install

fait-prism-core requires Python 3.9. Previous structural builds on PyPI (e.g., cp312-cp314) were compiled against unconstrained modern runtimes which suffer catastrophic module execution faults when meshed with legacy ML downstream deployments. Please lock your environment to 3.9.

pip install fait-prism-core

Modules

Module Class Description
prism.fuzzy FuzzyExtractor Sample-then-Lock (STL) biometric template protection
prism.keys KeyDerivationManager HKDF-SHA256 hierarchical key derivation
prism.vault AESVault AES-256-GCM authenticated encryption for numpy arrays and bytes
prism.limiter RateLimiter Sliding-window rate limiter with auto-suspension

Quick Start

from prism import FuzzyExtractor, KeyDerivationManager, AESVault, RateLimiter

# --- Fuzzy Extractor ---
fe = FuzzyExtractor(n_lockers=1024, locker_size=8)
import numpy as np
feature = np.random.randn(1, 192).astype(np.float32)
secret = b"my-16-byte-key!!"
helper = fe.lock_secret(feature, secret)
recovered, stats = fe.unlock_secret(feature, helper)
assert recovered == secret

# --- Key Derivation ---
km = KeyDerivationManager(key_source=b"\x00" * 32)  # or path to key file
wallet_key = km.derive("myapp:wallet")
user_fernet = km.get_user_fernet("user-123")

# --- AES Vault ---
vault = AESVault()
import os
key = os.urandom(32)
arr = np.random.randn(1, 100).astype(np.float32)
record = vault.encrypt(key, arr)
decrypted = vault.decrypt(key, record)

# --- Rate Limiter ---
rl = RateLimiter(soft_limit=5, hard_limit=10, window_seconds=60)
allowed, msg = rl.check_and_record("device-001")

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fait_prism_core-1.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

fait_prism_core-1.0.3-cp39-cp39-macosx_11_0_arm64.whl (512.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file fait_prism_core-1.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for fait_prism_core-1.0.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 570bf4ca461a39b8d0b165005dd4977df81755dbcccd8dcae942fa36cade723c
MD5 6d9296d6192c0f3449073624e38b0d19
BLAKE2b-256 21c9ebd4e18eebccb2c9a9f8af6ccc65c8dba3b01a337ded9899237bc604cbfa

See more details on using hashes here.

File details

Details for the file fait_prism_core-1.0.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fait_prism_core-1.0.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 36cdc3a453da590bfc1724f6d459dbc402d0c9a3b9c0d7818ffa8004cf863643
MD5 7407bcf5c07211121a97ae0ed111f94e
BLAKE2b-256 db6065de687296e41e1b0d08e1f2e8eee542b9bdcf6e2939376316fccd872350

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page