ssh_key_decrypt.c
error_t sshFormatOpenSshPrivateKeyHeader(uint8_t *p, size_t *written)
Format private key header (OpenSSH format)
Definition: ssh_key_format.c:375
error_t sshParseKdfOptions(const uint8_t *data, size_t length, SshKdfOptions *kdfOptions)
Parse KDF options.
Definition: ssh_key_decrypt.c:314
error_t sshParseOpenSshPrivateKeyHeader(const uint8_t *data, size_t length, SshPrivateKeyHeader *privateKeyHeader)
Parse private key header (OpenSSH format)
Definition: ssh_key_parse.c:458
error_t blowfishInitState(BlowfishContext *context)
Blowfish state initialization.
Definition: blowfish.c:257
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
error_t blowfishExpandKey(BlowfishContext *context, const uint8_t *salt, size_t saltLen, const uint8_t *key, size_t keyLen)
Key expansion.
Definition: blowfish.c:291
SSH key file import functions.
bool_t sshCompareString(const SshString *string, const char_t *value)
Compare a binary string against the supplied value.
Definition: ssh_misc.c:1586
error_t sshDecryptOpenSshPrivateKey(const SshPrivateKeyHeader *privateKeyHeader, const char_t *password, const uint8_t *ciphertext, uint8_t *plaintext, size_t length)
OpenSSH private key decryption.
Definition: ssh_key_decrypt.c:193
error_t sshFormatBinaryString(const void *value, size_t valueLen, uint8_t *p, size_t *written)
Format a binary string.
Definition: ssh_misc.c:1415
AES (Advanced Encryption Standard)
__weak_func error_t aesInit(AesContext *context, const uint8_t *key, size_t keyLen)
Key expansion.
Definition: aes.c:242
error_t sshEncodeOpenSshPrivateKeyFile(const void *input, size_t inputLen, char_t *output, size_t *outputLen)
Encode SSH private key file (OpenSSH format)
Definition: ssh_key_export.c:974
Blowfish encryption algorithm.
SSH key formatting.
error_t sshKdfHash(uint8_t *password, uint8_t *salt, uint8_t *output)
KDF hash function.
Definition: ssh_key_decrypt.c:473
error_t sshDecryptPrivateKey(const char_t *input, size_t inputLen, const char_t *password, char_t *output, size_t *outputLen)
SSH private key decryption.
Definition: ssh_key_decrypt.c:61
PEM file decryption.
void blowfishEncryptBlock(BlowfishContext *context, const uint8_t *input, uint8_t *output)
Encrypt a 8-byte block using Blowfish algorithm.
Definition: blowfish.c:411
error_t sshDecodeOpenSshPrivateKeyFile(const char_t *input, size_t inputLen, uint8_t *output, size_t *outputLen)
Decode SSH private key file (OpenSSH format)
Definition: ssh_key_import.c:1709
SSH private key decryption.
error_t pemDecryptPrivateKey(const char_t *input, size_t inputLen, const char_t *password, char_t *output, size_t *outputLen)
PEM private key decryption.
Definition: pem_decrypt.c:58
void sha512Final(Sha512Context *context, uint8_t *digest)
Finish the SHA-512 message digest.
Definition: esp32_s2_crypto_hash.c:685
void sha512Init(Sha512Context *context)
Initialize SHA-512 message digest context.
Definition: esp32_s2_crypto_hash.c:599
SSH helper functions.
error_t sshKdf(const char *password, size_t passwordLen, const uint8_t *salt, size_t saltLen, uint_t rounds, uint8_t *key, size_t keyLen)
Key derivation function.
Definition: ssh_key_decrypt.c:353
error_t sshParseBinaryString(const uint8_t *p, size_t length, SshBinaryString *string)
Parse a binary string.
Definition: ssh_misc.c:1189
Secure Shell (SSH)
Counter(CTR) mode.
Debugging facilities.
SSH key file export functions.
void sha512Update(Sha512Context *context, const void *data, size_t length)
Update the SHA-512 context with a portion of the message being hashed.
Definition: esp32_s2_crypto_hash.c:625