ssh_kex_ecdh.c
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
ECDH key exchange.
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
error_t sshParseKexEcdhReply(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_KEX_ECDH_REPLY message.
Definition: ssh_kex_ecdh.c:406
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 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 sshGenerateEcdhKeyPair(SshConnection *connection)
ECDH key pair generation.
Definition: ssh_kex_ecdh.c:709
error_t ecLoadDomainParameters(EcDomainParameters *params, const EcCurveInfo *curveInfo)
Load EC domain parameters.
Definition: ec.c:90
Key material generation.
error_t sshConvertArrayToMpint(const uint8_t *value, size_t length, uint8_t *p, size_t *written)
Convert a binary string to mpint representation.
Definition: ssh_misc.c:1531
error_t sshSendKexEcdhInit(SshConnection *connection)
Send SSH_MSG_KEX_ECDH_INIT message.
Definition: ssh_kex_ecdh.c:58
error_t sshDigestClientEcdhPublicKey(SshConnection *connection)
Update exchange hash with client's ephemeral public key.
Definition: ssh_kex_ecdh.c:801
bool_t sshCompareAlgo(const char_t *name1, const char_t *name2)
Compare algorithm names.
Definition: ssh_misc.c:1653
error_t sshVerifyServerCertificate(SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *hostKey)
Verify server's certificate.
Definition: ssh_cert_verify.c:158
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 sshFormatKexEcdhInit(SshConnection *connection, uint8_t *p, size_t *length)
Format SSH_MSG_KEX_ECDH_INIT message.
Definition: ssh_kex_ecdh.c:174
Exchange hash calculation.
error_t sshComputeEcdhSharedSecret(SshConnection *connection)
ECDH shared secret calculation.
Definition: ssh_kex_ecdh.c:751
error_t sshFormatKexEcdhReply(SshConnection *connection, uint8_t *p, size_t *length)
Format SSH_MSG_KEX_ECDH_REPLY message.
Definition: ssh_kex_ecdh.c:221
SSH helper functions.
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 sshParseKexEcdhInit(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_KEX_ECDH_INIT message.
Definition: ssh_kex_ecdh.c:319
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
error_t sshSendKexEcdhReply(SshConnection *connection)
Send SSH_MSG_KEX_ECDH_REPLY message.
Definition: ssh_kex_ecdh.c:119
error_t sshParseKexEcdhMessage(SshConnection *connection, uint8_t type, const uint8_t *message, size_t length)
Parse ECDH specific messages.
Definition: ssh_kex_ecdh.c:576
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 sshLoadKexEcdhParams(EcDomainParameters *params, const char_t *kexAlgo)
Load the EC parameters that match specified key exchange algorithm.
Definition: ssh_kex_ecdh.c:635
error_t ecdhGenerateKeyPair(EcdhContext *context, const PrngAlgo *prngAlgo, void *prngContext)
ECDH key pair generation.
Definition: ecdh.c:85