std/signature

Digital signatures, in TorbScript with no native: Ed25519 of RFC 8032, and the verification of ECDSA over P-256 with SHA-256 (FIPS 186-5), which JOSE and WebAuthn call ES256. Ed25519PrivateKey is made from a 32-byte seed and signs, Ed25519PublicKey verifies, Ed25519Signature is what passes between them; P256PublicKey verifies a P256Signature, and nothing here signs with P-256. RsaPublicKey verifies RSASSA-PKCS1-v1_5 (RS256) and RSASSA-PSS (PS256) of RFC 8017 over SHA-256 and signs nothing. SignatureError says why bytes or a text are not a key or a signature. Ed25519 is what the package registry signs its index with (docs/design/RELEASE.md section 7.4), so that a mirror can withhold a release but not change one; P-256 is what most passkeys sign with, and RSA is what GitHub Actions' OIDC tokens and many identity providers use.

A signature is not a digest (std/digest): a digest says two byte sequences are the same, a signature says who wrote them - anybody can recompute a digest, only the holder of the private key can make a signature that verifies.

Modules

Everything