Skip to main content

Module bindings

Module bindings 

Source
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 aead primitive 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 (the sha2 pattern: 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 the cipher interface’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 the cipher interface’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’s AES-KW. Read the key-wrap interface’s Security notes first.
cipher
The cipher primitive kind: unauthenticated symmetric encryption (confidentiality only), served for compatibility with WebCrypto-committed formats. See README.md, “Design notes”, “Unauthenticated modes are in, for compatibility”.
derivation
The derivation primitive 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 digest primitive 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 ikm resource 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-agreement primitive kind: two-party Diffie–Hellman-style agreement, producing keying material as a derive-input rather than as bytes.
key_wrap
The key-wrap primitive kind: dedicated key-wrapping algorithms — deterministic, integrity-checked encryption whose input domain is key material, never messages (NIST SP 800-38F).
mac
The mac primitive kind: message-authentication codes.
pbkdf2
PBKDF2 (RFC 8018) passwords: the hash-independent half of the PBKDF2 surface. The password resource 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-encryption primitive 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 the key-wrap kind (see the wrapping interface).
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 (the sha2/aes pattern: 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-variant enum every SHA-2-parameterized interface shares (hmac-sha2 uses it too).
signature
The signature primitive 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.