std/signature
Digital signatures: Ed25519 of RFC 8032, in TorbScript with no native. Ed25519PrivateKey is made from a 32-byte
seed and signs, Ed25519PublicKey verifies, Ed25519Signature is what passes between them, and SignatureError
says why bytes or a text are not one of the three. 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.
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
std/signature/ed25519Ed25519 (RFC 8032 section 5.1): [Ed25519PrivateKey] signs, [Ed25519PublicKey] verifies, and [Ed25519Signature] is the 64 bytes between them.std/signature/error[SignatureError]: why bytes or a text are not an Ed25519 key or signature.
Everything
- type
Ed25519PrivateKeyAn Ed25519 private key: the 32-byte seed RFC 8032 calls the private key, with the secret scalar, the prefix and the public key derived from it once. - type
Ed25519PublicKeyAn Ed25519 public key: 32 bytes that encode a point of the curve, checked when the key is made - a y below p, an x that exists, and the canonical sign (RFC 8032 section 5.1.3). - type
Ed25519SignatureAn Ed25519 signature: 64 bytes, the encoded point R and then the scalar S, checked to be below the group order L when the signature is made (RFC 8032 section 5.1.7). - type
SignatureErrorWhy bytes or a text are not an Ed25519 key or signature. - extend
String with From<Ed25519PublicKey>A public key as its 64 lowercase hexadecimal digits: the way back ofEd25519PublicKey.tryFrom. - extend
String with From<Ed25519Signature>A signature as its 128 lowercase hexadecimal digits: the way back ofEd25519Signature.tryFrom.