libssh  0.8.5
The SSH library
dh.h
1/*
2 * This file is part of the SSH Library
3 *
4 * Copyright (c) 2009 by Aris Adamantiadis
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef DH_H_
22#define DH_H_
23
24#include "config.h"
25
26#include "libssh/crypto.h"
27
28int ssh_dh_generate_e(ssh_session session);
29int ssh_dh_generate_f(ssh_session session);
30int ssh_dh_generate_x(ssh_session session);
31int ssh_dh_generate_y(ssh_session session);
32
33int ssh_dh_init(void);
34void ssh_dh_finalize(void);
35
36ssh_string ssh_dh_get_e(ssh_session session);
37ssh_string ssh_dh_get_f(ssh_session session);
38int ssh_dh_import_f(ssh_session session,ssh_string f_string);
39int ssh_dh_import_e(ssh_session session, ssh_string e_string);
40
41int ssh_dh_import_pubkey_blob(ssh_session session, ssh_string pubkey_blob);
42int ssh_dh_import_next_pubkey_blob(ssh_session session, ssh_string pubkey_blob);
43
44int ssh_dh_build_k(ssh_session session);
45int ssh_client_dh_init(ssh_session session);
46int ssh_client_dh_reply(ssh_session session, ssh_buffer packet);
47
48ssh_key ssh_dh_get_current_server_publickey(ssh_session session);
49int ssh_dh_get_current_server_publickey_blob(ssh_session session,
50 ssh_string *pubkey_blob);
51ssh_key ssh_dh_get_next_server_publickey(ssh_session session);
52int ssh_dh_get_next_server_publickey_blob(ssh_session session,
53 ssh_string *pubkey_blob);
54
55int ssh_make_sessionid(ssh_session session);
56/* add data for the final cookie */
57int ssh_hashbufin_add_cookie(ssh_session session, unsigned char *cookie);
58int ssh_hashbufout_add_cookie(ssh_session session);
59int ssh_generate_session_keys(ssh_session session);
60
61#endif /* DH_H_ */
Definition: buffer.c:47
Definition: pki.h:42
Definition: session.h:102
Definition: string.h:29