
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
security-crypto-primitives
Advanced tools
crypto_utils — это простая и удобная Python-библиотека с обёртками над криптографическими алгоритмами на базе cryptography.
Основные возможности:
pip install crypto_utils
from crypto_utils.encrypt import encrypt_aes_gcm, decrypt_aes_gcm
key = b"\x00" * 32
nonce, ct = encrypt_aes_gcm(key, b"секретные данные", b"aad")
plaintext = decrypt_aes_gcm(key, nonce, ct, b"aad")
print(plaintext) # b"секретные данные"
from crypto_utils.sign import (
generate_rsa_private_key, rsa_public_key_to_pem,
sign_rsa, verify_rsa
)
priv = generate_rsa_private_key()
pub = priv.public_key()
sig = sign_rsa(priv, b"сообщение")
print(verify_rsa(pub, b"сообщение", sig)) # True
from crypto_utils.hash import hash_sha3_256
digest = hash_sha3_256(b"данные для хеша")
print(digest.hex())
from crypto_utils.kdf import derive_pbkdf2
key, salt = derive_pbkdf2(b"пароль", iterations=200_000, length=64)
print(key.hex(), salt.hex())
pytest --maxfail=1 --disable-warnings -q
MIT License
crypto_utils is a lightweight Python library wrapping cryptographic primitives (built on cryptography).
Features:
pip install crypto_utils
from crypto_utils.encrypt import encrypt_aes_gcm, decrypt_aes_gcm
key = b"\x00" * 32
nonce, ct = encrypt_aes_gcm(key, b"secret data", b"aad")
plaintext = decrypt_aes_gcm(key, nonce, ct, b"aad")
print(plaintext) # b"secret data"
from crypto_utils.sign import (
generate_rsa_private_key, rsa_public_key_to_pem,
sign_rsa, verify_rsa
)
priv = generate_rsa_private_key()
pub = priv.public_key()
sig = sign_rsa(priv, b"message")
print(verify_rsa(pub, b"message", sig)) # True
from crypto_utils.hash import hash_sha3_256
digest = hash_sha3_256(b"data to hash")
print(digest.hex())
from crypto_utils.kdf import derive_pbkdf2
key, salt = derive_pbkdf2(b"password", iterations=200_000, length=64)
print(key.hex(), salt.hex())
pytest --maxfail=1 --disable-warnings -q
MIT License
FAQs
Обёртки и утилиты для шифрования, подписей и хеширования
We found that security-crypto-primitives demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.