Tool overview
Что такое Crypto Toolkit?
Crypto Toolkit — инструмент, который помогает hMAC, PBKDF2-хеши паролей, ULID и TOTP в защищённом рабочем пространстве.
Зачем использовать Crypto Toolkit?
Повышает читаемость и скорость работы, когда нужно hMAC, PBKDF2-хеши паролей, ULID и TOTP в защищённом рабочем пространстве, без отправки данных на сервер.
Ключевые возможности
Конфиденциальность на стороне клиента, мгновенный результат и копирование в один клик. HMAC, PBKDF2-хеши паролей, ULID и TOTP в защищённом рабочем пространстве
Как использовать
Следуйте этим шагам, чтобы получить точные результаты с инструментом выше.
- Choose HMAC, Password Hash, ULID, или TOTP mode.
- Enter message и secret (or Base32 secret for TOTP).
- Copy digests, hashes, IDs, или rotating OTP codes.
Crypto Mode Reference
Algorithms и parameters per mode.
What Crypto Toolkit does
Crypto Toolkit is a client-side workshop for four common crypto workflows: keyed HMAC digests, PBKDF2 password hashing, ULID generation, and TOTP codes. Switch modes from the tab strip, supply message/secret inputs as required, and copy results into docs or staging configs.
What you get
- HMAC-SHA256 hex digests for webhook and API signing experiments
- PBKDF2 password hashes with salt and high iteration counts (default 210k)
- ULID generation for sortable, opaque identifiers
- TOTP codes from Base32 secrets (RFC 6238-style 30s / 6-digit defaults)
Use this toolkit when
- You are debugging a webhook signature locally with a known test secret
- You need a PBKDF2 sample to compare against backend parameters
- You want ULIDs without standing up a service
- You are validating TOTP enrollment before shipping MFA UX
Prefer other tools when
- You only need unkeyed MD5/SHA digests → Hash Generator
- You only need to inspect JWT claims → JWT Decoder
- You need FIPS-certified or HSM-backed operations → dedicated infra
HMAC · PBKDF2 · ULID · TOTP — when to use each
Each mode solves a different problem. Mixing them (e.g. hashing passwords with HMAC-only) creates false security.
HMAC — keyed integrity
Use HMAC when sender and receiver share a secret and must detect tampering. Provide message + secret; output is a hex digest (SHA-256). Good for webhook signatures and internal service auth experiments.
PBKDF2 — password hashing
Use PBKDF2 to derive a slow password hash with a unique salt and high iterations. Store salt with the hash. Prefer Argon2/bcrypt if policy requires them — Web Crypto exposes PBKDF2 natively here.
ULID — sortable unique ids
ULIDs combine a timestamp with randomness for lexicographically sortable ids. Use them for resource ids where UUID v4 ordering is awkward. They are identifiers, not secrets.
TOTP — time-based one-time passwords
TOTP derives rotating codes from a shared Base32 secret and the current time step. Use for MFA enrollment tests. Clock skew between device and server is the usual failure mode.
Step-by-step: run a crypto mode
Run a mode end-to-end in the workspace above.
- Select HMAC, Password Hash, ULID, or TOTP from the mode tabs.
- For HMAC: paste message and shared secret, then generate the digest.
- For PBKDF2: enter the password (and follow on-screen salt/iteration defaults unless matching a backend).
- For ULID: set how many ids you need and generate.
- For TOTP: paste a Base32 secret and read the current code; wait for the next period if testing rollover.
- Copy outputs into staging docs — replace production secrets with placeholders before sharing.
- Clear secrets from the form when finished on shared machines.
Use case: debug webhook HMAC signatures
Problem: a webhook receiver rejects your signature. You need to confirm the canonical string and HMAC hex independently of framework middleware.
How this tool helps
- Paste the exact signed payload bytes-as-text your sender uses (raw body, not re-serialized JSON).
- Enter the staging webhook secret.
- Generate HMAC-SHA256 and compare to the header your receiver expects (hex vs Base64 — match encoding).
- If digests match here but fail in prod, inspect body mutation (proxies, charset) next.
Outcome: an isolated HMAC oracle for signature debugging without deploying new code.
Use case: align PBKDF2 parameters
Problem: backend and a script disagree on PBKDF2 output during a migration from plain SHA-256 password storage.
How this tool helps
- Align hash algorithm (SHA-256), iteration count, salt, and output encoding with the server.
- Hash a known test password here and compare to the server’s test vector.
- Only then migrate real users — never debug with production passwords in the browser.
Outcome: parameter parity before cutting over the login verifier.
Use case: generate sortable ULIDs
Problem: you need opaque, time-sortable ids for order rows without exposing auto-increment sequences.
How this tool helps
- Generate a batch of ULIDs in ULID mode.
- Confirm lexicographic order roughly tracks creation time for your UX needs.
- Adopt ULID in the service layer; do not treat ids as authentication secrets.
Outcome: ready sample ids for fixtures and API sketches.
Use case: validate TOTP enrollment
Problem: MFA enrollment QR codes work in one authenticator app but verification fails intermittently.
How this tool helps
- Paste the same Base32 secret used in enrollment.
- Compare the toolkit’s current code to the authenticator app at the same moment.
- If they diverge, fix clock sync or period/digit parameters before blaming the QR payload.
Outcome: a local TOTP reference clock for enrollment debugging.
Fix: secret handling mistakes
Secrets pasted into browser tools can leak via screenshots, shared machines, or synced clipboard history.
Why it happens
HMAC secrets, PBKDF2 passwords, and TOTP seeds are high-value. Local processing reduces network risk but not shoulder-surfing or disk persistence risk.
Diagnose
Ask whether the value is a production master key, live webhook secret, or only a staging fixture.
Fixes
- Use staging secrets and placeholders in docs; inject real secrets only in secret managers.
- Clear the form and clipboard after demos.
- Rotate any production secret that was pasted into chat, tickets, or shared browsers.
- Prefer environment-scoped keys so a leaked staging secret cannot mint production signatures.
Fix: TOTP clock skew
TOTP codes disagree when clocks or parameters diverge.
Why it happens
RFC 6238 codes depend on Unix time steps. Skew beyond the allowed window, wrong period (30 vs 60), or wrong digit length causes false rejects.
Diagnose
Compare this toolkit’s code to the authenticator at the same second. If they match but the server fails, the server clock or window is wrong.
Fixes
- NTP-sync servers and document an acceptable skew window (e.g. ±1 step).
- Confirm Base32 alphabet (no spaces/padding mistakes) and 6-digit / 30s defaults unless you intentionally changed them.
- Re-enroll after regenerating a secret — do not keep dual secrets without a migration plan.
Fix: weak PBKDF2 parameters
Weak PBKDF2 parameters look like “hashing” but remain crackable.
Why it happens
Low iteration counts or reused salts defeat the purpose of a KDF. Fast hashes (SHA-256 alone) are worse.
Diagnose
Check iterations (aim high — this tool defaults around 210k), unique per-password salt, and SHA-256 (or stronger) PRF.
Fixes
- Match OWASP / platform guidance for iteration counts and re-tune as hardware improves.
- Store salt + hash + algorithm version for future upgrades.
- If policy mandates Argon2 or bcrypt, use those libraries instead of PBKDF2.
Mode reference table
Mode matrix for the Crypto Toolkit workspace.
Crypto mode reference
| Mode | Inputs | Output | Pitfall |
|---|---|---|---|
| HMAC-SHA256 | Message + secret | Hex digest | Missing secret or body mutation breaks verify |
| PBKDF2 | Password + salt + iterations | Derived hash | Empty password / low iterations / reused salt |
| ULID | Count | Sortable ids | Not a secret — do not use as API keys |
| TOTP | Base32 secret | 6-digit codes (30s) | Clock skew and invalid Base32 alphabet |
Security checklist
- Local Web Crypto is convenient, not FIPS-certified HSM security.
- Never embed production master keys in client-side demos or committed fixtures.
- HMAC proves integrity with a shared secret — protect the secret like a password.
- ULIDs are identifiers; TOTP secrets are credentials — treat them differently.
Crypto toolkit best practices
- Document algorithm, encoding (hex vs Base64), and canonical body rules next to HMAC integrations.
- Version PBKDF2 parameters so you can raise iterations later.
- Generate TOTP secrets with CSPRNG; show them once during enrollment.
- Use Hash Generator for unkeyed checksums; use this toolkit for keyed and KDF workflows.
Privacy — secrets stay local
HMAC, PBKDF2, ULID, and TOTP run entirely in your browser via Web Crypto and local generators. Secrets and passwords are not uploaded for processing.
- Clear sensitive fields after use on shared devices.
- Optional localStorage for non-secret input stays on your origin only — avoid persisting live secrets.
Часто задаваемые вопросы
Развёрнутые ответы на типичные проблемы отладки и вопросы конфиденциальности данных.
Связанные инструменты
Ознакомьтесь с другими связанными утилитами, дополняющими этот инструмент.
Официальная документация и ссылки
Авторитетные спецификации и документация платформы для этой утилиты.