diff options
Diffstat (limited to 'include/libssh/crypto.h')
-rw-r--r-- | include/libssh/crypto.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/libssh/crypto.h b/include/libssh/crypto.h index 2d2d4f7f..4cd0cecd 100644 --- a/include/libssh/crypto.h +++ b/include/libssh/crypto.h @@ -122,7 +122,7 @@ struct ssh_crypto_struct { ssh_curve25519_pubkey curve25519_server_pubkey; #endif ssh_string dh_server_signature; /* information used by dh_handshake. */ - size_t digest_len; /* len of all the fields below */ + size_t digest_len; /* len of the two fields below */ unsigned char *session_id; unsigned char *secret_hash; /* Secret hash is same as session id until re-kex */ unsigned char *encryptIV; @@ -148,7 +148,7 @@ struct ssh_crypto_struct { struct ssh_kex_struct client_kex; char *kex_methods[SSH_KEX_METHODS]; enum ssh_key_exchange_e kex_type; - enum ssh_mac_e mac_type; /* Mac operations to use for key gen */ + enum ssh_kdf_digest digest_type; /* Digest type for session keys derivation */ enum ssh_crypto_direction_e used; /* Is this crypto still used for either of directions? */ }; @@ -204,5 +204,9 @@ struct ssh_cipher_struct { }; const struct ssh_cipher_struct *ssh_get_chacha20poly1305_cipher(void); +int sshkdf_derive_key(struct ssh_crypto_struct *crypto, + unsigned char *key, size_t key_len, + int key_type, unsigned char *output, + size_t requested_len); #endif /* _CRYPTO_H_ */ |