aboutsummaryrefslogtreecommitdiff
path: root/include/libssh/wrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libssh/wrapper.h')
-rw-r--r--include/libssh/wrapper.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/libssh/wrapper.h b/include/libssh/wrapper.h
index e4a0bba1..df415bb5 100644
--- a/include/libssh/wrapper.h
+++ b/include/libssh/wrapper.h
@@ -36,11 +36,11 @@ enum ssh_digest_e {
SSH_DIGEST_SHA512
};
-enum ssh_mac_e {
- SSH_MAC_SHA1=1,
- SSH_MAC_SHA256,
- SSH_MAC_SHA384,
- SSH_MAC_SHA512
+enum ssh_kdf_digest {
+ SSH_KDF_SHA1=1,
+ SSH_KDF_SHA256,
+ SSH_KDF_SHA384,
+ SSH_KDF_SHA512
};
enum ssh_hmac_e {
@@ -70,6 +70,7 @@ enum ssh_crypto_direction_e {
};
struct ssh_cipher_struct;
+struct ssh_crypto_struct;
typedef struct ssh_mac_ctx_struct *ssh_mac_ctx;
MD5CTX md5_init(void);
@@ -101,15 +102,16 @@ EVPCTX evp_init(int nid);
void evp_update(EVPCTX ctx, const void *data, unsigned long len);
void evp_final(EVPCTX ctx, unsigned char *md, unsigned int *mdlen);
-ssh_mac_ctx ssh_mac_ctx_init(enum ssh_mac_e type);
-void ssh_mac_update(ssh_mac_ctx ctx, const void *data, unsigned long len);
-void ssh_mac_final(unsigned char *md, ssh_mac_ctx ctx);
-
HMACCTX hmac_init(const void *key,int len, enum ssh_hmac_e type);
void hmac_update(HMACCTX c, const void *data, unsigned long len);
void hmac_final(HMACCTX ctx,unsigned char *hashmacbuf,unsigned int *len);
size_t hmac_digest_len(enum ssh_hmac_e type);
+int ssh_kdf(struct ssh_crypto_struct *crypto,
+ unsigned char *key, size_t key_len,
+ int key_type, unsigned char *output,
+ size_t requested_len);
+
int crypt_set_algorithms_client(ssh_session session);
int crypt_set_algorithms_server(ssh_session session);
struct ssh_crypto_struct *crypto_new(void);