Method SSL.Cipher.sign_1_3()


Method sign_1_3

string(8bit) sign_1_3(Crypto.Sign.State key, int scheme, string(8bit) data)

Description

RFC 8446 4.2.3/4.4.3: sign data under key using the 16-bit SignatureScheme scheme (eg SIGNATURE_ecdsa_secp256r1_sha256 or SIGNATURE_rsa_pss_sha256).

Unlike CipherSpec.sign(), this isn't tied to a cipher suite's fixed signature_alg field -- TLS 1.3 negotiates the signature scheme per-certificate (and the signer picks freely among the schemes both its certificate and the peer support), not via the suite, which is why KE_tls13 suites leave signature_alg at SIGNATURE_anonymous (a "not suite-tied" marker, not a claim of anonymity) instead.

Note

Only RSASSA-PSS and ECDSA schemes are supported -- EdDSA (Ed25519/Ed448) would need a different Crypto.Sign.State calling convention (no hash parameter) and isn't implemented.