CoolrfulDARkness/moontlcp/handshake does not have a README file
pub(all) enum AlertDescription {
CloseNotify
UnexpectedMessage
BadRecordMac
DecryptionFailed
RecordOverflow
HandshakeFailure
BadCertificate
UnsupportedCertificate
CertificateExpired
CertificateUnknown
IllegalParameter
UnknownCa
DecodeError
DecryptError
ProtocolVersion
InsufficientSecurity
InternalError
UnsupportedSite2Site
} derive(Eq, Debug)pub(all) enum HandshakeMsg {
ClientHello(ClientHello)
ServerHello(ServerHello)
Certificate(CertificateMsg)
ServerKeyExchange(ServerKeyExchange)
CertificateRequest(CertificateRequest)
ServerHelloDone
CertificateVerify(CertificateVerify)
ClientKeyExchange(ClientKeyExchange)
Finished(Finished)
} derive(Eq, Debug)pub(all) struct ServerHello {
version_major : Byte
version_minor : Byte
random : Bytes
session_id : Bytes
cipher_suite : CipherSuite
compression_method : Byte
} derive(Eq, Debug)let MAX_HANDSHAKE_MSG_LEN : Intlet NAMED_CURVE_SM2P256V1 : UIntfn build_ecc_ske_tbs(client_random : Bytes, server_random : Bytes, enc_cert_der : Bytes) -> Bytesfn build_ecdhe_params(curve_id : UInt, pub_uncompressed : Bytes) -> Bytesfn build_ecdhe_ske_tbs(client_random : Bytes, server_random : Bytes, params : Bytes) -> Bytesfn compute_verify_data(master_secret : Bytes, is_client : Bool, transcript_hash : Bytes) -> Bytesfn decode_handshake_msg(msg_type : Byte, body : BytesView, is_ecdhe : Bool) -> HandshakeMsg raise HandshakeErrorfn derive_key_block(master_secret : Bytes, server_random : Bytes, client_random : Bytes, suite : CipherSuite) -> KeyBlockfn derive_master_secret(pre_master_secret : Bytes, client_random : Bytes, server_random : Bytes) -> BytesInstall
Download zipPure MoonBit, zero-FFI, unified Chinese national standard cryptography stack: Sans-I/O GM/T 0024-2023 (TLCP 1.1) dual-certificate protocol + GB/T 38635-2020 SM9 BN256 identity-based cryptography over a shared SM3/SM4/CT core.