File: mceliece6688128f.h

package info (click to toggle)
grub2 2.14~git20250718.0e36779-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 60,688 kB
  • sloc: ansic: 541,811; asm: 68,074; sh: 9,803; cpp: 2,095; makefile: 1,895; python: 1,518; sed: 446; lex: 393; yacc: 268; awk: 85; lisp: 54; perl: 31
file content (63 lines) | stat: -rw-r--r-- 2,077 bytes parent folder | download
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
53
54
55
56
57
58
59
60
61
62
63
/* This file was automatically imported with 
   import_gcry.py. Please don't modify it */
/* mceliece6688128f.h - Classic McEliece for libgcrypt
 * Copyright (C) 2023-2024 Simon Josefsson <simon@josefsson.org>
 *
 * This file is part of Libgcrypt.
 *
 * Libgcrypt is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * Libgcrypt is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, see <https://www.gnu.org/licenses/>.
 * SPDX-License-Identifier: LGPL-2.1-or-later
 *
 */

#ifndef MCELIECE6688128F_H
#define MCELIECE6688128F_H


#ifdef _GCRYPT_IN_LIBGCRYPT
/**** Start of the glue code to libgcrypt ****/
#include "g10lib.h"             /* for GCC_ATTR_UNUSED */
#include "gcrypt-int.h"

#define mceliece6688128f_keypair _gcry_mceliece6688128f_keypair
#define mceliece6688128f_enc     _gcry_mceliece6688128f_enc
#define mceliece6688128f_dec     _gcry_mceliece6688128f_dec
/**** End of the glue code ****/
#else
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 5 )
#define GCC_ATTR_UNUSED  __attribute__ ((unused))
#else
#define GCC_ATTR_UNUSED
#endif

#define MCELIECE6688128F_SECRETKEY_SIZE 13932
#define MCELIECE6688128F_PUBLICKEY_SIZE 1044992
#define MCELIECE6688128F_CIPHERTEXT_SIZE 208
#define MCELIECE6688128F_SIZE 32
#endif

typedef void mceliece6688128f_random_func (void *ctx,
					   size_t length,
					   uint8_t *dst);

void
mceliece6688128f_keypair (uint8_t *pk, uint8_t *sk);

void
mceliece6688128f_enc (uint8_t *c, uint8_t *k, const uint8_t *pk);

void
mceliece6688128f_dec (uint8_t *k, const uint8_t *c, const uint8_t *sk);

#endif /* MCELIECE6688128F_H */