Debian Codegraph @

src/bindings/crypto_kx.h

raw
1 /* Copyright 2018 Donald Stufft and individual contributors
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 size_t crypto_kx_publickeybytes(void);
17 size_t crypto_kx_secretkeybytes(void);
18 size_t crypto_kx_seedbytes(void);
19 size_t crypto_kx_sessionkeybytes(void);
20
21 int crypto_kx_seed_keypair(unsigned char pk[32],
22 unsigned char sk[32],
23 const unsigned char seed[32]);
24
25 int crypto_kx_keypair(unsigned char pk[32],
26 unsigned char sk[32]);
27
28 int crypto_kx_client_session_keys(unsigned char rx[32],
29 unsigned char tx[32],
30 const unsigned char client_pk[32],
31 const unsigned char client_sk[32],
32 const unsigned char server_pk[32]);
33
34 int crypto_kx_server_session_keys(unsigned char rx[32],
35 unsigned char tx[32],
36 const unsigned char server_pk[32],
37 const unsigned char server_sk[32],
38 const unsigned char client_pk[32]);