ssh_packet.c
error_t sshDecryptPacketLength(SshConnection *connection, uint8_t *packet)
Decrypt the length field of an incoming SSH packet.
Definition: ssh_packet.c:950
void poly1305Init(Poly1305Context *context, const uint8_t *key)
Initialize Poly1305 message-authentication code computation.
Definition: poly1305.c:49
error_t sshParseUnimplemented(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_UNIMPLEMENTED message.
Definition: ssh_transport.c:916
error_t sshParseUserAuthBanner(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_USERAUTH_BANNER message.
Definition: ssh_auth.c:640
SSH user authentication protocol.
error_t sshParseChannelFailure(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_FAILURE message.
Definition: ssh_request.c:1849
error_t sshParseNewKeys(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_NEWKEYS message.
Definition: ssh_kex.c:995
SSH connection protocol.
__weak_func error_t cbcEncrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *p, uint8_t *c, size_t length)
CBC encryption.
Definition: cbc.c:61
error_t sshParseChannelClose(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_CLOSE message.
Definition: ssh_connection.c:1830
SSH transport layer protocol.
error_t ctrDecrypt(const CipherAlgo *cipher, void *context, uint_t m, uint8_t *t, const uint8_t *c, uint8_t *p, size_t length)
CTR decryption.
Definition: ctr.c:122
@ SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE
Definition: ssh.h:1004
error_t sshParseChannelExtendedData(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_EXTENDED_DATA message.
Definition: ssh_connection.c:1639
void sshAppendMessageAuthCode(SshEncryptionEngine *encryptionEngine, uint8_t *packet, size_t length)
Compute message authentication code.
Definition: ssh_packet.c:1338
error_t sshParseChannelWindowAdjust(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_WINDOW_ADJUST message.
Definition: ssh_connection.c:1436
error_t sshParseServiceAccept(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_SERVICE_ACCEPT message.
Definition: ssh_transport.c:624
error_t sshParseRequestSuccess(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_REQUEST_SUCCESS message.
Definition: ssh_request.c:1210
error_t sshParseUserAuthSuccess(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_USERAUTH_SUCCESS message.
Definition: ssh_auth.c:929
error_t sshSendPacket(SshConnection *connection, uint8_t *payload, size_t payloadLen)
Send SSH packet.
Definition: ssh_packet.c:57
error_t sshParseChannelRequest(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_REQUEST message.
Definition: ssh_request.c:1280
error_t sshParseKexInit(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_KEXINIT message.
Definition: ssh_kex.c:469
void chachaCipher(ChachaContext *context, const uint8_t *input, uint8_t *output, size_t length)
Encrypt/decrypt data with the ChaCha algorithm.
Definition: chacha.c:183
error_t sshParseChannelSuccess(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_SUCCESS message.
Definition: ssh_request.c:1759
error_t sshParseUnrecognized(SshConnection *connection, const uint8_t *message, size_t length)
Parse unrecognized message.
Definition: ssh_transport.c:957
error_t sshParseDisconnect(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_DISCONNECT message.
Definition: ssh_transport.c:838
error_t sshParsePacket(SshConnection *connection, uint8_t *packet, size_t length)
Parse SSH packet.
Definition: ssh_packet.c:332
error_t chachaInit(ChachaContext *context, uint_t nr, const uint8_t *key, size_t keyLen, const uint8_t *nonce, size_t nonceLen)
Initialize ChaCha context using the supplied key and nonce.
Definition: chacha.c:70
error_t socketReceive(Socket *socket, void *data, size_t size, size_t *received, uint_t flags)
Receive data from a connected socket.
Definition: socket.c:1692
__weak_func error_t ctrEncrypt(const CipherAlgo *cipher, void *context, uint_t m, uint8_t *t, const uint8_t *p, uint8_t *c, size_t length)
CTR encryption.
Definition: ctr.c:62
error_t sshParseIdString(SshConnection *connection, const uint8_t *id, size_t length)
Parse identification string.
Definition: ssh_transport.c:460
error_t sshParseExtInfo(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_EXT_INFO message.
Definition: ssh_extensions.c:296
error_t sshParseUserAuthMessage(SshConnection *connection, uint8_t type, const uint8_t *message, size_t length)
Parse authentication method specific method messages.
Definition: ssh_auth.c:1076
error_t sshSendDisconnect(SshConnection *connection, uint32_t reasonCode, const char_t *description)
Send SSH_MSG_DISCONNECT message.
Definition: ssh_transport.c:209
error_t sshVerifyMessageAuthCode(SshEncryptionEngine *decryptionEngine, const uint8_t *packet, size_t length)
Verify message authentication code.
Definition: ssh_packet.c:1368
SSH key exchange.
error_t sshParseChannelOpen(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_OPEN message.
Definition: ssh_connection.c:866
error_t sshParseIgnore(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_IGNORE message.
Definition: ssh_transport.c:695
error_t sshParseUserAuthRequest(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_USERAUTH_REQUEST message.
Definition: ssh_auth.c:717
error_t sshParseUserAuthFailure(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_USERAUTH_FAILURE message.
Definition: ssh_auth.c:980
error_t sshParseServiceRequest(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_SERVICE_REQUEST message.
Definition: ssh_transport.c:546
__weak_func void hmacUpdate(HmacContext *context, const void *data, size_t length)
Update the HMAC context with a portion of the message being hashed.
Definition: hmac.c:201
error_t sshParseChannelOpenConfirmation(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_OPEN_CONFIRMATION message.
Definition: ssh_connection.c:1170
error_t sshParseRequestFailure(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_REQUEST_FAILURE message.
Definition: ssh_request.c:1245
error_t sshParseDebug(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_DEBUG message.
Definition: ssh_transport.c:754
error_t sshParseChannelOpenFailure(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_OPEN_FAILURE message.
Definition: ssh_connection.c:1312
__weak_func void hmacFinal(HmacContext *context, uint8_t *digest)
Finish the HMAC calculation.
Definition: hmac.c:218
error_t sshParseGlobalRequest(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_GLOBAL_REQUEST message.
Definition: ssh_request.c:989
__weak_func error_t cbcDecrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *c, uint8_t *p, size_t length)
CBC decryption.
Definition: cbc.c:108
error_t sshParseChannelEof(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_EOF message.
Definition: ssh_connection.c:1747
error_t sshDecryptPacket(SshConnection *connection, uint8_t *packet, size_t *length)
Decrypt an incoming SSH packet.
Definition: ssh_packet.c:677
error_t sshEncryptPacket(SshConnection *connection, uint8_t *packet, size_t *length)
Encrypt an outgoing SSH packet.
Definition: ssh_packet.c:467
SSH extension negotiation.
void poly1305Final(Poly1305Context *context, uint8_t *tag)
Finalize Poly1305 message-authentication code computation.
Definition: poly1305.c:127
SSH packet encryption/decryption.
error_t sshParseChannelData(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH_MSG_CHANNEL_DATA message.
Definition: ssh_connection.c:1544
void poly1305Update(Poly1305Context *context, const void *data, size_t length)
Update Poly1305 message-authentication code computation.
Definition: poly1305.c:89
error_t sshParseMessage(SshConnection *connection, const uint8_t *message, size_t length)
Parse SSH message.
Definition: ssh_packet.c:1129
error_t sshParsePacketLength(SshConnection *connection, uint8_t *packet)
Retrieve the length of an incoming SSH packet.
Definition: ssh_packet.c:913
__weak_func error_t hmacInit(HmacContext *context, const HashAlgo *hash, const void *key, size_t keyLen)
Initialize HMAC calculation.
Definition: hmac.c:140
Secure Shell (SSH)
error_t sshParseKexMessage(SshConnection *connection, uint8_t type, const uint8_t *message, size_t length)
Parse key exchange method-specific messages.
Definition: ssh_kex.c:1095
__weak_func error_t gcmDecrypt(GcmContext *context, const uint8_t *iv, size_t ivLen, const uint8_t *a, size_t aLen, const uint8_t *c, uint8_t *p, size_t length, const uint8_t *t, size_t tLen)
Authenticated decryption using GCM.
Definition: gcm.c:361
Global request and channel request handling.
__weak_func error_t gcmEncrypt(GcmContext *context, const uint8_t *iv, size_t ivLen, const uint8_t *a, size_t aLen, const uint8_t *p, uint8_t *c, size_t length, uint8_t *t, size_t tLen)
Authenticated encryption using GCM.
Definition: gcm.c:214
Debugging facilities.