Expand description
The generated bindings for the full polymorph:webcrypto import surface.
The newtype wrappers cover the common cases; these are the escape hatch
for callers driving the streams themselves and for passing resources
through a consumer’s own interfaces (via Mac::into_raw and friends).
Modules§
- aead
- The
aeadprimitive kind: single-message authenticated encryption with associated data. - aes
- The AES family’s shared parameterization. Interfaces minting AES-based
keys (
aes-gcm,aes-cbc, …) declare their variant from this one closed set (thesha2pattern: one definition per family). - aes_cbc
- AES-CBC key minting (NIST SP 800-38A; PKCS#7 padding, the Web
Cryptography API’s
AES-CBC):cipher.cipher-keys for the unauthenticated mode, served for compatibility with CBC-committed formats. Read thecipherinterface’s Security notes first. - aes_ctr
- AES-CTR key minting (NIST SP 800-38A counter mode, the Web
Cryptography API’s
AES-CTR):cipher.cipher-keys for the unauthenticated mode, served for compatibility with CTR-committed formats. Read thecipherinterface’s Security notes first. - aes_gcm
- AES-GCM key minting (NIST SP 800-38D).
- aes_kw
- AES-KW key minting (RFC 3394; NIST SP 800-38F’s KW):
key-wrap.kw-keys for the deterministic key-wrapping mode, the Web Cryptography API’sAES-KW. Read thekey-wrapinterface’s Security notes first. - cipher
- The
cipherprimitive kind: unauthenticated symmetric encryption (confidentiality only), served for compatibility with WebCrypto-committed formats. SeeREADME.md, “Design notes”, “Unauthenticated modes are in, for compatibility”. - derivation
- The
derivationprimitive kind: turning secrets that are not yet keys — an agreement’s shared secret, imported input keying material (IKM), a password — into bits or typed keys, without the secret transiting the caller. - digest
- The
digestprimitive kind: cryptographic hash functions. - ecdh
- ECDH key agreement over the NIST prime-order curves (SP 800-56A), as the Web Cryptography API serves it.
- ecdsa_
sign - ECDSA signing-key minting (FIPS 186-5).
- ecdsa_
verify - ECDSA verification-key minting (FIPS 186-5).
- ed25519_
sign - Ed25519 signing-key minting (RFC 8032).
- ed25519_
verify - Ed25519 verification-key minting (RFC 8032).
- hkdf
- HKDF (RFC 5869) input keying material: the hash-independent half of
the HKDF surface. The
ikmresource minted here parameterizes derivations through the per-hash prepare interfaces (hkdf-sha2,hkdf-sha1), so one imported secret serves either hash family. - hkdf_
sha1 - HKDF (RFC 5869) over SHA-1, for interoperability with SHA-1-committed
derivations. The construction is HMAC-based, so SHA-1’s collision
breaks do not reach it (see
hmac-sha1’s Security notes); prefer the SHA-2 parameterizations in new designs. - hkdf_
sha2 - HKDF (RFC 5869) over the SHA-2 hash family: the extract-then-expand key derivation function, as the Web Cryptography API serves it.
- hmac_
sha1 - HMAC key minting (RFC 2104) over SHA-1 (FIPS 180-4), for interoperability with SHA-1-committed constructions — RFC 6238 TOTP, WPA2’s handshake PRF, and their contemporaries.
- hmac_
sha2 - HMAC key minting (RFC 2104) over the SHA-2 hash family (FIPS 180-4).
- key_
agreement - The
key-agreementprimitive kind: two-party Diffie–Hellman-style agreement, producing keying material as aderive-inputrather than as bytes. - key_
wrap - The
key-wrapprimitive kind: dedicated key-wrapping algorithms — deterministic, integrity-checked encryption whose input domain is key material, never messages (NIST SP 800-38F). - mac
- The
macprimitive kind: message-authentication codes. - pbkdf2
- PBKDF2 (RFC 8018) passwords: the hash-independent half of the PBKDF2
surface. The
passwordresource minted here parameterizes derivations through the per-hash prepare interfaces (pbkdf2-sha2,pbkdf2-sha1), so one imported password serves either hash family. - pbkdf2_
sha1 - PBKDF2 (RFC 8018) over HMAC-SHA-1, for interoperability with
SHA-1-committed derivations — WPA2-PSK, Kerberos RFC 3962
string-to-key, WinZip AE-2, and their contemporaries. The construction
is HMAC-based, so SHA-1’s collision breaks do not reach it (see
hmac-sha1’s Security notes); prefer the SHA-2 parameterizations in new designs. - pbkdf2_
sha2 - PBKDF2 (RFC 8018) over the SHA-2 hash family: password-based key derivation, as the Web Cryptography API serves it.
- public_
encryption - The
public-encryptionprimitive kind: asymmetric encryption. Anyone holding the public key encrypts; only the private-key holder decrypts. The dominant use is key transport — wrapping a symmetric key to a recipient — so the wrap operations sit beside encrypt/decrypt, riding the same provider-held intermediates as thekey-wrapkind (see thewrappinginterface). - rsa
- The RSA signature family’s shared parameterization and admission
contract. Interfaces minting RSA verification keys
(
rsassa-pkcs1-v15-verify,rsa-pss-verify) declare their variant from this one set (thesha2/aespattern: one definition per family). - rsa_
oaep_ encrypt - RSA-OAEP encryption-key minting (RFC 8017 §7.1), as the Web Cryptography API serves it: the public half of key transport.
- rsa_
pss_ verify - RSA-PSS verification-key minting (RFC 8017 §8.1), as the Web Cryptography API serves it.
- rsassa_
pkcs1_ v15_ verify - RSASSA-PKCS1-v1_5 verification-key minting (RFC 8017 §8.2), as the Web Cryptography API serves it.
- sha2
- SHA-2 digest minting (FIPS 180-4), and the home of the
sha2-variantenum every SHA-2-parameterized interface shares (hmac-sha2uses it too). - signature
- The
signatureprimitive kind: asymmetric signing and verification. - types
- Shared structural types for the WebCrypto-style interfaces.
- wrapping
- Provider-held intermediates for key wrapping: moving one key’s material under another key without the material transiting the caller.
- x25519
- X25519 key agreement (RFC 7748), as the Web Cryptography API serves it.