1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pub const crypto_kx_PUBLICKEYBYTES: u32 = 32;
pub const crypto_kx_SECRETKEYBYTES: u32 = 32;
pub const crypto_kx_SEEDBYTES: u32 = 32;
pub const crypto_kx_SESSIONKEYBYTES: u32 = 32;
pub const crypto_kx_PRIMITIVE: &[u8; 14usize] = b"x25519blake2b\0";
extern "C" {
pub fn crypto_kdf_keygen(k: *mut libc::c_uchar);
}
extern "C" {
pub fn crypto_kx_publickeybytes() -> usize;
}
extern "C" {
pub fn crypto_kx_secretkeybytes() -> usize;
}
extern "C" {
pub fn crypto_kx_seedbytes() -> usize;
}
extern "C" {
pub fn crypto_kx_sessionkeybytes() -> usize;
}
extern "C" {
pub fn crypto_kx_primitive() -> *const libc::c_char;
}
extern "C" {
pub fn crypto_kx_seed_keypair(
pk: *mut libc::c_uchar,
sk: *mut libc::c_uchar,
seed: *const libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn crypto_kx_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int;
}
extern "C" {
pub fn crypto_kx_client_session_keys(
rx: *mut libc::c_uchar,
tx: *mut libc::c_uchar,
client_pk: *const libc::c_uchar,
client_sk: *const libc::c_uchar,
server_pk: *const libc::c_uchar,
) -> libc::c_int;
}
extern "C" {
pub fn crypto_kx_server_session_keys(
rx: *mut libc::c_uchar,
tx: *mut libc::c_uchar,
server_pk: *const libc::c_uchar,
server_sk: *const libc::c_uchar,
client_pk: *const libc::c_uchar,
) -> libc::c_int;
}