ssh_kex_hybrid.c
error_t sshFormatKexHybridInit(SshConnection *connection, uint8_t *p, size_t *length)
Format SSH_MSG_KEX_HYBRID_INIT message.
Definition: ssh_kex_hybrid.c:193
error_t sshGenerateExchangeHashSignature(SshConnection *connection, uint8_t *p, size_t *written)
Compute the signature on the exchange hash.
Definition: ssh_exchange_hash.c:271
SSH host key verification.
error_t ecImport(const EcDomainParameters *params, EcPoint *r, const uint8_t *data, size_t length)
Convert an octet string to an EC point.
Definition: ec.c:365
void sshDumpKey(SshConnection *connection, const char_t *label, const uint8_t *key, size_t keyLen)
Dump secret key (for debugging purpose only)
Definition: ssh_key_material.c:1128
error_t sshLoadKexClassicalEcdhParams(const char_t *kexAlgo, EcDomainParameters *params)
Load the EC parameters that match specified key exchange algorithm.
Definition: ssh_kex_hybrid.c:814
error_t sshVerifyServerHostKey(SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *hostKey)
Verify server's host key.
Definition: ssh_key_verify.c:172
error_t sshVerifyExchangeHashSignature(SshConnection *connection, const SshBinaryString *serverHostKey, const SshBinaryString *signature)
Verify the signature on the exchange hash.
Definition: ssh_exchange_hash.c:330
void kemInit(KemContext *context, const KemAlgo *kemAlgo)
Initialize KEM context.
Definition: kem.c:48
SSH transport layer protocol.
error_t sshUpdateExchangeHashRaw(SshConnection *connection, const void *data, size_t length)
Update exchange hash calculation (raw data)
Definition: ssh_exchange_hash.c:203
SSH certificate verification.
error_t sshGenerateClassicalEcdhKeyPair(SshConnection *connection)
ECDH key pair generation.
Definition: ssh_kex_hybrid.c:874
error_t sshParseKexHybridMessage(SshConnection *connection, uint8_t type, const uint8_t *message, size_t length)
Parse PQ-hybrid specific messages.
Definition: ssh_kex_hybrid.c:696
error_t kemEncapsulate(KemContext *context, const PrngAlgo *prngAlgo, void *prngContext, uint8_t *ct, uint8_t *ss)
Encapsulation algorithm.
Definition: kem.c:209
error_t sshSendPacket(SshConnection *connection, uint8_t *payload, size_t payloadLen)
Send SSH packet.
Definition: ssh_packet.c:57
bool_t sshIsCertPublicKeyAlgo(const SshString *publicKeyAlgo)
Test if the specified public key algorithm is using certificates.
Definition: ssh_algorithms.c:1556
error_t sshSendNewKeys(SshConnection *connection)
Send SSH_MSG_NEWKEYS message.
Definition: ssh_kex.c:194
error_t ecLoadDomainParameters(EcDomainParameters *params, const EcCurveInfo *curveInfo)
Load EC domain parameters.
Definition: ec.c:90
Key material generation.
bool_t sshCompareAlgo(const char_t *name1, const char_t *name2)
Compare algorithm names.
Definition: ssh_misc.c:1653
error_t sshParseKexHybridReply(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_KEX_HYBRID_REPLY message.
Definition: ssh_kex_hybrid.c:490
error_t sshVerifyServerCertificate(SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *hostKey)
Verify server's certificate.
Definition: ssh_cert_verify.c:158
error_t sshComputeClassicalEcdhSharedSecret(SshConnection *connection)
ECDH shared secret calculation.
Definition: ssh_kex_hybrid.c:916
error_t sshDigestClientInit(SshConnection *connection)
Update exchange hash with C_INIT (concatenation of C_PQ and C_CL)
Definition: ssh_kex_hybrid.c:955
error_t sshFormatKexHybridReply(SshConnection *connection, uint8_t *p, size_t *length)
Format SSH_MSG_KEX_HYBRID_REPLY message.
Definition: ssh_kex_hybrid.c:247
SSH key exchange.
error_t ecdhComputeSharedSecret(EcdhContext *context, uint8_t *output, size_t outputSize, size_t *outputLen)
Compute ECDH shared secret.
Definition: ecdh.c:340
error_t sshParseKexHybridInit(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_KEX_HYBRID_INIT message.
Definition: ssh_kex_hybrid.c:381
Post-quantum hybrid key exchange.
Exchange hash calculation.
error_t kemGenerateKeyPair(KemContext *context, const PrngAlgo *prngAlgo, void *prngContext)
Key pair generation.
Definition: kem.c:100
error_t kemLoadPublicKey(KemContext *context, const uint8_t *pk)
Load public key.
Definition: kem.c:160
error_t kemDecapsulate(KemContext *context, const uint8_t *ct, uint8_t *ss)
Decapsulation algorithm.
Definition: kem.c:240
SSH helper functions.
error_t sshSendKexHybridReply(SshConnection *connection)
Send SSH_MSG_KEX_HYBRID_REPLY message.
Definition: ssh_kex_hybrid.c:138
error_t ecExport(const EcDomainParameters *params, const EcPoint *a, uint8_t *data, size_t *length)
Convert an EC point to an octet string.
Definition: ec.c:438
error_t sshFormatHostKey(SshConnection *connection, uint8_t *p, size_t *written)
Format host key structure.
Definition: ssh_misc.c:863
error_t sshSendKexHybridInit(SshConnection *connection)
Send SSH_MSG_KEX_HYBRID_INIT message.
Definition: ssh_kex_hybrid.c:58
SSH packet encryption/decryption.
error_t sshUpdateExchangeHash(SshConnection *connection, const void *data, size_t length)
Update exchange hash calculation.
Definition: ssh_exchange_hash.c:164
error_t sshParseBinaryString(const uint8_t *p, size_t length, SshBinaryString *string)
Parse a binary string.
Definition: ssh_misc.c:1189
Secure Shell (SSH)
SSH algorithm negotiation.
error_t ecdhCheckPublicKey(const EcDomainParameters *params, EcPoint *publicKey)
Check ECDH public key.
Definition: ecdh.c:227
Debugging facilities.
error_t ecdhGenerateKeyPair(EcdhContext *context, const PrngAlgo *prngAlgo, void *prngContext)
ECDH key pair generation.
Definition: ecdh.c:85
error_t sshSelectKemAlgo(SshConnection *connection)
Select key encapsulation mechanism.
Definition: ssh_kex_hybrid.c:754