Debian Codegraph @

cipher/kem-ecc.h

raw
1 /* kem-ecc.h - Key Encapsulation Mechanism with ECC
2 * Copyright (C) 2024 g10 Code GmbH
3 *
4 * This file is part of Libgcrypt.
5 *
6 * Libgcrypt is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser general Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
10 *
11 * Libgcrypt 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
14 * GNU 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 program; if not, see <https://www.gnu.org/licenses/>.
18 * SPDX-License-Identifier: LGPL-2.1-or-later
19 *
20 */
21
22 gpg_err_code_t _gcry_ecc_raw_keypair (int algo,
23 void *pubkey, size_t pubkey_len,
24 void *seckey, size_t seckey_len);
25 gpg_err_code_t _gcry_ecc_raw_encap (int algo,
26 const void *pubkey, size_t pubkey_len,
27 void *ciphertext, size_t ciphertext_len,
28 void *shared, size_t shared_len);
29 gpg_err_code_t _gcry_ecc_raw_decap (int algo,
30 const void *seckey, size_t seckey_len,
31 const void *ciphertext,
32 size_t ciphertext_len,
33 void *shared, size_t shared_len);
34
35 gpg_err_code_t _gcry_ecc_dhkem_encap (int algo, const void *pubkey,
36 void *ciphertext,
37 void *shared);
38 gpg_err_code_t _gcry_ecc_dhkem_decap (int algo, const void *seckey,
39 const void *ciphertext,
40 void *shared, const void *optional);