Skip to contentSkip to conversation

Update libgcrypt to 1.11

PATCH Superseded Vladimir Serbinenko 1 participant 15 messages Apr 10, 2025

v11 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#4 lore raw

PATCH v11 4/14 Adjust import script, definitions and API users for libgcrypt 1.11

This patches modifies the GRUB-libgcrypt API to match new libgcrypt 1.11

---
 autogen.sh                                    |   5 +
 conf/Makefile.common                          |   4 +-
 grub-core/Makefile.core.def                   |  20 +-
 grub-core/commands/hashsum.c                  |   2 +-
 grub-core/commands/legacycfg.c                |   6 +-
 grub-core/commands/pgp.c                      | 114 +++-----
 grub-core/commands/xnu_uuid.c                 |   2 +-
 grub-core/disk/cryptodisk.c                   |   2 +-
 grub-core/io/gzio.c                           |   2 +-
 grub-core/io/lzopio.c                         |   2 +-
 grub-core/lib/adler32.c                       |  21 +-
 grub-core/lib/crc64.c                         |  24 +-
 grub-core/lib/crypto.c                        | 245 +++++++++++++++-
 grub-core/lib/libgcrypt-patches/01_md.patch   | 124 +++++++++
 grub-core/lib/libgcrypt-patches/04_aria.patch |  22 ++
 .../05_disable_rsa_shake.patch                |  36 +++
 grub-core/lib/libgcrypt/src/gcrypt-int.h      |  51 ----
 grub-core/lib/libgcrypt_wrap/cipher_wrap.h    |  21 +-
 grub-core/lib/libgcrypt_wrap/mem.c            |  83 +++++-
 grub-core/lib/posix_wrap/sys/types.h          |   4 +
 grub-core/lib/xzembed/xz_dec_stream.c         |  18 +-
 include/grub/crypto.h                         | 262 +++++++++++++++---
 include/grub/gcrypt/gpg-error.h               |   9 +
 util/grub-fstest.c                            |   2 +-
 util/import_gcry.py                           | 186 +++++++++----
 util/import_gcrypt_inth.sed                   |  17 ++
 util/import_gcrypth.sed                       |   2 -
 27 files changed, 1004 insertions(+), 282 deletions(-)
 create mode 100644 grub-core/lib/libgcrypt-patches/01_md.patch
 create mode 100644 grub-core/lib/libgcrypt-patches/04_aria.patch
 create mode 100644 grub-core/lib/libgcrypt-patches/05_disable_rsa_shake.patch
 create mode 100644 util/import_gcrypt_inth.sed
autogen.sh +5 -0
index ebd614792..fbdb33879 100755
@@ -35,6 +35,7 @@ ${PYTHON} util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.t
 echo "Importing libgcrypt..."
 ${PYTHON} util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
 sed -n -f util/import_gcrypth.sed < grub-core/lib/libgcrypt/src/gcrypt.h.in > include/grub/gcrypt/gcrypt.h
+sed -n -f util/import_gcrypt_inth.sed < grub-core/lib/libgcrypt/src/gcrypt-int.h >> include/grub/gcrypt/gcrypt.h
 if [ -f include/grub/gcrypt/g10lib.h ]; then
     rm include/grub/gcrypt/g10lib.h
 fi
@@ -51,6 +52,10 @@ for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul
     cp grub-core/lib/libgcrypt-grub/mpi/generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
 done
 
+for x in grub-core/lib/libgcrypt-patches/*.patch; do
+    patch -i $x -p1
+done
+
 echo "Importing libtasn1..."
 if [ -d grub-core/lib/libtasn1-grub ]; then
   rm -rf grub-core/lib/libtasn1-grub
conf/Makefile.common +2 -2
index c60f55386..5cada4568 100644
@@ -81,8 +81,8 @@ CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-co
 CFLAGS_POSIX = -fno-builtin
 CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
 
-CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
-CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -I$(top_srcdir)/include/grub/gcrypt
+CFLAGS_GCRY = -Wno-error=sign-compare -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
+CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -D_GCRYPT_CONFIG_H_INCLUDED=1 -DHAVE_STRTOUL=1 -I$(top_srcdir)/include/grub/gcrypt
 
 CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
 
grub-core/Makefile.core.def +18 -2
index f70e02e69..c1397fcf0 100644
@@ -975,8 +975,8 @@ module = {
 module = {
   name = pgp;
   common = commands/pgp.c;
-  cflags = '$(CFLAGS_POSIX)';
-  cppflags = '-I$(srcdir)/lib/posix_wrap';
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
+  cppflags = '$(CPPFLAGS_GCRY)';
 };
 
 module = {
@@ -2534,7 +2534,23 @@ module = {
   common = lib/libgcrypt-grub/mpi/mpicoder.c;
   common = lib/libgcrypt-grub/mpi/mpih-rshift.c;
   common = lib/libgcrypt-grub/mpi/mpi-inline.c;
+  common = lib/libgcrypt-grub/mpi/mpih-const-time.c;
+  common = lib/libgcrypt-grub/mpi/mpi-scan.c;
+  common = lib/libgcrypt-grub/src/const-time.c;
   common = lib/libgcrypt_wrap/mem.c;
+  common = lib/libgcrypt-grub/cipher/md.c;
+
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare -Wno-unused-but-set-variable';
+  cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+  name = pubkey;
+  common = lib/libgcrypt-grub/cipher/pubkey-util.c;
+  common = lib/libgcrypt-grub/cipher/rsa-common.c;
+  common = lib/libgcrypt-grub/cipher/dsa-common.c;
+  common = lib/libgcrypt-grub/src/sexp.c;
+  common = lib/b64dec.c;
 
   cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
   cppflags = '$(CPPFLAGS_GCRY)';
grub-core/commands/hashsum.c +1 -1
index d56b5b0bb..b6f8e3d1a 100644
@@ -73,7 +73,7 @@ hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result)
   if (!readbuf || !context)
     goto fail;
 
-  hash->init (context);
+  hash->init (context, 0);
   while (1)
     {
       grub_ssize_t r;
grub-core/commands/legacycfg.c +3 -3
index 3bf9fe2e4..a768fa6e8 100644
@@ -624,7 +624,7 @@ check_password_md5_real (const char *entered,
   if (!ctx)
     return 0;
 
-  GRUB_MD_MD5->init (ctx);
+  GRUB_MD_MD5->init (ctx, 0);
   GRUB_MD_MD5->write (ctx, entered, enteredlen);
   GRUB_MD_MD5->write (ctx, pw->salt + 3, pw->saltlen - 3);
   GRUB_MD_MD5->write (ctx, entered, enteredlen);
@@ -632,7 +632,7 @@ check_password_md5_real (const char *entered,
   GRUB_MD_MD5->final (ctx);
   grub_memcpy (alt_result, digest, MD5_HASHLEN);
 
-  GRUB_MD_MD5->init (ctx);
+  GRUB_MD_MD5->init (ctx, 0);
   GRUB_MD_MD5->write (ctx, entered, enteredlen);
   GRUB_MD_MD5->write (ctx, pw->salt, pw->saltlen); /* include the $1$ header */
   for (i = enteredlen; i > 16; i -= 16)
@@ -648,7 +648,7 @@ check_password_md5_real (const char *entered,
     {
       grub_memcpy (alt_result, digest, 16);
 
-      GRUB_MD_MD5->init (ctx);
+      GRUB_MD_MD5->init (ctx, 0);
       if ((i & 1) != 0)
 	GRUB_MD_MD5->write (ctx, entered, enteredlen);
       else
grub-core/commands/pgp.c +33 -81

197 lines not on this page · raw message

grub-core/commands/xnu_uuid.c +1 -1
index ae4b3a415..1406c43f5 100644
@@ -68,7 +68,7 @@ grub_cmd_xnu_uuid (grub_command_t cmd __attribute__ ((unused)),
   ctx = grub_zalloc (GRUB_MD_MD5->contextsize);
   if (!ctx)
     return grub_errno;
-  GRUB_MD_MD5->init (ctx);
+  GRUB_MD_MD5->init (ctx, 0);
   GRUB_MD_MD5->write (ctx, hash_prefix, sizeof (hash_prefix));
   GRUB_MD_MD5->write (ctx, &serial, sizeof (serial));
   GRUB_MD_MD5->final (ctx);
grub-core/disk/cryptodisk.c +1 -1
index 7a785a49c..98352a432 100644
@@ -302,7 +302,7 @@ grub_cryptodisk_endecrypt (struct grub_cryptodisk *dev,
 	      return GPG_ERR_OUT_OF_MEMORY;
 
 	    tmp = grub_cpu_to_le64 (sector << log_sector_size);
-	    dev->iv_hash->init (ctx);
+	    dev->iv_hash->init (ctx, 0);
 	    dev->iv_hash->write (ctx, dev->iv_prefix, dev->iv_prefix_len);
 	    dev->iv_hash->write (ctx, &tmp, sizeof (tmp));
 	    dev->iv_hash->final (ctx);
grub-core/io/gzio.c +1 -1
index cb7eb1fe3..fa9d942b2 100644
@@ -1201,7 +1201,7 @@ initialize_tables (grub_gzio_t gzio)
   gzio->td = NULL;
 
   if (gzio->hcontext)
-    gzio->hdesc->init(gzio->hcontext);
+    gzio->hdesc->init(gzio->hcontext, 0);
 }
 
 
grub-core/io/lzopio.c +1 -1
index a7d442543..cea942308 100644
@@ -345,7 +345,7 @@ test_header (grub_file_t file)
     if (! context)
       return 0;
 
-    hcheck->init(context);
+    hcheck->init(context, 0);
 
     /* MAGIC is not included in check calculation.  */
     hcheck->write(context, &header.lzop_version, sizeof(header)- LZOP_MAGIC_SIZE);
grub-core/lib/adler32.c +16 -5
index 43b68af62..f849ccee6 100644
@@ -29,10 +29,12 @@ struct adler32_context
 };
 
 static void
-adler32_init (void *context)
+adler32_init (void *context, unsigned int flags)
 {
   struct adler32_context *ctx = context;
 
+  (void) flags;
+
   ctx->a = 1;
   ctx->b = 0;
 }
@@ -81,13 +83,22 @@ adler32_read (void *context)
 
 static gcry_md_spec_t spec_adler32 =
   {
-    "ADLER32", 0, 0, 0, 4,
-    adler32_init, adler32_write, adler32_final, adler32_read,
-    sizeof (struct adler32_context),
+    .algo = GCRY_MD_ADLER32,
+    .flags = {.disabled = 0, .fips = 0},
+    .name = "ADLER32",
+    .asnoid = NULL,
+    .asnlen = 0,
+    .oids = NULL,
+    .mdlen = 4,
+    .init = adler32_init,
+    .write = adler32_write,
+    .final = adler32_final,
+    .read = adler32_read,
+    .contextsize = sizeof (struct adler32_context),
+    .blocksize = 64,
 #ifdef GRUB_UTIL
     .modname = "adler32",
 #endif
-    .blocksize = 64
   };
 
 
grub-core/lib/crc64.c +19 -5
index 4960f3f89..c231fa97c 100644
@@ -61,8 +61,10 @@ init_crc64_table (void)
 }
 
 static void
-crc64_init (void *context)
+crc64_init (void *context, unsigned int flags)
 {
+  (void) flags;
+
   if (! crc64_table[1])
     init_crc64_table ();
   *(grub_uint64_t *) context = 0;
@@ -97,10 +99,22 @@ crc64_final (void *context __attribute__ ((unused)))
 
 gcry_md_spec_t _gcry_digest_spec_crc64 =
   {
-    "CRC64", 0, 0, 0, 8,
-    crc64_init, crc64_write, crc64_final, crc64_read,
-    sizeof (grub_uint64_t),
-    .blocksize = 64
+    .algo = GCRY_MD_CRC64,
+    .flags = {.disabled = 0, .fips = 0},
+    .name = "CRC64",
+    .asnoid = NULL,
+    .asnlen = 0,
+    .oids = NULL,
+    .mdlen = 8,
+    .init = crc64_init,
+    .write = crc64_write,
+    .final = crc64_final,
+    .read = crc64_read,
+    .contextsize = sizeof (grub_uint64_t),
+    .blocksize = 64,
+#ifdef GRUB_UTIL
+    .modname = "crc64",
+#endif
   };
 
 GRUB_MOD_INIT(crc64)
grub-core/lib/crypto.c +234 -11

311 lines not on this page · raw message

grub-core/lib/libgcrypt-patches/01_md.patch new file +124 -0

124 lines not on this page · raw message

grub-core/lib/libgcrypt-patches/04_aria.patch new file +22 -0
new file mode 100644
index 000000000..b2f6e884f
@@ -0,0 +1,22 @@
+diff --git a/grub-core/lib/libgcrypt/cipher/aria.c b/grub-core/lib/libgcrypt/cipher/aria.c
+index bc2d43841..cfc5a74f2 100644
+--- a/grub-core/lib/libgcrypt-grub/cipher/aria.c
++++ b/grub-core/lib/libgcrypt-grub/cipher/aria.c
+@@ -1013,7 +1013,7 @@ aria_crypt(ARIA_context *ctx, byte *out, const byte *in,
+   return 4 * sizeof(void *) + 4 * sizeof(u32); /* stack burn depth */
+ }
+ 
+-unsigned int
++static unsigned int
+ aria_encrypt(void *c, byte *outbuf, const byte *inbuf)
+ {
+   ARIA_context *ctx = (ARIA_context *)c;
+@@ -1023,7 +1023,7 @@ aria_encrypt(void *c, byte *outbuf, const byte *inbuf)
+   return aria_crypt (ctx, outbuf, inbuf, ctx->enc_key);
+ }
+ 
+-unsigned int
++static unsigned int
+ aria_decrypt(void *c, byte *outbuf, const byte *inbuf)
+ {
+   ARIA_context *ctx = (ARIA_context *)c;
grub-core/lib/libgcrypt-patches/05_disable_rsa_shake.patch new file +36 -0
new file mode 100644
index 000000000..c9911d4ad
@@ -0,0 +1,36 @@
+diff --git a/grub-core/lib/libgcrypt/cipher/rsa-common.c b/grub-core/lib/libgcrypt/cipher/rsa-common.c
+index 1920eedd8..c4819208b 100644
+--- a/grub-core/lib/libgcrypt-grub/cipher/rsa-common.c
++++ b/grub-core/lib/libgcrypt-grub/cipher/rsa-common.c
+@@ -912,6 +912,7 @@ _gcry_rsa_pss_encode (gcry_mpi_t *r_result, unsigned int nbits, int algo,
+   memcpy (p, salt, saltlen);
+ 
+   /* Step 9: dbmask = MGF(H, emlen - hlen - 1).  */
++#if 0
+   if (algo == GCRY_MD_SHAKE128 || algo == GCRY_MD_SHAKE256)
+     {
+       gcry_buffer_t iov;
+@@ -925,6 +926,7 @@ _gcry_rsa_pss_encode (gcry_mpi_t *r_result, unsigned int nbits, int algo,
+                                      &iov, 1);
+     }
+   else
++#endif
+     mgf1 (dbmask, emlen - hlen - 1, h, hlen, algo);
+ 
+   /* Step 10: maskedDB = DB ^ dbMask */
+@@ -1086,6 +1088,7 @@ _gcry_rsa_pss_verify (gcry_mpi_t value, int hashed_already,
+     }
+ 
+   /* Step 7: dbmask = MGF(H, emlen - hlen - 1).  */
++#if 0
+   if (algo == GCRY_MD_SHAKE128 || algo == GCRY_MD_SHAKE256)
+     {
+       gcry_buffer_t iov;
+@@ -999,6 +1102,7 @@ _gcry_rsa_pss_verify (gcry_mpi_t value, int hashed_already,
+                                      &iov, 1);
+     }
+   else
++#endif
+     mgf1 (dbmask, emlen - hlen - 1, h, hlen, algo);
+ 
+   /* Step 8: maskedDB = DB ^ dbMask.  */
grub-core/lib/libgcrypt/src/gcrypt-int.h +0 -51

57 lines not on this page · raw message

grub-core/lib/libgcrypt_wrap/cipher_wrap.h +19 -2
index 42835493d..30ba6981b 100644
@@ -19,6 +19,8 @@
 #ifndef GRUB_GCRY_WRAP_HEADER
 #define GRUB_GCRY_WRAP_HEADER 1
 
+#define USE_SHA512 1
+
 #include <grub/types.h>
 #include <grub/mm.h>
 #include <grub/misc.h>
@@ -35,10 +37,12 @@
 #undef __GNU_LIBRARY__
 #define __GNU_LIBRARY__ 1
 
+#undef HAVE_U64
+#undef U64_C
+#define HAVE_U64 1
+#define UINT64_C(c) (c ## ULL)
 #define U64_C(c) (c ## ULL)
 
-#define PUBKEY_FLAG_NO_BLINDING    (1 << 0)
-
 #define CIPHER_INFO_NO_WEAK_KEY    1
 
 #define HAVE_U64_TYPEDEF 1
@@ -74,4 +78,17 @@ _gcry_fips_mode (void)
 
 #define gcry_mpi_mod _gcry_mpi_mod
 
+#define strtol grub_strtol
+#define strtoul grub_strtoul
+#define atoi(nptr) (strtol((nptr), NULL, 10))
+
+#define stpcpy grub_stpcpy
+
+#define spec_from_algo grub_crypto_lookup_md_by_algo
+
+struct gcry_cshake_customization;
+
+gpg_err_code_t
+_gcry_cshake_customize (void *context, struct gcry_cshake_customization *p);
+
 #endif
grub-core/lib/libgcrypt_wrap/mem.c +78 -5

118 lines not on this page · raw message

grub-core/lib/posix_wrap/sys/types.h +4 -0
index 2f3e86549..73775c9ca 100644
@@ -39,12 +39,16 @@ typedef grub_int32_t int32_t;
 typedef grub_int64_t int64_t;
 
 #define HAVE_U64_TYPEDEF 1
+#define HAVE_TYPE_U64 1
 typedef grub_uint64_t u64;
 #define HAVE_U32_TYPEDEF 1
+#define HAVE_TYPE_U32 1
 typedef grub_uint32_t u32;
 #define HAVE_U16_TYPEDEF 1
+#define HAVE_TYPE_U16 1
 typedef grub_uint16_t u16;
 #define HAVE_BYTE_TYPEDEF 1
+#define HAVE_TYPE_BYTE 1
 typedef grub_uint8_t byte;
 
 typedef grub_addr_t uintptr_t;
grub-core/lib/xzembed/xz_dec_stream.c +9 -9
index 832d8af9a..f2dd42dc2 100644
@@ -425,9 +425,9 @@ static enum xz_ret hash_validate(struct xz_dec *s, struct xz_buf *b,
 
 #ifndef GRUB_EMBED_DECOMPRESSOR
 	if (s->hash)
-		s->hash->init(s->hash_context);
+		s->hash->init(s->hash_context, 0);
 	if (s->crc32)
-		s->crc32->init(s->crc32_context);
+		s->crc32->init(s->crc32_context, 0);
 #endif
 	s->have_hash_value = 0;
 	s->pos = 0;
@@ -493,7 +493,7 @@ static enum xz_ret dec_stream_header(struct xz_dec *s)
 		s->crc32_context = kmalloc(s->crc32->contextsize, GFP_KERNEL);
 		if (s->crc32_context == NULL)
 			return XZ_MEMLIMIT_ERROR;
-		s->crc32->init(s->crc32_context);
+		s->crc32->init(s->crc32_context, 0);
 	}
 #endif
 
@@ -531,9 +531,9 @@ static enum xz_ret dec_stream_header(struct xz_dec *s)
 				return XZ_MEMLIMIT_ERROR;
 			}
 
-			s->hash->init(s->hash_context);
-			s->hash->init(s->index.hash.hash_context);
- 			s->hash->init(s->block.hash.hash_context);
+			s->hash->init(s->hash_context, 0);
+			s->hash->init(s->index.hash.hash_context, 0);
+ 			s->hash->init(s->block.hash.hash_context, 0);
 		}
 #endif
 	}
@@ -1014,9 +1014,9 @@ void xz_dec_reset(struct xz_dec *s)
 #ifndef GRUB_EMBED_DECOMPRESSOR
 	if (s->hash)
 	{
-		s->hash->init(s->hash_context);
-		s->hash->init(s->index.hash.hash_context);
-		s->hash->init(s->block.hash.hash_context);
+		s->hash->init(s->hash_context, 0);
+		s->hash->init(s->index.hash.hash_context, 0);
+		s->hash->init(s->block.hash.hash_context, 0);
 	}
 #endif
 	s->have_hash_value = 0;
include/grub/crypto.h +219 -43

385 lines not on this page · raw message

include/grub/gcrypt/gpg-error.h +9 -0
index 1e4250284..444bef221 100644
@@ -29,4 +29,13 @@ gpg_err_source (gpg_error_t err __attribute__ ((unused)))
 gcry_err_code_t
 gpg_error_from_syserror (void);
 
+gcry_err_code_t
+gpg_err_code_from_syserror (void);
+
+gcry_err_code_t
+gpg_error_from_errno (int err);
+
+gcry_err_code_t
+gpg_err_code_from_errno (int err);
+
 #endif
util/grub-fstest.c +1 -1
index 7ff9037b8..24b20ab91 100644
@@ -365,7 +365,7 @@ static void
 cmd_crc (char *pathname)
 {
   grub_uint8_t *crc32_context = xmalloc (GRUB_MD_CRC32->contextsize);
-  GRUB_MD_CRC32->init(crc32_context);
+  GRUB_MD_CRC32->init(crc32_context, 0);
 
   read_file (pathname, crc_hook, crc32_context);
   GRUB_MD_CRC32->final(crc32_context);
util/import_gcry.py +131 -55

422 lines not on this page · raw message

util/import_gcrypt_inth.sed new file +17 -0
new file mode 100644
index 000000000..ebe9371ee
@@ -0,0 +1,17 @@
+/^#@INSERT_SYS_SELECT_H@/ d
+/^@FALLBACK_SOCKLEN_T@/ d
+/^# *include <stdlib\.h>/ d
+/^# *include <string\.h>/ d
+/^# *include <winsock2\.h>/ d
+/^# *include <ws2tcpip\.h>/ d
+/^# *include <time\.h>/ d
+/^# *include <sys\/socket\.h>/ d
+/^# *include <sys\/time\.h>/ d
+/^  typedef long ssize_t;/ d
+/^  typedef int  pid_t;/ d
+/^# *include <gpg-error\.h>/ s,#include <gpg-error.h>,#include <grub/gcrypt/gpg-error.h>,
+/^typedef gpg_error_t gcry_error_t;/ d
+/^typedef gpg_err_code_t gcry_err_code_t;/ d
+/^typedef struct gcry_mpi \*gcry_mpi_t;/ d
+/^#error  gcrypt.h already included/ d
+p
util/import_gcrypth.sed +0 -2
index fe6d1a072..503b4b547 100644
@@ -13,6 +13,4 @@
 /^typedef gpg_error_t gcry_error_t;/ d
 /^typedef gpg_err_code_t gcry_err_code_t;/ d
 /^typedef struct gcry_mpi \*gcry_mpi_t;/ d
-/^struct gcry_thread_cbs/ d
-s,_gcry_mpi_invm,gcry_mpi_invm,g
 p
\ No newline at end of file
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#5 lore raw

PATCH v11 5/14 Add DSA and RSA SEXP tests

In reply to Vladimir Serbinenko

This allows us to test purely the integration of the implementation of DSA and RSA from libgcrypt without concerning with additional code.

---
 grub-core/Makefile.core.def     |  16 ++++
 grub-core/tests/dsa_sexp_test.c | 127 ++++++++++++++++++++++++++++++++
 grub-core/tests/rsa_sexp_test.c | 101 +++++++++++++++++++++++++
 3 files changed, 244 insertions(+)
 create mode 100644 grub-core/tests/dsa_sexp_test.c
 create mode 100644 grub-core/tests/rsa_sexp_test.c
grub-core/Makefile.core.def +16 -0
index c1397fcf0..770f6e0c5 100644
@@ -2180,6 +2180,22 @@ module = {
   common = tests/setjmp_test.c;
 };
 
+module = {
+  name = dsa_sexp_test;
+  common = tests/dsa_sexp_test.c;
+
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
+  cppflags = '$(CPPFLAGS_GCRY)';
+};
+
+module = {
+  name = rsa_sexp_test;
+  common = tests/rsa_sexp_test.c;
+
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
+  cppflags = '$(CPPFLAGS_GCRY)';
+};
+
 module = {
   name = signature_test;
   common = tests/signature_test.c;
grub-core/tests/dsa_sexp_test.c new file +127 -0

127 lines not on this page · raw message

grub-core/tests/rsa_sexp_test.c new file +101 -0

101 lines not on this page · raw message

Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#11 lore raw

PATCH v11 11/14 gcry: Ignore sign-compare warnings

In reply to Vladimir Serbinenko

libgcrypt itself is compiled with -Wno-sign-compare. Do the same for consistency

---
 conf/Makefile.common        |  2 +-
 grub-core/Makefile.core.def | 10 +++++-----
 util/import_gcry.py         |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
conf/Makefile.common +1 -1
index 0df4d6e7a..4d38ff034 100644
@@ -81,7 +81,7 @@ CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-co
 CFLAGS_POSIX = -fno-builtin
 CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
 
-CFLAGS_GCRY = -Wno-error=sign-compare -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
+CFLAGS_GCRY = -Wno-sign-compare -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
 CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -D_GCRYPT_CONFIG_H_INCLUDED=1 -I$(top_srcdir)/include/grub/gcrypt
 
 CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
grub-core/Makefile.core.def +5 -5
index 770f6e0c5..56e407376 100644
@@ -975,7 +975,7 @@ module = {
 module = {
   name = pgp;
   common = commands/pgp.c;
-  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls';
   cppflags = '$(CPPFLAGS_GCRY)';
 };
 
@@ -2184,7 +2184,7 @@ module = {
   name = dsa_sexp_test;
   common = tests/dsa_sexp_test.c;
 
-  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls';
   cppflags = '$(CPPFLAGS_GCRY)';
 };
 
@@ -2192,7 +2192,7 @@ module = {
   name = rsa_sexp_test;
   common = tests/rsa_sexp_test.c;
 
-  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls';
   cppflags = '$(CPPFLAGS_GCRY)';
 };
 
@@ -2556,7 +2556,7 @@ module = {
   common = lib/libgcrypt_wrap/mem.c;
   common = lib/libgcrypt-grub/cipher/md.c;
 
-  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare -Wno-unused-but-set-variable';
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-unused-but-set-variable';
   cppflags = '$(CPPFLAGS_GCRY)';
 };
 
@@ -2568,7 +2568,7 @@ module = {
   common = lib/libgcrypt-grub/src/sexp.c;
   common = lib/b64dec.c;
 
-  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
+  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls';
   cppflags = '$(CPPFLAGS_GCRY)';
 };
 
util/import_gcry.py +1 -1
index 1be18cf91..a4411ecb9 100644
@@ -551,7 +551,7 @@ for cipher_file in cipher_files:
                     confutil.write ("  common = grub-core/lib/libgcrypt-grub/cipher/%s;\n" % src)
             if modname == "gcry_ecc":
                 conf.write ("  common = lib/libgcrypt-grub/mpi/ec.c;\n")
-                conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';\n")
+                conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls';\n")
             elif modname == "gcry_rijndael" or modname == "gcry_md4" or modname == "gcry_md5" or modname == "gcry_rmd160" or modname == "gcry_sha1" or modname == "gcry_sha256" or modname == "gcry_sha512" or modname == "gcry_tiger":
                 # Alignment checked by hand
                 conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-cast-align';\n");
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#2 lore raw

PATCH v11 2/14 Import b64dec from gpg-error

In reply to Vladimir Serbinenko

Imported from libgpg-error 1.51

---
 grub-core/lib/b64dec.c | 279 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 279 insertions(+)
 create mode 100644 grub-core/lib/b64dec.c
grub-core/lib/b64dec.c new file +279 -0
new file mode 100644
index 000000000..868d98568
@@ -0,0 +1,279 @@
+/* b64dec.c - Simple Base64 decoder.
+ * Copyright (C) 2008, 2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008, 2011, 2016 g10 Code GmbH
+ *
+ * This file is part of Libgpg-error.
+ *
+ * This file 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.
+ *
+ * This file 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
+ *
+ * This file was originally a part of GnuPG.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "gpgrt-int.h"
+
+
+/* The reverse base-64 list used for base-64 decoding. */
+static unsigned char const asctobin[128] =
+  {
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f,
+    0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
+    0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
+    0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
+    0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
+    0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
+    0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
+    0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
+    0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff
+  };
+
+enum decoder_states
+  {
+    s_init, s_idle, s_lfseen, s_beginseen, s_waitheader, s_waitblank, s_begin,
+    s_b64_0, s_b64_1, s_b64_2, s_b64_3,
+    s_waitendtitle, s_waitend
+  };
+
+
+
+/* Allocate and initialize the context for the base64 decoder.  If
+   TITLE is NULL a plain base64 decoding is done.  If it is the empty
+   string the decoder will skip everything until a "-----BEGIN " line
+   has been seen, decoding ends at a "----END " line.  */
+gpgrt_b64state_t
+_gpgrt_b64dec_start (const char *title)
+{
+  gpgrt_b64state_t state;
+  char *t = NULL;
+
+  if (title)
+    {
+      t = xtrystrdup (title);
+      if (!t)
+        return NULL;
+    }
+
+  state = xtrycalloc (1, sizeof (struct _gpgrt_b64state));
+  if (!state)
+    {
+      xfree (t);
+      return NULL;
+    }
+
+  if (t)
+    {
+      state->title = t;
+      state->idx = s_init;
+    }
+  else
+    state->idx = s_b64_0;
+
+  state->using_decoder = 1;
+
+  return state;
+}
+
+
+/* Do in-place decoding of base-64 data of LENGTH in BUFFER.  Stores the
+   new length of the buffer at R_NBYTES. */
+gpg_err_code_t
+_gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length,
+                    size_t *r_nbytes)
+{
+  enum decoder_states ds = state->idx;
+  unsigned char val = state->radbuf[0];
+  int pos = state->quad_count;
+  char *d, *s;
+
+  if (state->lasterr)
+    return state->lasterr;
+
+  if (state->stop_seen)
+    {
+      *r_nbytes = 0;
+      state->lasterr = GPG_ERR_EOF;
+      xfree (state->title);
+      state->title = NULL;
+      return state->lasterr;
+    }
+
+  for (s=d=buffer; length && !state->stop_seen; length--, s++)
+    {
+    again:
+      switch (ds)
+        {
+        case s_idle:
+          if (*s == '\n')
+            {
+              ds = s_lfseen;
+              pos = 0;
+            }
+          break;
+        case s_init:
+          ds = s_lfseen;
+          /* Fall through */
+        case s_lfseen:
+          if (*s != "-----BEGIN "[pos])
+            {
+              ds = s_idle;
+              goto again;
+            }
+          else if (pos == 10)
+            {
+              pos = 0;
+              ds = s_beginseen;
+            }
+          else
+            pos++;
+          break;
+        case s_beginseen:
+          if (*s != "PGP "[pos])
+            ds = s_begin; /* Not a PGP armor.  */
+          else if (pos == 3)
+            ds = s_waitheader;
+          else
+            pos++;
+          break;
+        case s_waitheader:
+          if (*s == '\n')
+            ds = s_waitblank;
+          break;
+        case s_waitblank:
+          if (*s == '\n')
+            ds = s_b64_0; /* blank line found.  */
+          else if (*s == ' ' || *s == '\r' || *s == '\t')
+            ; /* Ignore spaces. */
+          else
+            {
+              /* Armor header line.  Note that we don't care that our
+               * FSM accepts a header prefixed with spaces.  */
+              ds = s_waitheader; /* Wait for next header.  */
+            }
+          break;
+        case s_begin:
+          if (*s == '\n')
+            ds = s_b64_0;
+          break;
+        case s_b64_0:
+        case s_b64_1:
+        case s_b64_2:
+        case s_b64_3:
+          {
+            int c;
+
+            if (*s == '-' && state->title)
+              {
+                /* Not a valid Base64 character: assume end
+                   header.  */
+                ds = s_waitend;
+              }
+            else if (*s == '=')
+              {
+                /* Pad character: stop */
+                if (ds == s_b64_1)
+                  *d++ = val;
+                ds = state->title? s_waitendtitle : s_waitend;
+              }
+            else if (*s == '\n' || *s == ' ' || *s == '\r' || *s == '\t')
+              ; /* Skip white spaces. */
+            else if ( (*s & 0x80)
+                      || (c = asctobin[*(unsigned char *)s]) == 255)
+              {
+                /* Skip invalid encodings.  */
+                state->invalid_encoding = 1;
+              }
+            else if (ds == s_b64_0)
+              {
+                val = c << 2;
+                ds = s_b64_1;
+              }
+            else if (ds == s_b64_1)
+              {
+                val |= (c>>4)&3;
+                *d++ = val;
+                val = (c<<4)&0xf0;
+                ds = s_b64_2;
+              }
+            else if (ds == s_b64_2)
+              {
+                val |= (c>>2)&15;
+                *d++ = val;
+                val = (c<<6)&0xc0;
+                ds = s_b64_3;
+              }
+            else
+              {
+                val |= c&0x3f;
+                *d++ = val;
+                ds = s_b64_0;
+              }
+          }
+          break;
+        case s_waitendtitle:
+          if (*s == '-')
+            ds = s_waitend;
+          break;
+        case s_waitend:
+          if ( *s == '\n')
+            state->stop_seen = 1;
+          break;
+        default:
+          gpgrt_assert (!"invalid state");
+        }
+    }
+
+
+  state->idx = ds;
+  state->radbuf[0] = val;
+  state->quad_count = pos;
+  *r_nbytes = (d -(char*) buffer);
+  return 0;
+}
+
+
+/* Return an error code in case an encoding error has been found
+   during decoding. */
+gpg_err_code_t
+_gpgrt_b64dec_finish (gpgrt_b64state_t state)
+{
+  gpg_error_t err;
+
+  if (!state)
+    return 0;  /* Already released.  */
+
+  if (!state->using_decoder)
+    err = GPG_ERR_CONFLICT;  /* State was allocated for the encoder.  */
+  else if (state->lasterr)
+    err = state->lasterr;
+  else
+    {
+      xfree (state->title);
+      err = state->invalid_encoding? GPG_ERR_BAD_DATA : 0;
+    }
+  xfree (state);
+
+  return err;
+}
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#12 lore raw

PATCH v11 12/14 libgcrypt: Import blake family of hashes

In reply to Vladimir Serbinenko
---
 .../lib/libgcrypt-patches/06_blake.patch      | 80 +++++++++++++++++++
 include/grub/crypto.h                         |  6 ++
 util/import_gcry.py                           | 36 +++++++--
 3 files changed, 115 insertions(+), 7 deletions(-)
 create mode 100644 grub-core/lib/libgcrypt-patches/06_blake.patch
grub-core/lib/libgcrypt-patches/06_blake.patch new file +80 -0
new file mode 100644
index 000000000..19543dc87
@@ -0,0 +1,80 @@
+--- a/grub-core/lib/libgcrypt-grub/cipher/blake2.c
++++ b/grub-core/lib/libgcrypt-grub/cipher/blake2.c
+@@ -784,68 +784,6 @@
+   return blake2s_init(c, key, keylen);
+ }
+ 
+-/* Selftests from "RFC 7693, Appendix E. BLAKE2b and BLAKE2s Self-Test
+- * Module C Source". */
+-static void selftest_seq(byte *out, size_t len, u32 seed)
+-{
+-  size_t i;
+-  u32 t, a, b;
+-
+-  a = 0xDEAD4BAD * seed;
+-  b = 1;
+-
+-  for (i = 0; i < len; i++)
+-    {
+-      t = a + b;
+-      a = b;
+-      b = t;
+-      out[i] = (t >> 24) & 0xFF;
+-    }
+-}
+-
+-
+-
+-
+-gcry_err_code_t _gcry_blake2_init_with_key(void *ctx, unsigned int flags,
+-					   const unsigned char *key,
+-					   size_t keylen, int algo)
+-{
+-  gcry_err_code_t rc;
+-  switch (algo)
+-    {
+-    case GCRY_MD_BLAKE2B_512:
+-      rc = blake2b_init_ctx (ctx, flags, key, keylen, 512);
+-      break;
+-    case GCRY_MD_BLAKE2B_384:
+-      rc = blake2b_init_ctx (ctx, flags, key, keylen, 384);
+-      break;
+-    case GCRY_MD_BLAKE2B_256:
+-      rc = blake2b_init_ctx (ctx, flags, key, keylen, 256);
+-      break;
+-    case GCRY_MD_BLAKE2B_160:
+-      rc = blake2b_init_ctx (ctx, flags, key, keylen, 160);
+-      break;
+-    case GCRY_MD_BLAKE2S_256:
+-      rc = blake2s_init_ctx (ctx, flags, key, keylen, 256);
+-      break;
+-    case GCRY_MD_BLAKE2S_224:
+-      rc = blake2s_init_ctx (ctx, flags, key, keylen, 224);
+-      break;
+-    case GCRY_MD_BLAKE2S_160:
+-      rc = blake2s_init_ctx (ctx, flags, key, keylen, 160);
+-      break;
+-    case GCRY_MD_BLAKE2S_128:
+-      rc = blake2s_init_ctx (ctx, flags, key, keylen, 128);
+-      break;
+-    default:
+-      rc = GPG_ERR_DIGEST_ALGO;
+-      break;
+-    }
+-
+-  return rc;
+-}
+-
+-
+ #define DEFINE_BLAKE2_VARIANT(bs, BS, dbits, oid_branch) \
+   static void blake2##bs##_##dbits##_init(void *ctx, unsigned int flags) \
+   { \
+@@ -879,7 +817,7 @@
+       dbits / 8, blake2##bs##_##dbits##_init, blake2##bs##_write, \
+       blake2##bs##_final, blake2##bs##_read, NULL, \
+       _gcry_blake2##bs##_##dbits##_hash_buffers, \
+-      sizeof (BLAKE2##BS##_CONTEXT), selftests_blake2##bs \
++      sizeof (BLAKE2##BS##_CONTEXT) \
+     , \
+     GRUB_UTIL_MODNAME("gcry_blake2") \
+     .blocksize = GRUB_BLAKE2 ## BS ## _BLOCK_SIZE \
include/grub/crypto.h +6 -0
index 25b118898..4f15a7818 100644
@@ -586,8 +586,14 @@ void grub_gcry_fini_all (void);
 int
 grub_get_random (void *out, grub_size_t len);
 
+#define GRUB_UTIL_MODNAME(x) .modname = x,
+#else
+#define GRUB_UTIL_MODNAME(x)
 #endif
 
+#define GRUB_BLAKE2B_BLOCK_SIZE 128
+#define GRUB_BLAKE2S_BLOCK_SIZE 64
+
 typedef struct _gpgrt_b64state *gpgrt_b64state_t;
 gpgrt_b64state_t gpgrt_b64dec_start (const char *title);
 gpg_error_t      gpgrt_b64dec_proc (gpgrt_b64state_t state,
util/import_gcry.py +29 -7
index a4411ecb9..b6ddde9cd 100644
@@ -120,7 +120,8 @@ mdblocksizes = {"_gcry_digest_spec_crc32" : 64,
                 "_gcry_digest_spec_gost3411_94": 32,
                 "_gcry_digest_spec_gost3411_cp": 32,
                 "_gcry_digest_spec_cshake128": 64,
-                "_gcry_digest_spec_cshake256": 64}
+                "_gcry_digest_spec_cshake256": 64,
+                "_gcry_digest_spec_blake2": "GRUB_BLAKE2 ## BS ## _BLOCK_SIZE"}
 
 cryptolist = codecs.open (os.path.join (cipher_dir_out, "crypto.lst"), "w", "utf-8")
 
@@ -209,6 +210,7 @@ for cipher_file in cipher_files:
         skip = 0
         skip2 = False
         ismd = False
+        ismddefine = False
         mdarg = 0
         ispk = False
         iscipher = False
@@ -245,19 +247,19 @@ for cipher_file in cipher_files:
                 mdarg = mdarg + len (spl) - 1
             if ismd or iscipher or ispk:
                 if not re.search (" *};", line) is None:
+                    escapenl = " \\" if ismddefine else ""
                     if not iscomma:
-                        fw.write ("    ,\n")
-                    fw.write ("#ifdef GRUB_UTIL\n");
-                    fw.write ("    .modname = \"%s\",\n" % modname);
-                    fw.write ("#endif\n");
+                        fw.write (f"    ,{escapenl}\n")
+                    fw.write (f"    GRUB_UTIL_MODNAME(\"%s\"){escapenl}\n" % modname);
                     if ismd:
                         if not (mdname in mdblocksizes):
                             print ("ERROR: Unknown digest blocksize: %s\n"
                                    % mdname)
                             exit (1)
-                        fw.write ("    .blocksize = %s\n"
+                        fw.write (f"    .blocksize = %s{escapenl}\n"
                                   % mdblocksizes [mdname])
                     ismd = False
+                    ismddefine = False
                     mdarg = 0
                     iscipher = False
                     ispk = False
@@ -281,7 +283,7 @@ for cipher_file in cipher_files:
                 hold = False
                 # We're optimising for size and exclude anything needing good
                 # randomness.
-                if re.match ("(_gcry_hash_selftest_check_one|bulk_selftest_setkey|run_selftests|do_tripledes_set_extra_info|selftest|sm4_selftest|_gcry_[a-z0-9_]*_hash_buffers|_gcry_sha1_hash_buffer|tripledes_set2keys|_gcry_rmd160_mixblock|serpent_test|dsa_generate_ext|test_keys|gen_k|sign|gen_x931_parm_xp|generate_x931|generate_key|dsa_generate|dsa_sign|ecc_sign|generate|generate_fips186|_gcry_register_pk_dsa_progress|_gcry_register_pk_ecc_progress|progress|scanval|ec2os|ecc_generate_ext|ecc_generate|ecc_get_param|_gcry_register_pk_dsa_progress|gen_x931_parm_xp|gen_x931_parm_xi|rsa_decrypt|rsa_sign|rsa_generate_ext|rsa_generate|secret|check_exponent|rsa_blind|rsa_unblind|extract_a_from_sexp|curve_free|curve_copy|point_set|_gcry_dsa_gen_rfc6979_k|bits2octets|int2octets|_gcry_md_debug|_gcry_md_selftest|_gcry_md_is_enabled|_gcry_md_is_secure|_gcry_md_init|_gcry_md_info|md_get_algo|md_extract|_gcry_md_get |_gcry_md_get_algo |_gcry_md_extract|_gcry_md_setkey|md_setkey|prepare_macpads|_gcry_md_algo_name|search_oid|spec_from_oid|spec_from_name|spec_from_algo|map_algo|cshake_hash_buffers)", line) is not None:
+                if re.match ("(_gcry_hash_selftest_check_one|bulk_selftest_setkey|run_selftests|do_tripledes_set_extra_info|selftest|sm4_selftest|_gcry_[a-z0-9_]*_hash_buffers|_gcry_sha1_hash_buffer|tripledes_set2keys|_gcry_rmd160_mixblock|serpent_test|dsa_generate_ext|test_keys|gen_k|sign|gen_x931_parm_xp|generate_x931|generate_key|dsa_generate|dsa_sign|ecc_sign|generate|generate_fips186|_gcry_register_pk_dsa_progress|_gcry_register_pk_ecc_progress|progress|scanval|ec2os|ecc_generate_ext|ecc_generate|ecc_get_param|_gcry_register_pk_dsa_progress|gen_x931_parm_xp|gen_x931_parm_xi|rsa_decrypt|rsa_sign|rsa_generate_ext|rsa_generate|secret|check_exponent|rsa_blind|rsa_unblind|extract_a_from_sexp|curve_free|curve_copy|point_set|_gcry_dsa_gen_rfc6979_k|bits2octets|int2octets|_gcry_md_debug|_gcry_md_selftest|_gcry_md_is_enabled|_gcry_md_is_secure|_gcry_md_init|_gcry_md_info|md_get_algo|md_extract|_gcry_md_get |_gcry_md_get_algo |_gcry_md_extract|_gcry_md_setkey|md_setkey|prepare_macpads|_gcry_md_algo_name|search_oid|spec_from_oid|spec_from_name|spec_from_algo|map_algo|cshake_hash_buffers|blake2b_vl_hash|selftest_seq)", line) is not None:
 
                     skip = 1
                     if not re.match ("selftest", line) is None and cipher_file == "idea.c":
@@ -355,6 +357,13 @@ for cipher_file in cipher_files:
                 ispk = True
                 iscryptostart = True
 
+            m = re.match (r"DEFINE_BLAKE2_VARIANT\((.), (.), ([0-9]*)", line)
+            if isc and not m is None:
+                bs = m.groups()[0]
+                bits = m.groups()[2]
+                mdname = f"_gcry_digest_spec_blake2{bs}_{bits}"
+                mdnames.append (mdname)
+
             m = re.match ("(const )?gcry_md_spec_t", line)
             if isc and not m is None:
                 assert (not ismd)
@@ -366,6 +375,19 @@ for cipher_file in cipher_files:
                 mdname = re.match("[a-zA-Z0-9_]*",mdname).group ()
                 mdnames.append (mdname)
                 ismd = True
+                ismddefine = False
+                mdarg = 0
+                iscryptostart = True
+            m = re.match ("  (const )?gcry_md_spec_t _gcry_digest_spec_blake2.*\\\\", line)
+            if isc and not m is None:
+                assert (not ismd)
+                assert (not ispk)
+                assert (not iscipher)
+                assert (not iscryptostart)
+                line = removeprefix(line, "  const ")
+                ismd = True
+                ismddefine = True
+                mdname = "_gcry_digest_spec_blake2"
                 mdarg = 0
                 iscryptostart = True
             m = re.match (r"static const char \*selftest.*;$", line)
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#10 lore raw

PATCH v11 10/14 Enable udivdi3 and umoddi3 for mips

In reply to Vladimir Serbinenko

Some mips compilers insert 64-bit division into the code compiled from libgcrypt source and possibly others. Rether than fighting it, simply provide the function in question.

---
 grub-core/kern/compiler-rt.c | 32 ++++++++++++++++++--------------
 include/grub/compiler-rt.h   |  4 ++++
 2 files changed, 22 insertions(+), 14 deletions(-)
grub-core/kern/compiler-rt.c +18 -14
index eda689a0c..c83cf3d2d 100644
@@ -82,20 +82,6 @@ __modsi3 (grub_int32_t a, grub_int32_t b)
   return ret;
 }
 
-grub_uint64_t
-__udivdi3 (grub_uint64_t a, grub_uint64_t b)
-{
-  return grub_divmod64 (a, b, 0);
-}
-
-grub_uint64_t
-__umoddi3 (grub_uint64_t a, grub_uint64_t b)
-{
-  grub_uint64_t ret;
-  grub_divmod64 (a, b, &ret);
-  return ret;
-}
-
 grub_int64_t
 __divdi3 (grub_int64_t a, grub_int64_t b)
 {
@@ -112,6 +98,24 @@ __moddi3 (grub_int64_t a, grub_int64_t b)
 
 #endif
 
+#if GRUB_DIVISION_IN_SOFTWARE || defined(__mips__)
+
+grub_uint64_t
+__udivdi3 (grub_uint64_t a, grub_uint64_t b)
+{
+  return grub_divmod64 (a, b, 0);
+}
+
+grub_uint64_t
+__umoddi3 (grub_uint64_t a, grub_uint64_t b)
+{
+  grub_uint64_t ret;
+  grub_divmod64 (a, b, &ret);
+  return ret;
+}
+
+#endif
+
 #endif
 
 #ifdef NEED_CTZDI2
include/grub/compiler-rt.h +4 -0
index 43fd8f4d7..979c3db16 100644
@@ -45,6 +45,10 @@ EXPORT_FUNC (__divdi3) (grub_int64_t a, grub_int64_t b);
 grub_int64_t
 EXPORT_FUNC (__moddi3) (grub_int64_t a, grub_int64_t b);
 
+#endif
+
+#if (defined(GRUB_DIVISION_IN_SOFTWARE) && GRUB_DIVISION_IN_SOFTWARE) || defined(__mips__)
+
 grub_uint64_t
 EXPORT_FUNC (__udivdi3) (grub_uint64_t a, grub_uint64_t b);
 
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH v11 1/14 Import libgcrypt 1.11

In reply to Vladimir Serbinenko

We currently use an old version of libcrypt which results in us having fewer ciphers and missing on many other improvements.

---
 grub-core/lib/libgcrypt/AUTHORS               |   274 +
 grub-core/lib/libgcrypt/COPYING               |   339 +
 grub-core/lib/libgcrypt/COPYING.LIB           |   502 +
 grub-core/lib/libgcrypt/LICENSES              |   319 +
 grub-core/lib/libgcrypt/README                |   278 +
 grub-core/lib/libgcrypt/README.GIT            |    49 +
 grub-core/lib/libgcrypt/THANKS                |   168 +
 grub-core/lib/libgcrypt/VERSION               |     1 +
 grub-core/lib/libgcrypt/cipher/ChangeLog      |  3990 ---
 grub-core/lib/libgcrypt/cipher/ChangeLog-2011 |    40 +-
 grub-core/lib/libgcrypt/cipher/Makefile.am    |   330 +-
 grub-core/lib/libgcrypt/cipher/Manifest       |    73 -
 grub-core/lib/libgcrypt/cipher/ac.c           |  3301 --
 .../lib/libgcrypt/cipher/arcfour-amd64.S      |   108 +
 grub-core/lib/libgcrypt/cipher/arcfour.c      |    93 +-
 .../libgcrypt/cipher/aria-aesni-avx-amd64.S   |  1440 +
 .../libgcrypt/cipher/aria-aesni-avx2-amd64.S  |  1830 ++
 .../libgcrypt/cipher/aria-gfni-avx512-amd64.S |  1010 +
 grub-core/lib/libgcrypt/cipher/aria.c         |  1768 ++
 .../lib/libgcrypt/cipher/asm-common-aarch64.h |   132 +
 .../lib/libgcrypt/cipher/asm-common-amd64.h   |   213 +
 .../lib/libgcrypt/cipher/asm-common-i386.h    |   161 +
 .../lib/libgcrypt/cipher/asm-common-s390x.h   |    90 +
 .../lib/libgcrypt/cipher/asm-inline-s390x.h   |   205 +
 .../libgcrypt/cipher/asm-poly1305-aarch64.h   |   245 +
 .../lib/libgcrypt/cipher/asm-poly1305-amd64.h |   171 +
 .../lib/libgcrypt/cipher/asm-poly1305-s390x.h |   140 +
 grub-core/lib/libgcrypt/cipher/bithelp.h      |   111 +-
 grub-core/lib/libgcrypt/cipher/blake2.c       |  1086 +
 .../lib/libgcrypt/cipher/blake2b-amd64-avx2.S |   301 +
 .../libgcrypt/cipher/blake2b-amd64-avx512.S   |   429 +
 .../lib/libgcrypt/cipher/blake2s-amd64-avx.S  |   281 +
 .../libgcrypt/cipher/blake2s-amd64-avx512.S   |   397 +
 .../lib/libgcrypt/cipher/blowfish-amd64.S     |   601 +
 grub-core/lib/libgcrypt/cipher/blowfish-arm.S |   743 +
 grub-core/lib/libgcrypt/cipher/blowfish.c     |   802 +-
 grub-core/lib/libgcrypt/cipher/bufhelp.h      |   458 +-
 grub-core/lib/libgcrypt/cipher/bulkhelp.h     |   493 +
 .../libgcrypt/cipher/camellia-aarch64-ce.c    |    42 +
 .../lib/libgcrypt/cipher/camellia-aarch64.S   |   585 +
 .../cipher/camellia-aesni-avx-amd64.S         |  2802 ++
 .../cipher/camellia-aesni-avx2-amd64.S        |    34 +
 .../cipher/camellia-aesni-avx2-amd64.h        |  2327 ++
 grub-core/lib/libgcrypt/cipher/camellia-arm.S |   626 +
 .../cipher/camellia-gfni-avx2-amd64.S         |    34 +
 .../cipher/camellia-gfni-avx512-amd64.S       |  1634 +
 .../lib/libgcrypt/cipher/camellia-glue.c      |  1670 +-
 .../lib/libgcrypt/cipher/camellia-ppc8le.c    |    47 +
 .../lib/libgcrypt/cipher/camellia-ppc9le.c    |    47 +
 .../lib/libgcrypt/cipher/camellia-simd128.h   |  2235 ++
 .../cipher/camellia-vaes-avx2-amd64.S         |    35 +
 grub-core/lib/libgcrypt/cipher/camellia.c     |   172 +-
 grub-core/lib/libgcrypt/cipher/camellia.h     |    34 +-
 grub-core/lib/libgcrypt/cipher/cast5-amd64.S  |   663 +
 grub-core/lib/libgcrypt/cipher/cast5-arm.S    |   728 +
 grub-core/lib/libgcrypt/cipher/cast5.c        |   775 +-
 .../lib/libgcrypt/cipher/chacha20-aarch64.S   |   650 +
 .../libgcrypt/cipher/chacha20-amd64-avx2.S    |   604 +
 .../libgcrypt/cipher/chacha20-amd64-avx512.S  |   736 +
 .../libgcrypt/cipher/chacha20-amd64-ssse3.S   |  1015 +
 .../libgcrypt/cipher/chacha20-armv7-neon.S    |   393 +
 .../lib/libgcrypt/cipher/chacha20-p10le-8x.s  |   864 +
 grub-core/lib/libgcrypt/cipher/chacha20-ppc.c |   750 +
 .../lib/libgcrypt/cipher/chacha20-s390x.S     |  1566 +
 grub-core/lib/libgcrypt/cipher/chacha20.c     |  1450 +
 .../lib/libgcrypt/cipher/cipher-aeswrap.c     |   380 +
 grub-core/lib/libgcrypt/cipher/cipher-cbc.c   |   292 +
 grub-core/lib/libgcrypt/cipher/cipher-ccm.c   |   419 +
 grub-core/lib/libgcrypt/cipher/cipher-cfb.c   |   317 +
 grub-core/lib/libgcrypt/cipher/cipher-cmac.c  |   292 +
 grub-core/lib/libgcrypt/cipher/cipher-ctr.c   |   131 +
 grub-core/lib/libgcrypt/cipher/cipher-eax.c   |   293 +
 .../libgcrypt/cipher/cipher-gcm-armv7-neon.S  |   341 +
 .../cipher/cipher-gcm-armv8-aarch32-ce.S      |   588 +
 .../cipher/cipher-gcm-armv8-aarch64-ce.S      |   633 +
 .../cipher/cipher-gcm-intel-pclmul.c          |  2025 ++
 .../lib/libgcrypt/cipher/cipher-gcm-ppc.c     |   548 +
 .../lib/libgcrypt/cipher/cipher-gcm-siv.c     |   664 +
 grub-core/lib/libgcrypt/cipher/cipher-gcm.c   |  1260 +
 .../lib/libgcrypt/cipher/cipher-internal.h    |   975 +
 grub-core/lib/libgcrypt/cipher/cipher-ocb.c   |   763 +
 grub-core/lib/libgcrypt/cipher/cipher-ofb.c   |   108 +
 .../lib/libgcrypt/cipher/cipher-poly1305.c    |   383 +
 grub-core/lib/libgcrypt/cipher/cipher-siv.c   |   375 +
 grub-core/lib/libgcrypt/cipher/cipher-xts.c   |   189 +
 grub-core/lib/libgcrypt/cipher/cipher.c       |  2702 +-
 .../libgcrypt/cipher/crc-armv8-aarch64-ce.S   |   500 +
 grub-core/lib/libgcrypt/cipher/crc-armv8-ce.c |   229 +
 .../lib/libgcrypt/cipher/crc-intel-pclmul.c   |   939 +
 grub-core/lib/libgcrypt/cipher/crc-ppc.c      |   656 +
 grub-core/lib/libgcrypt/cipher/crc.c          |   192 +-
 grub-core/lib/libgcrypt/cipher/des-amd64.S    |  1116 +
 grub-core/lib/libgcrypt/cipher/des.c          |   301 +-
 grub-core/lib/libgcrypt/cipher/dsa-common.c   |   473 +
 grub-core/lib/libgcrypt/cipher/dsa.c          |  1207 +-
 grub-core/lib/libgcrypt/cipher/ecc-common.h   |   143 +
 grub-core/lib/libgcrypt/cipher/ecc-curves.c   |  1587 +
 grub-core/lib/libgcrypt/cipher/ecc-ecdh.c     |   357 +
 grub-core/lib/libgcrypt/cipher/ecc-ecdsa.c    |   305 +
 grub-core/lib/libgcrypt/cipher/ecc-eddsa.c    |  1079 +
 grub-core/lib/libgcrypt/cipher/ecc-gost.c     |   218 +
 grub-core/lib/libgcrypt/cipher/ecc-misc.c     |   469 +
 grub-core/lib/libgcrypt/cipher/ecc-sm2.c      |   569 +
 grub-core/lib/libgcrypt/cipher/ecc.c          |  3242 +-
 grub-core/lib/libgcrypt/cipher/elgamal.c      |   829 +-
 grub-core/lib/libgcrypt/cipher/gost-s-box.c   |   266 +
 grub-core/lib/libgcrypt/cipher/gost-sb.h      |  2128 ++
 grub-core/lib/libgcrypt/cipher/gost.h         |    34 +
 grub-core/lib/libgcrypt/cipher/gost28147.c    |   553 +
 grub-core/lib/libgcrypt/cipher/gostr3411-94.c |   383 +
 grub-core/lib/libgcrypt/cipher/hash-common.c  |   110 +-
 grub-core/lib/libgcrypt/cipher/hash-common.h  |    35 +-
 grub-core/lib/libgcrypt/cipher/hmac-tests.c   |   732 -
 grub-core/lib/libgcrypt/cipher/idea.c         |    24 +-
 grub-core/lib/libgcrypt/cipher/kdf-internal.h |    39 +
 grub-core/lib/libgcrypt/cipher/kdf.c          |  2239 +-
 .../libgcrypt/cipher/keccak-amd64-avx512.S    |   587 +
 .../lib/libgcrypt/cipher/keccak-armv7-neon.S  |   945 +
 grub-core/lib/libgcrypt/cipher/keccak.c       |  1904 ++
 .../lib/libgcrypt/cipher/keccak_permute_32.h  |   536 +
 .../lib/libgcrypt/cipher/keccak_permute_64.h  |   385 +
 grub-core/lib/libgcrypt/cipher/kem-ecc.c      |   332 +
 grub-core/lib/libgcrypt/cipher/kem-ecc.h      |    40 +
 grub-core/lib/libgcrypt/cipher/kem.c          |   435 +
 grub-core/lib/libgcrypt/cipher/kyber-common.c |   766 +
 grub-core/lib/libgcrypt/cipher/kyber-kdep.c   |   825 +
 grub-core/lib/libgcrypt/cipher/kyber.c        |   530 +
 grub-core/lib/libgcrypt/cipher/kyber.h        |   130 +
 grub-core/lib/libgcrypt/cipher/mac-cmac.c     |   532 +
 grub-core/lib/libgcrypt/cipher/mac-gmac.c     |   203 +
 grub-core/lib/libgcrypt/cipher/mac-hmac.c     |  1471 +
 grub-core/lib/libgcrypt/cipher/mac-internal.h |   290 +
 grub-core/lib/libgcrypt/cipher/mac-poly1305.c |   382 +
 grub-core/lib/libgcrypt/cipher/mac.c          |   834 +
 .../lib/libgcrypt/cipher/mceliece6688128f.c   |  3673 +++
 .../lib/libgcrypt/cipher/mceliece6688128f.h   |    63 +
 grub-core/lib/libgcrypt/cipher/md.c           |  1582 +-
 grub-core/lib/libgcrypt/cipher/md4.c          |   171 +-
 grub-core/lib/libgcrypt/cipher/md5.c          |   177 +-
 .../libgcrypt/cipher/poly1305-amd64-avx512.S  |  1626 +
 .../lib/libgcrypt/cipher/poly1305-internal.h  |    92 +
 .../lib/libgcrypt/cipher/poly1305-p10le.s     |   841 +
 .../lib/libgcrypt/cipher/poly1305-s390x.S     |    87 +
 grub-core/lib/libgcrypt/cipher/poly1305.c     |   846 +
 grub-core/lib/libgcrypt/cipher/primegen.c     |   563 +-
 .../lib/libgcrypt/cipher/pubkey-internal.h    |   107 +
 grub-core/lib/libgcrypt/cipher/pubkey-util.c  |  1363 +
 grub-core/lib/libgcrypt/cipher/pubkey.c       |  4329 +--
 grub-core/lib/libgcrypt/cipher/rfc2268.c      |    57 +-
 .../lib/libgcrypt/cipher/rijndael-aarch64.S   |   512 +
 .../lib/libgcrypt/cipher/rijndael-aesni.c     |  5033 +++
 .../lib/libgcrypt/cipher/rijndael-amd64.S     |   477 +
 grub-core/lib/libgcrypt/cipher/rijndael-arm.S |   581 +
 .../cipher/rijndael-armv8-aarch32-ce.S        |  2134 ++
 .../cipher/rijndael-armv8-aarch64-ce.S        |  2038 ++
 .../lib/libgcrypt/cipher/rijndael-armv8-ce.c  |   396 +
 .../lib/libgcrypt/cipher/rijndael-gcm-p10le.s |  1401 +
 .../lib/libgcrypt/cipher/rijndael-internal.h  |   216 +
 .../lib/libgcrypt/cipher/rijndael-p10le.c     |   119 +
 .../lib/libgcrypt/cipher/rijndael-padlock.c   |   109 +
 .../libgcrypt/cipher/rijndael-ppc-common.h    |   328 +
 .../libgcrypt/cipher/rijndael-ppc-functions.h |  2544 ++
 grub-core/lib/libgcrypt/cipher/rijndael-ppc.c |   230 +
 .../lib/libgcrypt/cipher/rijndael-ppc9le.c    |   119 +
 .../lib/libgcrypt/cipher/rijndael-s390x.c     |  1166 +
 .../cipher/rijndael-ssse3-amd64-asm.S         |   879 +
 .../libgcrypt/cipher/rijndael-ssse3-amd64.c   |   742 +
 .../lib/libgcrypt/cipher/rijndael-tables.h    |  1846 +-
 .../cipher/rijndael-vaes-avx2-amd64.S         |  3688 +++
 .../cipher/rijndael-vaes-avx2-i386.S          |  2804 ++
 .../lib/libgcrypt/cipher/rijndael-vaes-i386.c |   231 +
 .../lib/libgcrypt/cipher/rijndael-vaes.c      |   240 +
 grub-core/lib/libgcrypt/cipher/rijndael.c     |  2643 +-
 grub-core/lib/libgcrypt/cipher/rmd160.c       |   592 +-
 grub-core/lib/libgcrypt/cipher/rsa-common.c   |  1151 +
 grub-core/lib/libgcrypt/cipher/rsa.c          |  1736 +-
 .../lib/libgcrypt/cipher/salsa20-amd64.S      |   940 +
 .../lib/libgcrypt/cipher/salsa20-armv7-neon.S |   899 +
 grub-core/lib/libgcrypt/cipher/salsa20.c      |   600 +
 grub-core/lib/libgcrypt/cipher/scrypt.c       |   322 +
 grub-core/lib/libgcrypt/cipher/seed.c         |    32 +-
 .../lib/libgcrypt/cipher/serpent-armv7-neon.S |  1180 +
 .../lib/libgcrypt/cipher/serpent-avx2-amd64.S |  1214 +
 .../lib/libgcrypt/cipher/serpent-avx512-x86.c |   994 +
 .../lib/libgcrypt/cipher/serpent-sse2-amd64.S |  1276 +
 grub-core/lib/libgcrypt/cipher/serpent.c      |  2017 +-
 .../lib/libgcrypt/cipher/sha1-armv7-neon.S    |   526 +
 .../libgcrypt/cipher/sha1-armv8-aarch32-ce.S  |   220 +
 .../libgcrypt/cipher/sha1-armv8-aarch64-ce.S  |   204 +
 .../lib/libgcrypt/cipher/sha1-avx-amd64.S     |   433 +
 .../libgcrypt/cipher/sha1-avx-bmi2-amd64.S    |   446 +
 .../libgcrypt/cipher/sha1-avx2-bmi2-amd64.S   |   578 +
 .../lib/libgcrypt/cipher/sha1-intel-shaext.c  |   292 +
 .../lib/libgcrypt/cipher/sha1-ssse3-amd64.S   |   442 +
 grub-core/lib/libgcrypt/cipher/sha1.c         |   571 +-
 grub-core/lib/libgcrypt/cipher/sha1.h         |    47 +
 .../cipher/sha256-armv8-aarch32-ce.S          |   231 +
 .../cipher/sha256-armv8-aarch64-ce.S          |   218 +
 .../lib/libgcrypt/cipher/sha256-avx-amd64.S   |   511 +
 .../libgcrypt/cipher/sha256-avx2-bmi2-amd64.S |   533 +
 .../libgcrypt/cipher/sha256-intel-shaext.c    |   363 +
 grub-core/lib/libgcrypt/cipher/sha256-ppc.c   |   610 +
 .../lib/libgcrypt/cipher/sha256-ssse3-amd64.S |   533 +
 grub-core/lib/libgcrypt/cipher/sha256.c       |   775 +-
 grub-core/lib/libgcrypt/cipher/sha512-arm.S   |   464 +
 .../lib/libgcrypt/cipher/sha512-armv7-neon.S  |   452 +
 .../cipher/sha512-armv8-aarch64-ce.S          |   383 +
 .../lib/libgcrypt/cipher/sha512-avx-amd64.S   |   466 +
 .../libgcrypt/cipher/sha512-avx2-bmi2-amd64.S |   507 +
 .../libgcrypt/cipher/sha512-avx512-amd64.S    |   465 +
 grub-core/lib/libgcrypt/cipher/sha512-ppc.c   |   725 +
 .../lib/libgcrypt/cipher/sha512-ssse3-amd64.S |   472 +
 .../lib/libgcrypt/cipher/sha512-ssse3-i386.c  |   404 +
 grub-core/lib/libgcrypt/cipher/sha512.c       |  1310 +-
 grub-core/lib/libgcrypt/cipher/sm3-aarch64.S  |   660 +
 .../libgcrypt/cipher/sm3-armv8-aarch64-ce.S   |   221 +
 .../lib/libgcrypt/cipher/sm3-avx-bmi2-amd64.S |   555 +
 grub-core/lib/libgcrypt/cipher/sm3.c          |   565 +
 grub-core/lib/libgcrypt/cipher/sm4-aarch64.S  |   644 +
 .../libgcrypt/cipher/sm4-aesni-avx-amd64.S    |  1058 +
 .../libgcrypt/cipher/sm4-aesni-avx2-amd64.S   |   973 +
 .../libgcrypt/cipher/sm4-armv8-aarch64-ce.S   |   731 +
 .../cipher/sm4-armv9-aarch64-sve-ce.S         |   967 +
 .../libgcrypt/cipher/sm4-gfni-avx2-amd64.S    |  1260 +
 .../libgcrypt/cipher/sm4-gfni-avx512-amd64.S  |  1861 ++
 grub-core/lib/libgcrypt/cipher/sm4-ppc.c      |   342 +
 grub-core/lib/libgcrypt/cipher/sm4.c          |  2070 ++
 grub-core/lib/libgcrypt/cipher/sntrup761.c    |  1062 +
 grub-core/lib/libgcrypt/cipher/sntrup761.h    |    73 +
 grub-core/lib/libgcrypt/cipher/stribog.c      |  1362 +
 .../lib/libgcrypt/cipher/test-getrusage.c     |   105 -
 grub-core/lib/libgcrypt/cipher/tiger.c        |   311 +-
 .../lib/libgcrypt/cipher/twofish-aarch64.S    |   322 +
 .../lib/libgcrypt/cipher/twofish-amd64.S      |  1258 +
 grub-core/lib/libgcrypt/cipher/twofish-arm.S  |   363 +
 .../lib/libgcrypt/cipher/twofish-avx2-amd64.S |  1136 +
 grub-core/lib/libgcrypt/cipher/twofish.c      |   954 +-
 .../libgcrypt/cipher/whirlpool-sse2-amd64.S   |   348 +
 grub-core/lib/libgcrypt/cipher/whirlpool.c    |   334 +-
 grub-core/lib/libgcrypt/compat/Makefile.am    |    48 +
 grub-core/lib/libgcrypt/compat/clock.c        |    36 +
 grub-core/lib/libgcrypt/compat/compat.c       |    40 +
 grub-core/lib/libgcrypt/compat/getpid.c       |    29 +
 grub-core/lib/libgcrypt/compat/libcompat.h    |    37 +
 grub-core/lib/libgcrypt/config.h.in           |   873 +
 grub-core/lib/libgcrypt/configure             | 25763 ++++++++++++++++
 grub-core/lib/libgcrypt/configure.ac          |  3883 +++
 grub-core/lib/libgcrypt/mkinstalldirs         |   161 +
 grub-core/lib/libgcrypt/mpi/ChangeLog-2011    |    17 +-
 grub-core/lib/libgcrypt/mpi/Makefile.am       |    16 +-
 grub-core/lib/libgcrypt/mpi/Manifest          |    41 -
 .../mpi/{pentium4/sse2 => aarch64}/distfiles  |     1 +
 .../lib/libgcrypt/mpi/aarch64/mpi-asm-defs.h  |     4 +
 .../lib/libgcrypt/mpi/aarch64/mpih-add1.S     |    75 +
 .../lib/libgcrypt/mpi/aarch64/mpih-mul1.S     |   100 +
 .../lib/libgcrypt/mpi/aarch64/mpih-mul2.S     |   112 +
 .../lib/libgcrypt/mpi/aarch64/mpih-mul3.S     |   125 +
 .../lib/libgcrypt/mpi/aarch64/mpih-sub1.S     |    75 +
 grub-core/lib/libgcrypt/mpi/alpha/README      |     4 +-
 grub-core/lib/libgcrypt/mpi/alpha/mpih-add1.S |     4 +-
 .../lib/libgcrypt/mpi/alpha/mpih-lshift.S     |     4 +-
 grub-core/lib/libgcrypt/mpi/alpha/mpih-mul1.S |     4 +-
 grub-core/lib/libgcrypt/mpi/alpha/mpih-mul2.S |     4 +-
 grub-core/lib/libgcrypt/mpi/alpha/mpih-mul3.S |     4 +-
 .../lib/libgcrypt/mpi/alpha/mpih-rshift.S     |     4 +-
 grub-core/lib/libgcrypt/mpi/alpha/mpih-sub1.S |     4 +-
 .../lib/libgcrypt/mpi/alpha/udiv-qrnnd.S      |     4 +-
 grub-core/lib/libgcrypt/mpi/amd64/distfiles   |     1 +
 grub-core/lib/libgcrypt/mpi/amd64/func_abi.h  |    34 +
 .../lib/libgcrypt/mpi/amd64/mpi-asm-defs.h    |     2 +-
 grub-core/lib/libgcrypt/mpi/amd64/mpih-add1.S |    92 +-
 .../lib/libgcrypt/mpi/amd64/mpih-lshift.S     |    54 +-
 grub-core/lib/libgcrypt/mpi/amd64/mpih-mul1.S |    11 +-
 grub-core/lib/libgcrypt/mpi/amd64/mpih-mul2.S |    53 +-
 grub-core/lib/libgcrypt/mpi/amd64/mpih-mul3.S |    11 +-
 .../lib/libgcrypt/mpi/amd64/mpih-rshift.S     |    56 +-
 grub-core/lib/libgcrypt/mpi/amd64/mpih-sub1.S |    90 +-
 .../lib/libgcrypt/mpi/{i586 => arm}/distfiles |     6 +-
 .../lib/libgcrypt/mpi/arm/mpi-asm-defs.h      |     4 +
 grub-core/lib/libgcrypt/mpi/arm/mpih-add1.S   |    76 +
 grub-core/lib/libgcrypt/mpi/arm/mpih-mul1.S   |    80 +
 grub-core/lib/libgcrypt/mpi/arm/mpih-mul2.S   |    94 +
 grub-core/lib/libgcrypt/mpi/arm/mpih-mul3.S   |   100 +
 grub-core/lib/libgcrypt/mpi/arm/mpih-sub1.S   |    77 +
 .../lib/libgcrypt/mpi/asm-common-aarch64.h    |    26 +
 .../lib/libgcrypt/mpi/asm-common-amd64.h      |    26 +
 grub-core/lib/libgcrypt/mpi/asm-common-i386.h |    26 +
 grub-core/lib/libgcrypt/mpi/config.links      |   178 +-
 .../{cipher/rmd.h => mpi/ec-ed25519.c}        |    35 +-
 grub-core/lib/libgcrypt/mpi/ec-hw-s390x.c     |   412 +
 grub-core/lib/libgcrypt/mpi/ec-inline.h       |  1236 +
 grub-core/lib/libgcrypt/mpi/ec-internal.h     |    49 +
 grub-core/lib/libgcrypt/mpi/ec-nist.c         |   826 +
 grub-core/lib/libgcrypt/mpi/ec.c              |  2053 +-
 grub-core/lib/libgcrypt/mpi/generic/Manifest  |    29 -
 grub-core/lib/libgcrypt/mpi/generic/distfiles |     1 -
 .../lib/libgcrypt/mpi/generic/mpi-asm-defs.h  |    16 +-
 .../lib/libgcrypt/mpi/generic/mpih-add1.c     |    10 +-
 .../lib/libgcrypt/mpi/generic/mpih-lshift.c   |     6 +-
 .../lib/libgcrypt/mpi/generic/mpih-mul1.c     |     8 +-
 .../lib/libgcrypt/mpi/generic/mpih-mul2.c     |    10 +-
 .../lib/libgcrypt/mpi/generic/mpih-mul3.c     |     8 +-
 .../lib/libgcrypt/mpi/generic/mpih-rshift.c   |     4 +-
 .../lib/libgcrypt/mpi/generic/mpih-sub1.c     |     8 +-
 .../lib/libgcrypt/mpi/generic/udiv-w-sdiv.c   |     4 +-
 grub-core/lib/libgcrypt/mpi/hppa/mpih-add1.S  |     4 +-
 .../lib/libgcrypt/mpi/hppa/mpih-lshift.S      |     4 +-
 .../lib/libgcrypt/mpi/hppa/mpih-rshift.S      |     4 +-
 grub-core/lib/libgcrypt/mpi/hppa/mpih-sub1.S  |     4 +-
 grub-core/lib/libgcrypt/mpi/hppa/udiv-qrnnd.S |     4 +-
 grub-core/lib/libgcrypt/mpi/i386/Manifest     |    28 -
 grub-core/lib/libgcrypt/mpi/i386/distfiles    |     1 -
 grub-core/lib/libgcrypt/mpi/i386/mpih-add1.S  |    51 +-
 .../lib/libgcrypt/mpi/i386/mpih-lshift.S      |    16 +-
 grub-core/lib/libgcrypt/mpi/i386/mpih-mul1.S  |    16 +-
 grub-core/lib/libgcrypt/mpi/i386/mpih-mul2.S  |    16 +-
 grub-core/lib/libgcrypt/mpi/i386/mpih-mul3.S  |    16 +-
 .../lib/libgcrypt/mpi/i386/mpih-rshift.S      |    18 +-
 grub-core/lib/libgcrypt/mpi/i386/mpih-sub1.S  |    51 +-
 grub-core/lib/libgcrypt/mpi/i386/syntax.h     |    16 +-
 grub-core/lib/libgcrypt/mpi/i586/Manifest     |    27 -
 grub-core/lib/libgcrypt/mpi/i586/README       |    26 -
 grub-core/lib/libgcrypt/mpi/i586/mpih-add1.S  |   135 -
 .../lib/libgcrypt/mpi/i586/mpih-lshift.S      |   229 -
 grub-core/lib/libgcrypt/mpi/i586/mpih-mul1.S  |    89 -
 grub-core/lib/libgcrypt/mpi/i586/mpih-mul2.S  |    93 -
 grub-core/lib/libgcrypt/mpi/i586/mpih-mul3.S  |    93 -
 .../lib/libgcrypt/mpi/i586/mpih-rshift.S      |   228 -
 grub-core/lib/libgcrypt/mpi/i586/mpih-sub1.S  |   142 -
 grub-core/lib/libgcrypt/mpi/longlong.h        |   967 +-
 grub-core/lib/libgcrypt/mpi/m68k/Manifest     |    25 -
 grub-core/lib/libgcrypt/mpi/m68k/distfiles    |     1 -
 .../lib/libgcrypt/mpi/m68k/mc68020/Manifest   |    23 -
 .../lib/libgcrypt/mpi/m68k/mc68020/distfiles  |     1 -
 .../libgcrypt/mpi/m68k/mc68020/mpih-mul1.S    |     4 +-
 .../libgcrypt/mpi/m68k/mc68020/mpih-mul2.S    |     4 +-
 .../libgcrypt/mpi/m68k/mc68020/mpih-mul3.S    |     4 +-
 grub-core/lib/libgcrypt/mpi/m68k/mpih-add1.S  |     4 +-
 .../lib/libgcrypt/mpi/m68k/mpih-lshift.S      |     4 +-
 .../lib/libgcrypt/mpi/m68k/mpih-rshift.S      |     4 +-
 grub-core/lib/libgcrypt/mpi/m68k/mpih-sub1.S  |     4 +-
 grub-core/lib/libgcrypt/mpi/m68k/syntax.h     |     6 +-
 grub-core/lib/libgcrypt/mpi/mips3/Manifest    |    28 -
 grub-core/lib/libgcrypt/mpi/mips3/README      |     2 +-
 grub-core/lib/libgcrypt/mpi/mips3/distfiles   |     1 -
 grub-core/lib/libgcrypt/mpi/mips3/mpih-add1.S |     4 +-
 .../lib/libgcrypt/mpi/mips3/mpih-lshift.S     |     4 +-
 grub-core/lib/libgcrypt/mpi/mips3/mpih-mul1.S |     4 +-
 grub-core/lib/libgcrypt/mpi/mips3/mpih-mul2.S |     4 +-
 grub-core/lib/libgcrypt/mpi/mips3/mpih-mul3.S |     4 +-
 .../lib/libgcrypt/mpi/mips3/mpih-rshift.S     |     4 +-
 grub-core/lib/libgcrypt/mpi/mips3/mpih-sub1.S |     4 +-
 grub-core/lib/libgcrypt/mpi/mpi-add.c         |    64 +-
 grub-core/lib/libgcrypt/mpi/mpi-bit.c         |   257 +-
 grub-core/lib/libgcrypt/mpi/mpi-cmp.c         |    45 +-
 grub-core/lib/libgcrypt/mpi/mpi-div.c         |    23 +-
 grub-core/lib/libgcrypt/mpi/mpi-gcd.c         |    15 +-
 grub-core/lib/libgcrypt/mpi/mpi-inline.c      |     4 +-
 grub-core/lib/libgcrypt/mpi/mpi-inline.h      |     4 +-
 grub-core/lib/libgcrypt/mpi/mpi-internal.h    |    60 +-
 grub-core/lib/libgcrypt/mpi/mpi-inv.c         |   312 +-
 grub-core/lib/libgcrypt/mpi/mpi-mod.c         |    54 +-
 grub-core/lib/libgcrypt/mpi/mpi-mpow.c        |    12 +-
 grub-core/lib/libgcrypt/mpi/mpi-mul.c         |    27 +-
 grub-core/lib/libgcrypt/mpi/mpi-pow.c         |   458 +-
 grub-core/lib/libgcrypt/mpi/mpi-scan.c        |   136 +-
 grub-core/lib/libgcrypt/mpi/mpicoder.c        |   763 +-
 grub-core/lib/libgcrypt/mpi/mpih-const-time.c |   241 +
 grub-core/lib/libgcrypt/mpi/mpih-div.c        |    14 +-
 grub-core/lib/libgcrypt/mpi/mpih-mul.c        |    27 +-
 grub-core/lib/libgcrypt/mpi/mpiutil.c         |   488 +-
 grub-core/lib/libgcrypt/mpi/pa7100/Manifest   |    22 -
 grub-core/lib/libgcrypt/mpi/pa7100/distfiles  |     1 -
 .../lib/libgcrypt/mpi/pa7100/mpih-lshift.S    |     4 +-
 .../lib/libgcrypt/mpi/pa7100/mpih-rshift.S    |     4 +-
 grub-core/lib/libgcrypt/mpi/pentium4/README   |   115 -
 .../lib/libgcrypt/mpi/pentium4/distfiles      |     3 -
 .../lib/libgcrypt/mpi/pentium4/mmx/distfiles  |     2 -
 .../libgcrypt/mpi/pentium4/mmx/mpih-lshift.S  |   457 -
 .../libgcrypt/mpi/pentium4/mmx/mpih-rshift.S  |   453 -
 .../libgcrypt/mpi/pentium4/sse2/mpih-add1.S   |    91 -
 .../libgcrypt/mpi/pentium4/sse2/mpih-mul1.S   |    96 -
 .../libgcrypt/mpi/pentium4/sse2/mpih-mul2.S   |   136 -
 .../libgcrypt/mpi/pentium4/sse2/mpih-mul3.S   |   127 -
 .../libgcrypt/mpi/pentium4/sse2/mpih-sub1.S   |   112 -
 grub-core/lib/libgcrypt/mpi/power/Manifest    |    27 -
 grub-core/lib/libgcrypt/mpi/power/distfiles   |     1 -
 grub-core/lib/libgcrypt/mpi/power/mpih-add1.S |     4 +-
 .../lib/libgcrypt/mpi/power/mpih-lshift.S     |     4 +-
 grub-core/lib/libgcrypt/mpi/power/mpih-mul1.S |     4 +-
 grub-core/lib/libgcrypt/mpi/power/mpih-mul2.S |     4 +-
 grub-core/lib/libgcrypt/mpi/power/mpih-mul3.S |     4 +-
 .../lib/libgcrypt/mpi/power/mpih-rshift.S     |     4 +-
 grub-core/lib/libgcrypt/mpi/power/mpih-sub1.S |     4 +-
 .../lib/libgcrypt/mpi/powerpc32/Manifest      |    28 -
 .../lib/libgcrypt/mpi/powerpc32/distfiles     |     1 -
 .../lib/libgcrypt/mpi/powerpc32/mpih-add1.S   |     9 +-
 .../lib/libgcrypt/mpi/powerpc32/mpih-lshift.S |     8 +-
 .../lib/libgcrypt/mpi/powerpc32/mpih-mul1.S   |    10 +-
 .../lib/libgcrypt/mpi/powerpc32/mpih-mul2.S   |    10 +-
 .../lib/libgcrypt/mpi/powerpc32/mpih-mul3.S   |     9 +-
 .../lib/libgcrypt/mpi/powerpc32/mpih-rshift.S |    10 +-
 .../lib/libgcrypt/mpi/powerpc32/mpih-sub1.S   |     9 +-
 .../lib/libgcrypt/mpi/powerpc32/syntax.h      |     5 +-
 grub-core/lib/libgcrypt/mpi/sparc32/Manifest  |    24 -
 grub-core/lib/libgcrypt/mpi/sparc32/distfiles |     1 -
 .../lib/libgcrypt/mpi/sparc32/mpih-add1.S     |     4 +-
 .../lib/libgcrypt/mpi/sparc32/mpih-lshift.S   |     4 +-
 .../lib/libgcrypt/mpi/sparc32/mpih-rshift.S   |     4 +-
 grub-core/lib/libgcrypt/mpi/sparc32/udiv.S    |     4 +-
 .../lib/libgcrypt/mpi/sparc32v8/Manifest      |    23 -
 .../lib/libgcrypt/mpi/sparc32v8/distfiles     |     1 -
 .../lib/libgcrypt/mpi/sparc32v8/mpih-mul1.S   |     4 +-
 .../lib/libgcrypt/mpi/sparc32v8/mpih-mul2.S   |     4 +-
 .../lib/libgcrypt/mpi/sparc32v8/mpih-mul3.S   |     4 +-
 .../lib/libgcrypt/mpi/supersparc/Manifest     |    21 -
 .../lib/libgcrypt/mpi/supersparc/distfiles    |     1 -
 grub-core/lib/libgcrypt/mpi/supersparc/udiv.S |     4 +-
 grub-core/lib/libgcrypt/src/ChangeLog-2011    |    75 +-
 grub-core/lib/libgcrypt/src/Makefile.am       |    93 +-
 grub-core/lib/libgcrypt/src/Manifest          |    58 -
 grub-core/lib/libgcrypt/src/ath.c             |   344 -
 grub-core/lib/libgcrypt/src/ath.h             |   147 -
 grub-core/lib/libgcrypt/src/cipher-proto.h    |   248 +-
 grub-core/lib/libgcrypt/src/cipher.h          |   167 +-
 grub-core/lib/libgcrypt/src/const-time.c      |    88 +
 grub-core/lib/libgcrypt/src/const-time.h      |   167 +
 grub-core/lib/libgcrypt/src/context.c         |   154 +
 grub-core/lib/libgcrypt/src/context.h         |    33 +
 grub-core/lib/libgcrypt/src/dumpsexp.c        |    25 +-
 grub-core/lib/libgcrypt/src/ec-context.h      |   107 +
 grub-core/lib/libgcrypt/src/fips.c            |   810 +-
 grub-core/lib/libgcrypt/src/g10lib.h          |   284 +-
 grub-core/lib/libgcrypt/src/gcrypt-int.h      |   595 +
 grub-core/lib/libgcrypt/src/gcrypt-module.h   |   240 -
 grub-core/lib/libgcrypt/src/gcrypt-testapi.h  |    70 +
 grub-core/lib/libgcrypt/src/gcrypt.h.in       |  1354 +-
 grub-core/lib/libgcrypt/src/gcryptrnd.c       |   680 -
 .../lib/libgcrypt/src/gen-note-integrity.sh   |   123 +
 grub-core/lib/libgcrypt/src/getrandom.c       |   326 -
 grub-core/lib/libgcrypt/src/global.c          |   911 +-
 grub-core/lib/libgcrypt/src/hmac256.c         |    89 +-
 grub-core/lib/libgcrypt/src/hmac256.h         |     2 +-
 grub-core/lib/libgcrypt/src/hwf-arm.c         |   564 +
 grub-core/lib/libgcrypt/src/hwf-common.h      |    28 +
 grub-core/lib/libgcrypt/src/hwf-ppc.c         |   247 +
 grub-core/lib/libgcrypt/src/hwf-s390x.c       |   231 +
 grub-core/lib/libgcrypt/src/hwf-x86.c         |   512 +
 grub-core/lib/libgcrypt/src/hwfeatures.c      |   326 +-
 .../lib/libgcrypt/src/libgcrypt-config.in     |    20 +-
 grub-core/lib/libgcrypt/src/libgcrypt.def     |   167 +-
 grub-core/lib/libgcrypt/src/libgcrypt.m4      |   179 +-
 grub-core/lib/libgcrypt/src/libgcrypt.pc.in   |    18 +
 grub-core/lib/libgcrypt/src/libgcrypt.vers    |    93 +-
 grub-core/lib/libgcrypt/src/misc.c            |   448 +-
 grub-core/lib/libgcrypt/src/missing-string.c  |     4 +-
 grub-core/lib/libgcrypt/src/module.c          |   212 -
 grub-core/lib/libgcrypt/src/mpi.h             |   223 +-
 grub-core/lib/libgcrypt/src/mpicalc.c         |   627 +
 grub-core/lib/libgcrypt/src/secmem.c          |   621 +-
 grub-core/lib/libgcrypt/src/secmem.h          |    17 +-
 grub-core/lib/libgcrypt/src/sexp.c            |  1390 +-
 grub-core/lib/libgcrypt/src/stdmem.c          |   145 +-
 grub-core/lib/libgcrypt/src/stdmem.h          |    13 +-
 grub-core/lib/libgcrypt/src/types.h           |   160 +-
 grub-core/lib/libgcrypt/src/versioninfo.rc.in |     2 +-
 grub-core/lib/libgcrypt/src/visibility.c      |   996 +-
 grub-core/lib/libgcrypt/src/visibility.h      |  1234 +-
 468 files changed, 210279 insertions(+), 32949 deletions(-)
 create mode 100644 grub-core/lib/libgcrypt/AUTHORS
 create mode 100644 grub-core/lib/libgcrypt/COPYING
 create mode 100644 grub-core/lib/libgcrypt/COPYING.LIB
 create mode 100644 grub-core/lib/libgcrypt/LICENSES
 create mode 100644 grub-core/lib/libgcrypt/README
 create mode 100644 grub-core/lib/libgcrypt/README.GIT
 create mode 100644 grub-core/lib/libgcrypt/THANKS
 create mode 100644 grub-core/lib/libgcrypt/VERSION
 delete mode 100644 grub-core/lib/libgcrypt/cipher/ChangeLog
 delete mode 100644 grub-core/lib/libgcrypt/cipher/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/cipher/ac.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/arcfour-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/aria-aesni-avx-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/aria-aesni-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/aria-gfni-avx512-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/aria.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-common-aarch64.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-common-amd64.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-common-i386.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-common-s390x.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-inline-s390x.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-poly1305-aarch64.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-poly1305-amd64.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/asm-poly1305-s390x.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/blake2.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/blake2b-amd64-avx2.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/blake2b-amd64-avx512.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/blake2s-amd64-avx.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/blake2s-amd64-avx512.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/blowfish-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/blowfish-arm.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/bulkhelp.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-aarch64-ce.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-aarch64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-aesni-avx-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-aesni-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-aesni-avx2-amd64.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-arm.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-gfni-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-gfni-avx512-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-ppc8le.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-ppc9le.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-simd128.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/camellia-vaes-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/cast5-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/cast5-arm.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-aarch64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-amd64-avx2.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-amd64-avx512.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-amd64-ssse3.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-armv7-neon.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-p10le-8x.s
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20-s390x.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/chacha20.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-aeswrap.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-cbc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-ccm.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-cfb.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-cmac.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-ctr.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-eax.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-gcm-armv7-neon.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-gcm-armv8-aarch32-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-gcm-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-gcm-intel-pclmul.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-gcm-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-gcm-siv.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-gcm.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-internal.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-ocb.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-ofb.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-poly1305.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-siv.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/cipher-xts.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/crc-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/crc-armv8-ce.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/crc-intel-pclmul.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/crc-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/des-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/dsa-common.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-common.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-curves.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-ecdh.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-ecdsa.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-eddsa.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-gost.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-misc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/ecc-sm2.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/gost-s-box.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/gost-sb.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/gost.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/gost28147.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/gostr3411-94.c
 delete mode 100644 grub-core/lib/libgcrypt/cipher/hmac-tests.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/kdf-internal.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/keccak-amd64-avx512.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/keccak-armv7-neon.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/keccak.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/keccak_permute_32.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/keccak_permute_64.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/kem-ecc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/kem-ecc.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/kem.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/kyber-common.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/kyber-kdep.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/kyber.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/kyber.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/mac-cmac.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/mac-gmac.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/mac-hmac.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/mac-internal.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/mac-poly1305.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/mac.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/mceliece6688128f.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/mceliece6688128f.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/poly1305-amd64-avx512.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/poly1305-internal.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/poly1305-p10le.s
 create mode 100644 grub-core/lib/libgcrypt/cipher/poly1305-s390x.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/poly1305.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/pubkey-internal.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/pubkey-util.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-aarch64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-aesni.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-arm.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-armv8-aarch32-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-armv8-ce.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-gcm-p10le.s
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-internal.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-p10le.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-padlock.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-ppc-common.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-ppc-functions.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-ppc9le.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-s390x.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-ssse3-amd64-asm.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-ssse3-amd64.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-vaes-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-vaes-avx2-i386.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-vaes-i386.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rijndael-vaes.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/rsa-common.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/salsa20-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/salsa20-armv7-neon.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/salsa20.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/scrypt.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/serpent-armv7-neon.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/serpent-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/serpent-avx512-x86.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/serpent-sse2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-armv7-neon.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-armv8-aarch32-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-avx-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-avx-bmi2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-avx2-bmi2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-intel-shaext.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1-ssse3-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha1.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha256-armv8-aarch32-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha256-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha256-avx-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha256-avx2-bmi2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha256-intel-shaext.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha256-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha256-ssse3-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-arm.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-armv7-neon.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-avx-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-avx2-bmi2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-avx512-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-ssse3-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sha512-ssse3-i386.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm3-aarch64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm3-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm3-avx-bmi2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm3.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-aarch64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-aesni-avx-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-aesni-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-armv8-aarch64-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-armv9-aarch64-sve-ce.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-gfni-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-gfni-avx512-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sm4.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sntrup761.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/sntrup761.h
 create mode 100644 grub-core/lib/libgcrypt/cipher/stribog.c
 delete mode 100644 grub-core/lib/libgcrypt/cipher/test-getrusage.c
 create mode 100644 grub-core/lib/libgcrypt/cipher/twofish-aarch64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/twofish-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/twofish-arm.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/twofish-avx2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/cipher/whirlpool-sse2-amd64.S
 create mode 100644 grub-core/lib/libgcrypt/compat/Makefile.am
 create mode 100644 grub-core/lib/libgcrypt/compat/clock.c
 create mode 100644 grub-core/lib/libgcrypt/compat/compat.c
 create mode 100644 grub-core/lib/libgcrypt/compat/getpid.c
 create mode 100644 grub-core/lib/libgcrypt/compat/libcompat.h
 create mode 100644 grub-core/lib/libgcrypt/config.h.in
 create mode 100755 grub-core/lib/libgcrypt/configure
 create mode 100644 grub-core/lib/libgcrypt/configure.ac
 create mode 100755 grub-core/lib/libgcrypt/mkinstalldirs
 delete mode 100644 grub-core/lib/libgcrypt/mpi/Manifest
 rename grub-core/lib/libgcrypt/mpi/{pentium4/sse2 => aarch64}/distfiles (80%)
 create mode 100644 grub-core/lib/libgcrypt/mpi/aarch64/mpi-asm-defs.h
 create mode 100644 grub-core/lib/libgcrypt/mpi/aarch64/mpih-add1.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/aarch64/mpih-mul1.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/aarch64/mpih-mul2.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/aarch64/mpih-mul3.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/aarch64/mpih-sub1.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/amd64/func_abi.h
 rename grub-core/lib/libgcrypt/mpi/{i586 => arm}/distfiles (57%)
 create mode 100644 grub-core/lib/libgcrypt/mpi/arm/mpi-asm-defs.h
 create mode 100644 grub-core/lib/libgcrypt/mpi/arm/mpih-add1.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/arm/mpih-mul1.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/arm/mpih-mul2.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/arm/mpih-mul3.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/arm/mpih-sub1.S
 create mode 100644 grub-core/lib/libgcrypt/mpi/asm-common-aarch64.h
 create mode 100644 grub-core/lib/libgcrypt/mpi/asm-common-amd64.h
 create mode 100644 grub-core/lib/libgcrypt/mpi/asm-common-i386.h
 rename grub-core/lib/libgcrypt/{cipher/rmd.h => mpi/ec-ed25519.c} (51%)
 create mode 100644 grub-core/lib/libgcrypt/mpi/ec-hw-s390x.c
 create mode 100644 grub-core/lib/libgcrypt/mpi/ec-inline.h
 create mode 100644 grub-core/lib/libgcrypt/mpi/ec-internal.h
 create mode 100644 grub-core/lib/libgcrypt/mpi/ec-nist.c
 delete mode 100644 grub-core/lib/libgcrypt/mpi/generic/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i386/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/README
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/mpih-add1.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/mpih-lshift.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/mpih-mul1.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/mpih-mul2.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/mpih-mul3.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/mpih-rshift.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/i586/mpih-sub1.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/m68k/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/m68k/mc68020/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/mips3/Manifest
 create mode 100644 grub-core/lib/libgcrypt/mpi/mpih-const-time.c
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pa7100/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/README
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/distfiles
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/mmx/distfiles
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/mmx/mpih-lshift.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/mmx/mpih-rshift.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-add1.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-mul1.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-mul2.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-mul3.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-sub1.S
 delete mode 100644 grub-core/lib/libgcrypt/mpi/power/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/powerpc32/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/sparc32/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/sparc32v8/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/mpi/supersparc/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/src/Manifest
 delete mode 100644 grub-core/lib/libgcrypt/src/ath.c
 delete mode 100644 grub-core/lib/libgcrypt/src/ath.h
 create mode 100644 grub-core/lib/libgcrypt/src/const-time.c
 create mode 100644 grub-core/lib/libgcrypt/src/const-time.h
 create mode 100644 grub-core/lib/libgcrypt/src/context.c
 create mode 100644 grub-core/lib/libgcrypt/src/context.h
 create mode 100644 grub-core/lib/libgcrypt/src/ec-context.h
 create mode 100644 grub-core/lib/libgcrypt/src/gcrypt-int.h
 delete mode 100644 grub-core/lib/libgcrypt/src/gcrypt-module.h
 create mode 100644 grub-core/lib/libgcrypt/src/gcrypt-testapi.h
 delete mode 100644 grub-core/lib/libgcrypt/src/gcryptrnd.c
 create mode 100755 grub-core/lib/libgcrypt/src/gen-note-integrity.sh
 delete mode 100644 grub-core/lib/libgcrypt/src/getrandom.c
 create mode 100644 grub-core/lib/libgcrypt/src/hwf-arm.c
 create mode 100644 grub-core/lib/libgcrypt/src/hwf-common.h
 create mode 100644 grub-core/lib/libgcrypt/src/hwf-ppc.c
 create mode 100644 grub-core/lib/libgcrypt/src/hwf-s390x.c
 create mode 100644 grub-core/lib/libgcrypt/src/hwf-x86.c
 create mode 100644 grub-core/lib/libgcrypt/src/libgcrypt.pc.in
 delete mode 100644 grub-core/lib/libgcrypt/src/module.c
 create mode 100644 grub-core/lib/libgcrypt/src/mpicalc.c
grub-core/lib/libgcrypt/AUTHORS new file +274 -0
new file mode 100644
index 000000000..f9161600b
@@ -0,0 +1,274 @@
+Library: Libgcrypt
+Homepage: https://gnupg.org/related_software/libgcrypt/
+Download: https://gnupg.org/ftp/gcrypt/libgcrypt/
+Repository: git://git.gnupg.org/libgcrypt.git
+Maintainer: Werner Koch <[email protected]>
+Bug reports: https://bugs.gnupg.org
+Security related bug reports: <[email protected]>
+End-of-life: TBD
+License (library): LGPLv2.1+
+License (manual and tools): GPLv2+
+
+
+Libgcrypt is free software.  See the files COPYING.LIB and COPYING for
+copying conditions, and LICENSES for notices about a few contributions
+that require these additional notices to be distributed.  License
+copyright years may be listed using range notation, e.g., 2000-2013,
+indicating that every year in the range, inclusive, is a copyrightable
+year that would otherwise be listed individually.
+
+
+List of Copyright holders
+=========================
+
+  Copyright (C) 1989,1991-2018 Free Software Foundation, Inc.
+  Copyright (C) 1994 X Consortium
+  Copyright (C) 1996 L. Peter Deutsch
+  Copyright (C) 1997 Werner Koch
+  Copyright (C) 1998 The Internet Society
+  Copyright (C) 1996-1999 Peter Gutmann, Paul Kendall, and Chris Wedgwood
+  Copyright (C) 1996-2006 Peter Gutmann, Matt Thomlinson and Blake Coverett
+  Copyright (C) 2003 Nikos Mavroyanopoulos
+  Copyright (c) 2006 CRYPTOGAMS
+  Copyright (C) 2006-2007 NTT (Nippon Telegraph and Telephone Corporation)
+  Copyright (C) 2012-2024 g10 Code GmbH
+  Copyright (C) 2012 Simon Josefsson, Niels Möller
+  Copyright (c) 2012 Intel Corporation
+  Copyright (C) 2013 Christian Grothoff
+  Copyright (C) 2013-2024 Jussi Kivilinna
+  Copyright (C) 2013-2014 Dmitry Eremin-Solenikov
+  Copyright (C) 2014 Stephan Mueller
+  Copyright (C) 2017 Jia Zhang
+  Copyright (C) 2018 Bundesamt für Sicherheit in der Informationstechnik
+  Copyright (C) 2020 Alibaba Group.
+  Copyright (C) 2020 Tianjia Zhang
+  Copyright (C) 2023 Simon Josefsson
+
+
+Authors with a FSF copyright assignment
+=======================================
+
+LIBGCRYPT       Werner Koch    2001-06-07
+Assigns past and future changes.
+Assignment for future changes terminated on 2012-12-04.
[email protected]
+Designed and implemented Libgcrypt.
+
+GNUPG	Matthew Skala		   1998-08-10
+Disclaims changes.
[email protected]
+Wrote cipher/twofish.c.
+
+GNUPG	Natural Resources Canada    1998-08-11
+Disclaims changes by Matthew Skala.
+
+GNUPG	Michael Roth	Germany     1998-09-17
+Assigns changes.
[email protected]
+Wrote cipher/des.c.
+Changes and bug fixes all over the place.
+
+GNUPG	Niklas Hernaeus 	1998-09-18
+Disclaims changes.
[email protected]
+Weak key patches.
+
+GNUPG	Rémi Guyomarch		1999-05-25
+Assigns past and future changes. (g10/compress.c, g10/encr-data.c,
+g10/free-packet.c, g10/mdfilter.c, g10/plaintext.c, util/iobuf.c)
[email protected]
+
+ANY     g10 Code GmbH           2001-06-07
+Assignment for future changes terminated on 2012-12-04.
+Code marked with ChangeLog entries of g10 Code employees.
+
+LIBGCRYPT Timo Schulz           2001-08-31
+Assigns past and future changes.
[email protected]
+
+LIBGCRYPT Simon Josefsson       2002-10-25
+Assigns past and future changes to FSF (cipher/{md4,crc}.c, CTR mode,
+CTS/MAC flags, self test improvements)
[email protected]
+
+LIBGCRYPT Moritz Schulte	2003-04-17
+Assigns past and future changes.
[email protected]
+
+GNUTLS  Nikolaos Mavrogiannopoulos  2003-11-22
[email protected]
+Original code for cipher/rfc2268.c.
+
+LIBGCRYPT	The Written Word	2005-04-15
+Assigns past and future changes. (new: src/libgcrypt.pc.in,
+src/Makefile.am, src/secmem.c, mpi/hppa1.1/mpih-mul3.S,
+mpi/hppa1.1/udiv-qrnnd.S, mpi/hppa1.1/mpih-mul2.S,
+mpi/hppa1.1/mpih-mul1.S, mpi/Makefile.am, tests/prime.c,
+tests/register.c, tests/ac.c, tests/basic.c, tests/tsexp.c,
+tests/keygen.c, tests/pubkey.c, configure.ac, acinclude.m4)
+
+LIBGCRYPT       Brad Hards       2006-02-09
+Assigns Past and Future Changes
[email protected]
+(Added OFB mode. Changed cipher/cipher.c, test/basic.c doc/gcrypt.tex.
+ added SHA-224, changed cipher/sha256.c, added HMAC tests.)
+
+LIBGCRYPT       Hye-Shik Chang   2006-09-07
+Assigns Past and Future Changes
[email protected]
+(SEED cipher)
+
+LIBGCRYPT       Werner Dittmann  2009-05-20
+Assigns Past and Future Changes
[email protected]
+(mpi/amd64, tests/mpitests.c)
+
+GNUPG           David Shaw
+Assigns past and future changes.
[email protected]
+(cipher/camellia-glue.c and related stuff)
+
+LIBGCRYPT       Andrey Jivsov    2010-12-09
+Assigns Past and Future Changes
[email protected]
+(cipher/ecc.c and related files)
+
+LIBGCRYPT       Ulrich Müller    2012-02-15
+Assigns Past and Future Changes
[email protected]
+(Changes to cipher/idea.c and related files)
+
+LIBGCRYPT       Vladimir Serbinenko  2012-04-26
+Assigns Past and Future Changes
[email protected]
+(cipher/serpent.c)
+
+
+Authors with a DCO
+==================
+
+Andrei Scherer <[email protected]>
+2014-08-22:[email protected]:
+
+Christian Aistleitner <[email protected]>
+2013-02-26:[email protected]:
+
+Christian Grothoff <[email protected]>
+2013-03-21:[email protected]:
+
+Clemens Lang <[email protected]>
+2022-02-10:[email protected]:
+
+Danny Tsen <[email protected]>
+2021-12-20:OF85D11C2F.7A339D7D-ON002587B1.0042A81E-002587B1.0042B94D@ibm.com
+
+Dmitry Baryshkov <[email protected]>
+Dmitry Eremin-Solenikov <[email protected]>
+2013-07-13:[email protected]:
+
+Dmitry Kasatkin <[email protected]>
+2012-12-14:[email protected]:
+
+Falko Strenzke <[email protected]>
+2023-09-27:[email protected]:
+
+H.J. Lu <[email protected]>
+2020-01-19:[email protected]:
+
+Jia Zhang <[email protected]>
+2017-10-17:[email protected]:
+
+Jérémie Courrèges-Anglas <[email protected]>
+2016-05-26:[email protected]:
+
+Jussi Kivilinna <[email protected]>
+2012-11-15:[email protected]:
+
+Jussi Kivilinna <[email protected]>
+2013-05-06:[email protected]:
+
+Markus Teich <markus dot teich at stusta dot mhn dot de>
+2014-10-08:20141008180509.GA2770@trolle:
+
+Martin Storsjö <[email protected]>
+2018-03-28:[email protected]:
+
+Mathias L. Baumann <mathias.baumann at sociomantic.com>
+2017-01-30:[email protected]:
+
+Milan Broz <[email protected]>
+2014-01-13:[email protected]:
+
+Paul Wolneykien <[email protected]>
+2019-11-19:[email protected]:
+
+Peter Wu <[email protected]>
+2015-07-22:20150722191325.GA8113@al:
+
+Rafaël Carré <[email protected]>
+2012-04-20:[email protected]:
+
+Sergey V. <[email protected]>
+2013-11-07:2066221.5IYa7Yq760@darkstar:
+
+Shawn Landden <[email protected]>
+2019-07-09:[email protected]:
+
+Simit Ghane <[email protected]>
+2024-05-06:OF22575887.761836D9-ON48258B15.0044A21E-48258B15.0044A222@lge.com:
+
+Stephan Mueller <[email protected]>
+2014-08-22:[email protected]:
+
+Tianjia Zhang <[email protected]>
+2020-01-08:[email protected]:
+
+Tomáš Mráz <[email protected]>
+2012-04-16:[email protected]:
+
+Vitezslav Cizek <[email protected]>
+2015-11-05:[email protected]:
+
+Werner Koch <[email protected]> (g10 Code GmbH)
+2012-12-05:[email protected]:
+
+
+More credits
+============
+
+Libgcrypt used to be part of GnuPG but has been taken out into its own
+package on 2000-12-21.
+
+Most of the stuff in mpi has been taken from an old GMP library
+version by Torbjorn Granlund <[email protected]>.
+
+The files cipher/rndunix.c and cipher/rndw32.c are based on those
+files from Cryptlib.  Copyright Peter Gutmann, Paul Kendall, and Chris
+Wedgwood 1996-1999.
+
+The ECC code cipher/ecc.c was based on code by Sergi Blanch i Torne,
+sergi at calcurco dot org.
+
+The implementation of the Camellia cipher has been been taken from the
+original NTT provided GPL source.
+
+The CAVS testing program tests/cavs_driver.pl is not to be considered
+a part of libgcrypt proper.  We distribute it merely for convenience.
+It has a permissive license and is copyrighted by atsec information
+security corporation.  See the file for details.
+
+The file salsa20.c is based on D.J. Bernstein's public domain code and
+taken from Nettle.  Copyright 2012 Simon Josefsson and Niels Möller.
+
+The sntrup761 code is based on public domain code written by Daniel
+J. Bernstein, Chitchanok Chuengsatiansup, Tanja Lange, and Christine
+van Vredendaal.  Copyright 2023 Simon Josefsson.
+
+
+ This file is free software; as a special exception the author gives
+ unlimited permission to copy and/or distribute it, with or without
+ modifications, as long as this notice is preserved.
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
grub-core/lib/libgcrypt/COPYING new file +339 -0

339 lines not on this page · raw message

grub-core/lib/libgcrypt/COPYING.LIB new file +502 -0

502 lines not on this page · raw message

grub-core/lib/libgcrypt/LICENSES new file +319 -0

319 lines not on this page · raw message

grub-core/lib/libgcrypt/README new file +278 -0

278 lines not on this page · raw message

grub-core/lib/libgcrypt/README.GIT new file +49 -0

49 lines not on this page · raw message

grub-core/lib/libgcrypt/THANKS new file +168 -0

168 lines not on this page · raw message

grub-core/lib/libgcrypt/VERSION new file +1 -0
new file mode 100644
index 000000000..1cac385c6
@@ -0,0 +1 @@
+1.11.0
grub-core/lib/libgcrypt/cipher/ChangeLog deleted +0 -3990

1,070 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ChangeLog-2011 +36 -4
index 05516c99e..1ce6bd1e6 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/Makefile.am +291 -39

330 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/Manifest deleted +0 -73

73 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ac.c deleted +0 -3301

3,301 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/arcfour-amd64.S new file +108 -0

108 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/arcfour.c +77 -16

93 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/aria-aesni-avx-amd64.S new file +1440 -0

1,440 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/aria-aesni-avx2-amd64.S new file +1830 -0

1,830 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/aria-gfni-avx512-amd64.S new file +1010 -0

1,010 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/aria.c new file +1768 -0

1,768 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-common-aarch64.h new file +132 -0

132 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-common-amd64.h new file +213 -0

213 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-common-i386.h new file +161 -0

161 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-common-s390x.h new file +90 -0

90 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-inline-s390x.h new file +205 -0

205 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-poly1305-aarch64.h new file +245 -0

245 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-poly1305-amd64.h new file +171 -0

171 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/asm-poly1305-s390x.h new file +140 -0

140 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/bithelp.h +90 -21

111 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blake2.c new file +1086 -0

1,086 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blake2b-amd64-avx2.S new file +301 -0

301 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blake2b-amd64-avx512.S new file +429 -0

429 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blake2s-amd64-avx.S new file +281 -0

281 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blake2s-amd64-avx512.S new file +397 -0

397 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blowfish-amd64.S new file +601 -0

601 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blowfish-arm.S new file +743 -0

743 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/blowfish.c +643 -159

802 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/bufhelp.h +199 -259

458 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/bulkhelp.h new file +493 -0

493 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-aarch64-ce.c new file +42 -0

42 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-aarch64.S new file +585 -0

585 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-aesni-avx-amd64.S new file +2802 -0

2,802 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-aesni-avx2-amd64.S new file +34 -0
new file mode 100644
index 000000000..5102d1912

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/camellia-aesni-avx2-amd64.h new file +2327 -0

2,327 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-arm.S new file +626 -0

626 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-gfni-avx2-amd64.S new file +34 -0
new file mode 100644
index 000000000..20c9a432d

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/camellia-gfni-avx512-amd64.S new file +1634 -0

1,634 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-glue.c +1630 -40

1,670 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-ppc8le.c new file +47 -0

47 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-ppc9le.c new file +47 -0

47 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-simd128.h new file +2235 -0

2,235 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia-vaes-avx2-amd64.S new file +35 -0
new file mode 100644
index 000000000..e6e0c78ec

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/camellia.c +62 -110

172 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/camellia.h +25 -9
index cccf786ca..0797e6f38 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/cast5-amd64.S new file +663 -0

663 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cast5-arm.S new file +728 -0

728 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cast5.c +670 -105

775 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-aarch64.S new file +650 -0

650 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-amd64-avx2.S new file +604 -0

604 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-amd64-avx512.S new file +736 -0

736 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-amd64-ssse3.S new file +1015 -0

1,015 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-armv7-neon.S new file +393 -0

393 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-p10le-8x.s new file +864 -0

864 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-ppc.c new file +750 -0

750 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20-s390x.S new file +1566 -0

1,566 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/chacha20.c new file +1450 -0

1,450 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-aeswrap.c new file +380 -0

380 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-cbc.c new file +292 -0

292 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-ccm.c new file +419 -0

419 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-cfb.c new file +317 -0

317 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-cmac.c new file +292 -0

292 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-ctr.c new file +131 -0

131 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-eax.c new file +293 -0

293 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-gcm-armv7-neon.S new file +341 -0

341 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-gcm-armv8-aarch32-ce.S new file +588 -0

588 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-gcm-armv8-aarch64-ce.S new file +633 -0

633 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-gcm-intel-pclmul.c new file +2025 -0

2,025 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-gcm-ppc.c new file +548 -0

548 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-gcm-siv.c new file +664 -0

664 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-gcm.c new file +1260 -0

1,260 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-internal.h new file +975 -0

975 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-ocb.c new file +763 -0

763 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-ofb.c new file +108 -0

108 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-poly1305.c new file +383 -0

383 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-siv.c new file +375 -0

375 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher-xts.c new file +189 -0

189 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/cipher.c +1260 -1442

2,702 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/crc-armv8-aarch64-ce.S new file +500 -0

500 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/crc-armv8-ce.c new file +229 -0

229 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/crc-intel-pclmul.c new file +939 -0

939 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/crc-ppc.c new file +656 -0

656 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/crc.c +177 -15

192 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/des-amd64.S new file +1116 -0

1,116 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/des.c +270 -31

301 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/dsa-common.c new file +473 -0

473 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/dsa.c +735 -472

1,207 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-common.h new file +143 -0

143 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-curves.c new file +1587 -0

1,587 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-ecdh.c new file +357 -0

357 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-ecdsa.c new file +305 -0

305 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-eddsa.c new file +1079 -0

1,079 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-gost.c new file +218 -0

218 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-misc.c new file +469 -0

469 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc-sm2.c new file +569 -0

569 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/ecc.c +1915 -1327

3,242 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/elgamal.c +574 -255

829 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/gost-s-box.c new file +266 -0

266 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/gost-sb.h new file +2128 -0

2,128 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/gost.h new file +34 -0
new file mode 100644
index 000000000..53a405050

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/gost28147.c new file +553 -0

553 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/gostr3411-94.c new file +383 -0

383 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/hash-common.c +104 -6

110 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/hash-common.h +32 -3
index fdebef42a..561e77a7e 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/hmac-tests.c deleted +0 -732

732 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/idea.c +15 -9
index 3c5578f95..7f7066606 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/kdf-internal.h new file +39 -0
new file mode 100644
index 000000000..9f4f3c489

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/kdf.c +2178 -61

2,239 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/keccak-amd64-avx512.S new file +587 -0

587 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/keccak-armv7-neon.S new file +945 -0

945 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/keccak.c new file +1904 -0

1,904 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/keccak_permute_32.h new file +536 -0

536 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/keccak_permute_64.h new file +385 -0

385 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/kem-ecc.c new file +332 -0

332 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/kem-ecc.h new file +40 -0
new file mode 100644
index 000000000..b320a71cc

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/kem.c new file +435 -0

435 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/kyber-common.c new file +766 -0

766 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/kyber-kdep.c new file +825 -0

825 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/kyber.c new file +530 -0

530 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/kyber.h new file +130 -0

130 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mac-cmac.c new file +532 -0

532 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mac-gmac.c new file +203 -0

203 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mac-hmac.c new file +1471 -0

1,471 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mac-internal.h new file +290 -0

290 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mac-poly1305.c new file +382 -0

382 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mac.c new file +834 -0

834 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mceliece6688128f.c new file +3673 -0

3,673 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/mceliece6688128f.h new file +63 -0

63 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/md.c +949 -633

1,582 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/md4.c +70 -101

171 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/md5.c +72 -105

177 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/poly1305-amd64-avx512.S new file +1626 -0

1,626 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/poly1305-internal.h new file +92 -0

92 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/poly1305-p10le.s new file +841 -0

841 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/poly1305-s390x.S new file +87 -0

87 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/poly1305.c new file +846 -0

846 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/primegen.c +291 -272

563 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/pubkey-internal.h new file +107 -0

107 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/pubkey-util.c new file +1363 -0

1,363 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/pubkey.c +688 -3641

4,329 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rfc2268.c +47 -10

57 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-aarch64.S new file +512 -0

512 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-aesni.c new file +5033 -0

5,033 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-amd64.S new file +477 -0

477 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-arm.S new file +581 -0

581 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-armv8-aarch32-ce.S new file +2134 -0

2,134 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-armv8-aarch64-ce.S new file +2038 -0

2,038 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-armv8-ce.c new file +396 -0

396 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-gcm-p10le.s new file +1401 -0

1,401 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-internal.h new file +216 -0

216 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-p10le.c new file +119 -0

119 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-padlock.c new file +109 -0

109 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-ppc-common.h new file +328 -0

328 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-ppc-functions.h new file +2544 -0

2,544 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-ppc.c new file +230 -0

230 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-ppc9le.c new file +119 -0

119 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-s390x.c new file +1166 -0

1,166 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-ssse3-amd64-asm.S new file +879 -0

879 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-ssse3-amd64.c new file +742 -0

742 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-tables.h +190 -1656

1,846 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-vaes-avx2-amd64.S new file +3688 -0

3,688 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-vaes-avx2-i386.S new file +2804 -0

2,804 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-vaes-i386.c new file +231 -0

231 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael-vaes.c new file +240 -0

240 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rijndael.c +1292 -1351

2,643 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rmd160.c +270 -322

592 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rsa-common.c new file +1151 -0

1,151 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/rsa.c +1296 -440

1,736 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/salsa20-amd64.S new file +940 -0

940 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/salsa20-armv7-neon.S new file +899 -0

899 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/salsa20.c new file +600 -0

600 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/scrypt.c new file +322 -0

322 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/seed.c +16 -16
index ae26e6742..9cc34f9e6 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/cipher/serpent-armv7-neon.S new file +1180 -0

1,180 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/serpent-avx2-amd64.S new file +1214 -0

1,214 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/serpent-avx512-x86.c new file +994 -0

994 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/serpent-sse2-amd64.S new file +1276 -0

1,276 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/serpent.c +1542 -475

2,017 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-armv7-neon.S new file +526 -0

526 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-armv8-aarch32-ce.S new file +220 -0

220 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-armv8-aarch64-ce.S new file +204 -0

204 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-avx-amd64.S new file +433 -0

433 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-avx-bmi2-amd64.S new file +446 -0

446 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-avx2-bmi2-amd64.S new file +578 -0

578 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-intel-shaext.c new file +292 -0

292 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1-ssse3-amd64.S new file +442 -0

442 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1.c +431 -140

571 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha1.h new file +47 -0

47 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256-armv8-aarch32-ce.S new file +231 -0

231 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256-armv8-aarch64-ce.S new file +218 -0

218 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256-avx-amd64.S new file +511 -0

511 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256-avx2-bmi2-amd64.S new file +533 -0

533 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256-intel-shaext.c new file +363 -0

363 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256-ppc.c new file +610 -0

610 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256-ssse3-amd64.S new file +533 -0

533 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha256.c +531 -244

775 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-arm.S new file +464 -0

464 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-armv7-neon.S new file +452 -0

452 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-armv8-aarch64-ce.S new file +383 -0

383 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-avx-amd64.S new file +466 -0

466 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-avx2-bmi2-amd64.S new file +507 -0

507 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-avx512-amd64.S new file +465 -0

465 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-ppc.c new file +725 -0

725 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-ssse3-amd64.S new file +472 -0

472 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512-ssse3-i386.c new file +404 -0

404 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sha512.c +1023 -287

1,310 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm3-aarch64.S new file +660 -0

660 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm3-armv8-aarch64-ce.S new file +221 -0

221 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm3-avx-bmi2-amd64.S new file +555 -0

555 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm3.c new file +565 -0

565 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-aarch64.S new file +644 -0

644 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-aesni-avx-amd64.S new file +1058 -0

1,058 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-aesni-avx2-amd64.S new file +973 -0

973 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-armv8-aarch64-ce.S new file +731 -0

731 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-armv9-aarch64-sve-ce.S new file +967 -0

967 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-gfni-avx2-amd64.S new file +1260 -0

1,260 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-gfni-avx512-amd64.S new file +1861 -0

1,861 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4-ppc.c new file +342 -0

342 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sm4.c new file +2070 -0

2,070 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sntrup761.c new file +1062 -0

1,062 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/sntrup761.h new file +73 -0

73 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/stribog.c new file +1362 -0

1,362 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/test-getrusage.c deleted +0 -105

105 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/tiger.c +130 -181

311 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/twofish-aarch64.S new file +322 -0

322 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/twofish-amd64.S new file +1258 -0

1,258 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/twofish-arm.S new file +363 -0

363 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/twofish-avx2-amd64.S new file +1136 -0

1,136 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/twofish.c +882 -72

954 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/whirlpool-sse2-amd64.S new file +348 -0

348 lines not on this page · raw message

grub-core/lib/libgcrypt/cipher/whirlpool.c +232 -102

334 lines not on this page · raw message

grub-core/lib/libgcrypt/compat/Makefile.am new file +48 -0

48 lines not on this page · raw message

grub-core/lib/libgcrypt/compat/clock.c new file +36 -0
new file mode 100644
index 000000000..2a2c205f3

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/compat/compat.c new file +40 -0
new file mode 100644
index 000000000..7684e4f31

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/compat/getpid.c new file +29 -0
new file mode 100644
index 000000000..032387c36

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/compat/libcompat.h new file +37 -0
new file mode 100644
index 000000000..d3eb81bfc

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/config.h.in new file +873 -0

873 lines not on this page · raw message

grub-core/lib/libgcrypt/configure new file +25763 -0

25,763 lines not on this page · raw message

grub-core/lib/libgcrypt/configure.ac new file +3883 -0

3,883 lines not on this page · raw message

grub-core/lib/libgcrypt/mkinstalldirs new file +161 -0

161 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/ChangeLog-2011 +13 -4
index 930717141..1e0787218 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/Makefile.am +11 -5
index e900539a2..6fe63fceb 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/Manifest deleted +0 -41

41 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/aarch64/distfiles renamed from grub-core/lib/libgcrypt/mpi/pentium4/sse2/distfiles +1 -0
similarity index 80%
rename from grub-core/lib/libgcrypt/mpi/pentium4/sse2/distfiles
rename to grub-core/lib/libgcrypt/mpi/aarch64/distfiles
index 7252cd7e3..1327bd4a7 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/aarch64/mpi-asm-defs.h new file +4 -0
new file mode 100644
index 000000000..65190653b

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/aarch64/mpih-add1.S new file +75 -0

75 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/aarch64/mpih-mul1.S new file +100 -0

100 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/aarch64/mpih-mul2.S new file +112 -0

112 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/aarch64/mpih-mul3.S new file +125 -0

125 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/aarch64/mpih-sub1.S new file +75 -0

75 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/alpha/README +2 -2
index 55c0a2917..00addfd39 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/mpih-add1.S +2 -2
index 50dbb2b9d..463c5c070 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/mpih-lshift.S +2 -2
index ded4b15c0..75ae698cc 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/mpih-mul1.S +2 -2
index cd91b1049..030a288d2 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/mpih-mul2.S +2 -2
index 5eb6b98be..566642eee 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/mpih-mul3.S +2 -2
index 7d5d2afe4..520d1c622 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/mpih-rshift.S +2 -2
index f0c981438..85e0af538 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/mpih-sub1.S +2 -2
index 9a644468c..6896b5746 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/alpha/udiv-qrnnd.S +2 -2
index dd0c52d7d..eb1602a95 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/amd64/distfiles +1 -0
index 634e36fb0..44aad5f82 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/amd64/func_abi.h new file +34 -0
new file mode 100644
index 000000000..c3f2d026c

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/amd64/mpi-asm-defs.h +1 -1
index 17de1c190..65190653b 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/amd64/mpih-add1.S +74 -18

92 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/amd64/mpih-lshift.S +28 -26

54 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/amd64/mpih-mul1.S +6 -5
index 54b0ab489..7bd9ff292 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/amd64/mpih-mul2.S +6 -47

53 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/amd64/mpih-mul3.S +6 -5
index 4d458a794..d0e85ba9e 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/amd64/mpih-rshift.S +29 -27

56 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/amd64/mpih-sub1.S +74 -16

90 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/arm/distfiles renamed from grub-core/lib/libgcrypt/mpi/i586/distfiles +1 -5
similarity index 57%
rename from grub-core/lib/libgcrypt/mpi/i586/distfiles
rename to grub-core/lib/libgcrypt/mpi/arm/distfiles
index 546f77768..27a2ca527 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/arm/mpi-asm-defs.h new file +4 -0
new file mode 100644
index 000000000..047d1f5a7

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/arm/mpih-add1.S new file +76 -0

76 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/arm/mpih-mul1.S new file +80 -0

80 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/arm/mpih-mul2.S new file +94 -0

94 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/arm/mpih-mul3.S new file +100 -0

100 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/arm/mpih-sub1.S new file +77 -0

77 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/asm-common-aarch64.h new file +26 -0
new file mode 100644
index 000000000..cf4bdb852

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/asm-common-amd64.h new file +26 -0
new file mode 100644
index 000000000..ad0e8e62f

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/asm-common-i386.h new file +26 -0
new file mode 100644
index 000000000..901664504

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/config.links +127 -51

178 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/ec-ed25519.c renamed from grub-core/lib/libgcrypt/cipher/rmd.h +18 -17
similarity index 51%
rename from grub-core/lib/libgcrypt/cipher/rmd.h
rename to grub-core/lib/libgcrypt/mpi/ec-ed25519.c
index 6a9fe3135..b52b339b1 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/ec-hw-s390x.c new file +412 -0

412 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/ec-inline.h new file +1236 -0

1,236 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/ec-internal.h new file +49 -0

49 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/ec-nist.c new file +826 -0

826 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/ec.c +1751 -302

2,053 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/generic/Manifest deleted +0 -29
deleted file mode 100644
index c429fde72..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/distfiles +0 -1
index 9810eef4d..649e829b7 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpi-asm-defs.h +7 -9
index 13424e280..e607806e1 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpih-add1.c +5 -5
index 4ffe0eb23..0a51f06cc 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpih-lshift.c +3 -3
index 8c1d943b0..8a9c1257f 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpih-mul1.c +4 -4
index 614646c43..e88be9145 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpih-mul2.c +5 -5
index 56979dfdb..bc925e019 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpih-mul3.c +4 -4
index 9b8df1a69..4ecd2c6be 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpih-rshift.c +2 -2
index e40794fcf..156337b38 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/mpih-sub1.c +4 -4
index 25b08af1c..b8eff0dbb 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/generic/udiv-w-sdiv.c +2 -2
index e80d98bc5..719d18269 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/hppa/mpih-add1.S +2 -2
index 3bc0e5e19..8001bda39 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/hppa/mpih-lshift.S +2 -2
index 91b29bb6e..ba478ff2e 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/hppa/mpih-rshift.S +2 -2
index 37a9d4ef9..c486fc75c 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/hppa/mpih-sub1.S +2 -2
index 8d197e412..250563289 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/hppa/udiv-qrnnd.S +2 -2
index 59ebf7a00..06f06d15e 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/Manifest deleted +0 -28
deleted file mode 100644
index 812bc8a5c..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/distfiles +0 -1
index 22b9979bd..88d2a30c7 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/mpih-add1.S +48 -3

51 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i386/mpih-lshift.S +12 -4
index bf8ed9d4c..409c6c599 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/mpih-mul1.S +13 -3
index c9760ef92..431730ce7 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/mpih-mul2.S +13 -3
index 9794e1108..58a0d6e37 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/mpih-mul3.S +13 -3
index 6df201763..327e6ac89 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/mpih-rshift.S +13 -5
index 2920e55d8..18c36c0c4 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i386/mpih-sub1.S +48 -3

51 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i386/syntax.h +13 -3
index 88845f28d..2383ebd3e 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i586/Manifest deleted +0 -27
deleted file mode 100644
index 6d1d7f824..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i586/README deleted +0 -26
deleted file mode 100644
index d73b08268..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/i586/mpih-add1.S deleted +0 -135

135 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i586/mpih-lshift.S deleted +0 -229

229 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i586/mpih-mul1.S deleted +0 -89

89 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i586/mpih-mul2.S deleted +0 -93

93 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i586/mpih-mul3.S deleted +0 -93

93 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i586/mpih-rshift.S deleted +0 -228

228 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/i586/mpih-sub1.S deleted +0 -142

142 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/longlong.h +582 -385

967 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/m68k/Manifest deleted +0 -25
deleted file mode 100644
index 8e0538adf..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/distfiles +0 -1
index 1e2e36f05..4c0967b84 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mc68020/Manifest deleted +0 -23
deleted file mode 100644
index bcb27681e..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mc68020/distfiles +0 -1
index 6b96433af..fc7df9fa3 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mc68020/mpih-mul1.S +2 -2
index 007c94c6d..1b55097ad 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mc68020/mpih-mul2.S +2 -2
index 44baa8d88..321d9ac70 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mc68020/mpih-mul3.S +2 -2
index e958ef611..708fdc939 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mpih-add1.S +2 -2
index 8182d21a3..951735a3d 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mpih-lshift.S +2 -2
index 133d1aae3..540567c28 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mpih-rshift.S +2 -2
index be9f43502..964c141fb 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/mpih-sub1.S +2 -2
index ee7555f89..f81569ceb 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/m68k/syntax.h +3 -3
index 6a3fea130..1c528db7e 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/Manifest deleted +0 -28
deleted file mode 100644
index e191184f3..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/README +1 -1
index e94b2c746..4ba4546d9 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/distfiles +0 -1
index ef9b6fef3..85260fc8e 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/mpih-add1.S +2 -2
index f3db029de..ba5ac1956 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/mpih-lshift.S +2 -2
index 084c109b2..013ee4a76 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/mpih-mul1.S +2 -2
index 6c0099de3..b2a6d1614 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/mpih-mul2.S +2 -2
index ca8276388..49ccce21a 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/mpih-mul3.S +2 -2
index be421a68e..a951ba694 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/mpih-rshift.S +2 -2
index e7e035a03..a8d39854d 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mips3/mpih-sub1.S +2 -2
index 9fac67439..ae444b174 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpi-add.c +45 -19

64 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpi-bit.c +134 -123

257 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpi-cmp.c +34 -11

45 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpi-div.c +14 -9
index a6ee3006e..8d2a85738 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpi-gcd.c +8 -7
index 5cbefa121..9cf3062ee 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpi-inline.c +2 -2
index 39e222247..c6c66f3fa 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpi-inline.h +2 -2
index 94e2aec8a..090e8a94a 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpi-internal.h +55 -5

60 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpi-inv.c +305 -7

312 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpi-mod.c +29 -25

54 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpi-mpow.c +6 -6
index ca5b3f184..bbd102e31 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpi-mul.c +19 -8
index 9aefd217a..e8e574750 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpi-pow.c +446 -12

458 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpi-scan.c +68 -68

136 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpicoder.c +532 -231

763 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpih-const-time.c new file +241 -0

241 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/mpih-div.c +6 -8
index 0b458fffd..0f3849d64 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpih-mul.c +14 -13
index b8e056173..6c51533fc 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/mpiutil.c +410 -78

488 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pa7100/Manifest deleted +0 -22
deleted file mode 100644
index f075ab056..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/pa7100/distfiles +0 -1
index e1cde4d57..fece94310 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/pa7100/mpih-lshift.S +2 -2
index 8ade19643..9bf6f728b 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/pa7100/mpih-rshift.S +2 -2
index 062420272..d0ceb8b1a 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/pentium4/README deleted +0 -115

115 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pentium4/distfiles deleted +0 -3
deleted file mode 100644
index b419f85a9..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/pentium4/mmx/distfiles deleted +0 -2
deleted file mode 100644
index 8f0ea426d..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/pentium4/mmx/mpih-lshift.S deleted +0 -457

457 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pentium4/mmx/mpih-rshift.S deleted +0 -453

453 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-add1.S deleted +0 -91

91 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-mul1.S deleted +0 -96

96 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-mul2.S deleted +0 -136

136 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-mul3.S deleted +0 -127

127 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/pentium4/sse2/mpih-sub1.S deleted +0 -112

112 lines not on this page · raw message

grub-core/lib/libgcrypt/mpi/power/Manifest deleted +0 -27
deleted file mode 100644
index c60fc23c2..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/distfiles +0 -1
index e1bc008bc..e664c8db6 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/mpih-add1.S +2 -2
index 876b56c66..b992f1582 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/mpih-lshift.S +2 -2
index d9e42daf8..1fcd1891c 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/mpih-mul1.S +2 -2
index 35034fa40..5876443c6 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/mpih-mul2.S +2 -2
index d056e8f3c..5b91101e5 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/mpih-mul3.S +2 -2
index 8bc317b76..8d54e84e4 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/mpih-rshift.S +2 -2
index f131a86d7..aca51abf1 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/power/mpih-sub1.S +2 -2
index 02748fc55..03a8d9da6 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/Manifest deleted +0 -28
deleted file mode 100644
index 26ab6ea3e..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/distfiles +0 -1
index a08661489..af10d795b 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/mpih-add1.S +5 -4
index 1661f5e67..cd5929433 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/mpih-lshift.S +4 -4
index 6231095dc..0f66a4030 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/mpih-mul1.S +5 -5
index bd418f7e3..75ff66af6 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/mpih-mul2.S +5 -5
index 1d97b81a4..bb3c81d5d 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/mpih-mul3.S +5 -4
index c410dbb02..196fca1cb 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/mpih-rshift.S +5 -5
index 98349edb5..f6702ad17 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/mpih-sub1.S +5 -4
index d612ea890..42672423b 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/powerpc32/syntax.h +3 -2
index 5d4af9f0a..5f4e6cf6c 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32/Manifest deleted +0 -24
deleted file mode 100644
index d279229b0..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32/distfiles +0 -1
index a20f18ead..51329dbdb 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32/mpih-add1.S +2 -2
index 61a80ca32..d3488f514 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32/mpih-lshift.S +2 -2
index 3422ab04e..4d544ede2 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32/mpih-rshift.S +2 -2
index cd3db41df..a8552d79c 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32/udiv.S +2 -2
index 006b5c125..04841fffc 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32v8/Manifest deleted +0 -23
deleted file mode 100644
index dc1ce6a8e..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32v8/distfiles +0 -1
index 6e9a53091..2fcb0d1aa 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32v8/mpih-mul1.S +2 -2
index 03fcddab0..162416b71 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32v8/mpih-mul2.S +2 -2
index 6f5cc436a..a94098363 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/sparc32v8/mpih-mul3.S +2 -2
index 93bb19433..467484962 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/supersparc/Manifest deleted +0 -21
deleted file mode 100644
index 869b97bdb..000000000

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/supersparc/distfiles +0 -1
index ef7c0a538..550601cb5 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/mpi/supersparc/udiv.S +2 -2
index 79e506a11..2582e358a 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/ChangeLog-2011 +69 -6

75 lines not on this page · raw message

grub-core/lib/libgcrypt/src/Makefile.am +58 -35

93 lines not on this page · raw message

grub-core/lib/libgcrypt/src/Manifest deleted +0 -58

58 lines not on this page · raw message

grub-core/lib/libgcrypt/src/ath.c deleted +0 -344

344 lines not on this page · raw message

grub-core/lib/libgcrypt/src/ath.h deleted +0 -147

147 lines not on this page · raw message

grub-core/lib/libgcrypt/src/cipher-proto.h +199 -49

248 lines not on this page · raw message

grub-core/lib/libgcrypt/src/cipher.h +108 -59

167 lines not on this page · raw message

grub-core/lib/libgcrypt/src/const-time.c new file +88 -0

88 lines not on this page · raw message

grub-core/lib/libgcrypt/src/const-time.h new file +167 -0

167 lines not on this page · raw message

grub-core/lib/libgcrypt/src/context.c new file +154 -0

154 lines not on this page · raw message

grub-core/lib/libgcrypt/src/context.h new file +33 -0
new file mode 100644
index 000000000..21a1f5dba

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/dumpsexp.c +14 -11
index f6384d7d5..ae6563591 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/ec-context.h new file +107 -0

107 lines not on this page · raw message

grub-core/lib/libgcrypt/src/fips.c +562 -248

810 lines not on this page · raw message

grub-core/lib/libgcrypt/src/g10lib.h +240 -44

284 lines not on this page · raw message

grub-core/lib/libgcrypt/src/gcrypt-int.h new file +595 -0

595 lines not on this page · raw message

grub-core/lib/libgcrypt/src/gcrypt-module.h deleted +0 -240

240 lines not on this page · raw message

grub-core/lib/libgcrypt/src/gcrypt-testapi.h new file +70 -0

70 lines not on this page · raw message

grub-core/lib/libgcrypt/src/gcrypt.h.in +843 -511

1,354 lines not on this page · raw message

grub-core/lib/libgcrypt/src/gcryptrnd.c deleted +0 -680

680 lines not on this page · raw message

grub-core/lib/libgcrypt/src/gen-note-integrity.sh new file +123 -0

123 lines not on this page · raw message

grub-core/lib/libgcrypt/src/getrandom.c deleted +0 -326

326 lines not on this page · raw message

grub-core/lib/libgcrypt/src/global.c +605 -306

911 lines not on this page · raw message

grub-core/lib/libgcrypt/src/hmac256.c +53 -36

89 lines not on this page · raw message

grub-core/lib/libgcrypt/src/hmac256.h +1 -1
index df28e7272..05700e0e0 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/hwf-arm.c new file +564 -0

564 lines not on this page · raw message

grub-core/lib/libgcrypt/src/hwf-common.h new file +28 -0
new file mode 100644
index 000000000..ebd045c53

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/hwf-ppc.c new file +247 -0

247 lines not on this page · raw message

grub-core/lib/libgcrypt/src/hwf-s390x.c new file +231 -0

231 lines not on this page · raw message

grub-core/lib/libgcrypt/src/hwf-x86.c new file +512 -0

512 lines not on this page · raw message

grub-core/lib/libgcrypt/src/hwfeatures.c +192 -134

326 lines not on this page · raw message

grub-core/lib/libgcrypt/src/libgcrypt-config.in +16 -4
index c052638cd..2456436ab 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/libgcrypt.def +119 -48

167 lines not on this page · raw message

grub-core/lib/libgcrypt/src/libgcrypt.m4 +155 -24

179 lines not on this page · raw message

grub-core/lib/libgcrypt/src/libgcrypt.pc.in new file +18 -0
new file mode 100644
index 000000000..325f5c2b6

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/libgcrypt.vers +60 -33

93 lines not on this page · raw message

grub-core/lib/libgcrypt/src/misc.c +381 -67

448 lines not on this page · raw message

grub-core/lib/libgcrypt/src/missing-string.c +2 -2
index 4756c00ea..434076168 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/module.c deleted +0 -212

212 lines not on this page · raw message

grub-core/lib/libgcrypt/src/mpi.h +141 -82

223 lines not on this page · raw message

grub-core/lib/libgcrypt/src/mpicalc.c new file +627 -0

627 lines not on this page · raw message

grub-core/lib/libgcrypt/src/secmem.c +413 -208

621 lines not on this page · raw message

grub-core/lib/libgcrypt/src/secmem.h +10 -7
index 29e151af4..3ed883546 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/sexp.c +1034 -356

1,390 lines not on this page · raw message

grub-core/lib/libgcrypt/src/stdmem.c +19 -126

145 lines not on this page · raw message

grub-core/lib/libgcrypt/src/stdmem.h +5 -8
index b476e7e50..12de9d4f8 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/types.h +84 -76

160 lines not on this page · raw message

grub-core/lib/libgcrypt/src/versioninfo.rc.in +1 -1
index 3199521c9..f87d0d059 100644

Lines of this file are not shown. View the raw message.

grub-core/lib/libgcrypt/src/visibility.c +638 -358

996 lines not on this page · raw message

grub-core/lib/libgcrypt/src/visibility.h +488 -746

1,234 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.49.0

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Part of the diff is not shown here. View the raw message.

#9 lore raw

PATCH v11 9/14 Implement __aeabi_uldivmod

In reply to Vladimir Serbinenko

Some arm compilers insert 64-bit division into the code compiled from libgcrypt source and possibly others. Rether than fighting it, simply provide the function in question.

---
 grub-core/kern/arm/compiler-rt.S | 11 +++++++++++
 include/grub/compiler-rt.h       |  3 +++
 2 files changed, 14 insertions(+)
grub-core/kern/arm/compiler-rt.S +11 -0
index 645b42f50..26fe1c98d 100644
@@ -75,6 +75,17 @@ FUNCTION(__aeabi_uidivmod)
 FUNCTION(__aeabi_idivmod)
 	division32 grub_divmod32s
 
+        /* Copied from LLVM under MIT license.  */
+FUNCTION(__aeabi_uldivmod)
+        push	{r11, lr}
+        sub	sp, sp, #16
+        add	r12, sp, #8
+        str	r12, [sp]
+        bl	grub_divmod64
+        ldr	r2, [sp, #8]
+        ldr	r3, [sp, #12]
+        add	sp, sp, #16
+        pop	{r11, pc}
 /*
  * Null divide-by-zero handler
  */
include/grub/compiler-rt.h +3 -0
index 17828b322..43fd8f4d7 100644
@@ -73,6 +73,9 @@ EXPORT_FUNC (__aeabi_uidiv) (grub_uint32_t a, grub_uint32_t b);
 grub_uint32_t
 EXPORT_FUNC (__aeabi_uidivmod) (grub_uint32_t a, grub_uint32_t b);
 
+grub_uint64_t
+EXPORT_FUNC (__aeabi_uldivmod) (grub_uint64_t a, grub_uint64_t b);
+
 grub_int32_t
 EXPORT_FUNC (__aeabi_idiv) (grub_int32_t a, grub_int32_t b);
 grub_int32_t
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#13 lore raw

PATCH v11 13/14 import_gcry: Make compatible with python 3.4

In reply to Vladimir Serbinenko
---
 util/import_gcry.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
util/import_gcry.py +5 -5
index b6ddde9cd..396ce0f68 100644
@@ -249,15 +249,15 @@ for cipher_file in cipher_files:
                 if not re.search (" *};", line) is None:
                     escapenl = " \\" if ismddefine else ""
                     if not iscomma:
-                        fw.write (f"    ,{escapenl}\n")
-                    fw.write (f"    GRUB_UTIL_MODNAME(\"%s\"){escapenl}\n" % modname);
+                        fw.write ("    ,%s\n" % escapenl)
+                    fw.write ("    GRUB_UTIL_MODNAME(\"%s\")%s\n" % (modname, escapenl))
                     if ismd:
                         if not (mdname in mdblocksizes):
                             print ("ERROR: Unknown digest blocksize: %s\n"
                                    % mdname)
                             exit (1)
-                        fw.write (f"    .blocksize = %s{escapenl}\n"
-                                  % mdblocksizes [mdname])
+                        fw.write ("    .blocksize = %s%s\n"
+                                  % (mdblocksizes [mdname], escapenl))
                     ismd = False
                     ismddefine = False
                     mdarg = 0
@@ -361,7 +361,7 @@ for cipher_file in cipher_files:
             if isc and not m is None:
                 bs = m.groups()[0]
                 bits = m.groups()[2]
-                mdname = f"_gcry_digest_spec_blake2{bs}_{bits}"
+                mdname = "_gcry_digest_spec_blake2%s_%s" % (bs, bits)
                 mdnames.append (mdname)
 
             m = re.match ("(const )?gcry_md_spec_t", line)
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#7 lore raw

PATCH v11 7/14 libgcrypt: Fix coverity warnings

In reply to Vladimir Serbinenko
---
 .../libgcrypt-patches/03_mpiutil_alloc.patch  | 20 ++++++++++
 .../lib/libgcrypt-patches/03_sexp_free.patch  | 37 +++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch
 create mode 100644 grub-core/lib/libgcrypt-patches/03_sexp_free.patch
grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch new file +20 -0
new file mode 100644
index 000000000..7014f827d
@@ -0,0 +1,20 @@
+Fix NULL pointer dereference in case of failed alloc
+
+CID# 369001
+
+Signed-off-by: Vladimir Serbinenko <[email protected]>
+
+diff --git a/grub-core/lib/libgcrypt/mpi/mpiutil.c b/grub-core/lib/libgcrypt/mpi/mpiutil.c
+index 3a372374f..dc53db09d 100644
+--- a/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c
++++ b/grub-core/lib/libgcrypt-grub/mpi/mpiutil.c
+@@ -432,6 +432,9 @@ _gcry_mpi_alloc_like( gcry_mpi_t a )
+ 	int n = (a->sign+7)/8;
+ 	void *p = _gcry_is_secure(a->d)? xtrymalloc_secure (n)
+                                        : xtrymalloc (n);
++	if ( !p ) {
++            _gcry_fatal_error (GPG_ERR_ENOMEM, NULL);
++	}
+ 	memcpy( p, a->d, n );
+ 	b = mpi_set_opaque( NULL, p, a->sign );
+     }
grub-core/lib/libgcrypt-patches/03_sexp_free.patch new file +37 -0
new file mode 100644
index 000000000..33552ef54
@@ -0,0 +1,37 @@
+sexp: Add missing free on error path
+
+CID# 541475
+
+Signed-off-by: Vladimir Serbinenko <[email protected]>
+
+diff --git a/grub-core/lib/libgcrypt/src/sexp.c b/grub-core/lib/libgcrypt/src/sexp.c
+index d15f1a790..250559f75 100644
+--- a/grub-core/lib/libgcrypt-grub/src/sexp.c
++++ b/grub-core/lib/libgcrypt-grub/src/sexp.c
+@@ -1157,6 +1157,17 @@ do_vsexp_sscan (gcry_sexp_t *retsexp, size_t *erroff,
+                               }                                            \
+                        } while (0)
+ 
++#define MAKE_SPACE_EXTRA_CLEANUP(n, cleanup)  do {				\
++                            gpg_err_code_t _ms_err = make_space (&c, (n)); \
++                            if (_ms_err)                                   \
++                              {                                            \
++                                err = _ms_err;                             \
++                                *erroff = p - buffer;                      \
++				cleanup;				   \
++                                goto leave;                                \
++                              }                                            \
++                       } while (0)
++
+   /* The STORE_LEN macro is used to store the length N at buffer P. */
+ #define STORE_LEN(p,n) do {						   \
+ 			    DATALEN ashort = (n);			   \
+@@ -1368,7 +1379,7 @@ do_vsexp_sscan (gcry_sexp_t *retsexp, size_t *erroff,
+                   goto leave;
+                 }
+ 
+-              MAKE_SPACE (datalen);
++              MAKE_SPACE_EXTRA_CLEANUP (datalen, xfree (b64buf));
+               *c.pos++ = ST_DATA;
+               STORE_LEN (c.pos, datalen);
+               for (i = 0; i < datalen; i++)
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#6 lore raw

PATCH v11 6/14 keccak: Disable acceleration with SSE asm

In reply to Vladimir Serbinenko

Libgcrypt code assumes that on x64 all SSE registers are fair game. While it's true that CPUs in question support it, we disable it in our compilation options. Disable the offending optimization.

---
 .../lib/libgcrypt-patches/02_keccak_sse.patch | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 grub-core/lib/libgcrypt-patches/02_keccak_sse.patch
grub-core/lib/libgcrypt-patches/02_keccak_sse.patch new file +25 -0
new file mode 100644
index 000000000..4deda126d
@@ -0,0 +1,25 @@
+commit b0cf06271da5fe20360953a53a47c69da89669cd
+Author: Vladimir Serbinenko <[email protected]>
+Date:   Sun Apr 7 03:33:11 2024 +0000
+
+    keccak: Disable acceleration with SSE asm
+
+    Libgcrypt code assumes that on x64 all SSE registers are fair game.
+    While it's true that CPUs in question support it, we disable it in
+    our compilation options. Disable the offending optimization.
+
+    Signed-off-by: Vladimir Serbinenko <[email protected]>
+
+diff --git a/grub-core/lib/libgcrypt/cipher/keccak.c b/grub-core/lib/libgcrypt/cipher/keccak.c
+index 11e64b3e7..8b570263b 100644
+--- a/grub-core/lib/libgcrypt-grub/cipher/keccak.c
++++ b/grub-core/lib/libgcrypt-grub/cipher/keccak.c
+@@ -275,7 +275,7 @@ keccak_absorb_lane32bi(u32 *lane, u32 x0, u32 x1)
+ /* Construct generic 64-bit implementation. */
+ #ifdef USE_64BIT
+ 
+-#if __GNUC__ >= 4 && defined(__x86_64__)
++#if __GNUC__ >= 4 && defined(__x86_64__) && 0
+ 
+ static inline void absorb_lanes64_8(u64 *dst, const byte *in)
+ {
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#14 lore raw

PATCH v11 14/14 import_gcry: Fix pylint warnings

In reply to Vladimir Serbinenko
---
 util/import_gcry.py | 1277 +++++++++++++++++++++----------------------
 1 file changed, 623 insertions(+), 654 deletions(-)
util/import_gcry.py +623 -654
index 396ce0f68..cd54daca1 100644
@@ -1,3 +1,4 @@
+# pylint: disable=invalid-name,line-too-long
 #*
 #*  GRUB  --  GRand Unified Bootloader
 #*  Copyright (C) 2009  Free Software Foundation, Inc.
@@ -27,8 +28,7 @@ def removesuffix(base: str, suffix: str) -> str:
 
     if base.endswith(suffix):
         return base[:-len(suffix)]
-    else:
-        return base
+    return base
 
 
 def removeprefix(base: str, prefix: str) -> str:
@@ -36,8 +36,7 @@ def removeprefix(base: str, prefix: str) -> str:
 
     if base.startswith(prefix):
         return base[len(prefix):]
-    else:
-        return base
+    return base
 
 if len (sys.argv) < 3:
     print ("Usage: %s SOURCE DESTINATION" % sys.argv[0])
@@ -46,44 +45,16 @@ indir = sys.argv[1]
 outdir = sys.argv[2]
 
 basedir = os.path.join (outdir, "lib/libgcrypt-grub")
-try:
-    os.makedirs (basedir)
-except:
-    print ("WARNING: %s already exists" % basedir)
+os.makedirs (basedir, exist_ok=True)
 cipher_dir_in = os.path.join (indir, "cipher")
 cipher_dir_out = os.path.join (basedir, "cipher")
-try:
-    os.makedirs (cipher_dir_out)
-except:
-    print ("WARNING: %s already exists" % cipher_dir_out)
+os.makedirs (cipher_dir_out, exist_ok=True)
 mpidir =  os.path.join (basedir, "mpi")
-try:
-    os.makedirs (mpidir)
-except:
-    print ("WARNING: %s already exists" % mpidir)
+os.makedirs (mpidir, exist_ok=True)
 
 srcdir =  os.path.join (basedir, "src")
-try:
-    os.makedirs (srcdir)
-except:
-    print ("WARNING: %s already exists" % srcdir)
+os.makedirs (srcdir, exist_ok=True)
 
-cipher_files = sorted (os.listdir (cipher_dir_in))
-conf = codecs.open (os.path.join ("grub-core", "Makefile.gcry.def"), "w", "utf-8")
-conf.write ("AutoGen definitions Makefile.tpl;\n\n")
-confutil = codecs.open ("Makefile.utilgcry.def", "w", "utf-8")
-confutil.write ("AutoGen definitions Makefile.tpl;\n\n")
-confutil.write ("library = {\n");
-confutil.write ("  name = libgrubgcry.a;\n");
-confutil.write ("  cflags = '$(CFLAGS_GCRY)';\n");
-confutil.write ("  cppflags = '$(CPPFLAGS_GCRY)';\n");
-confutil.write ("  extra_dist = grub-core/lib/libgcrypt-grub/cipher/ChangeLog;\n");
-confutil.write ("\n");
-
-for src in ['src/const-time.c']:
-    confutil.write ("  common = grub-core/lib/libgcrypt-grub/%s;\n" % src)
-
-confutil.write ("\n");
 
 chlog = ""
 modules_sym_md = []
@@ -123,636 +94,634 @@ mdblocksizes = {"_gcry_digest_spec_crc32" : 64,
                 "_gcry_digest_spec_cshake256": 64,
                 "_gcry_digest_spec_blake2": "GRUB_BLAKE2 ## BS ## _BLOCK_SIZE"}
 
-cryptolist = codecs.open (os.path.join (cipher_dir_out, "crypto.lst"), "w", "utf-8")
-
-# rijndael is the only cipher using aliases. So no need for mangling, just
-# hardcode it
-cryptolist.write ("RIJNDAEL: gcry_rijndael\n");
-cryptolist.write ("RIJNDAEL192: gcry_rijndael\n");
-cryptolist.write ("RIJNDAEL256: gcry_rijndael\n");
-cryptolist.write ("AES128: gcry_rijndael\n");
-cryptolist.write ("AES-128: gcry_rijndael\n");
-cryptolist.write ("AES-192: gcry_rijndael\n");
-cryptolist.write ("AES-256: gcry_rijndael\n");
-
-cryptolist.write ("ADLER32: adler32\n");
-cryptolist.write ("CRC64: crc64\n");
-
-extra_files = {
-    "gcry_camellia": ["camellia.c"], # Main file is camellia-glue.c
-    "gcry_sha512"  : ["hash-common.c"],
-}
-extra_files_list = [x for xs in extra_files.values() for x in xs] + ["pubkey-util.c", "rsa-common.c", "dsa-common.c", "md.c"]
-
-for cipher_file in cipher_files:
-    infile = os.path.join (cipher_dir_in, cipher_file)
-    outfile = os.path.join (cipher_dir_out, cipher_file)
-    if cipher_file == "ChangeLog" or cipher_file == "ChangeLog-2011":
-        continue
-    chlognew = "	* %s" % cipher_file
-    # Unused generic support files
-    if re.match (r"(Makefile\.am|primegen\.c|cipher\.c|cipher-.*\.c|mac-.*\.c|mac\.c|pubkey\.c)$", cipher_file):
-        chlog = "%s%s: Removed\n" % (chlog, chlognew)
-        continue
-    # TODO: Support KDF
-    if re.match (r"(kdf\.c|scrypt\.c)$", cipher_file):
-        chlog = "%s%s: Removed\n" % (chlog, chlognew)
-        continue
-    # TODO: Support chacha20 and poly1305
-    # TODO: Support ECC
-    # TODO: Support quantum-resistant
-    if cipher_file in ["poly1305.c", "chacha20.c", "ecc.c", "elgamal.c",
-                       "sntrup761.c", "mceliece6688128f.c", "kyber-common.c", "kyber.c", "kyber-kdep.c", "kem-ecc.c", "kem.c"] or re.match (r"^ecc-.*\.c$", cipher_file):
-        chlog = "%s%s: Removed\n" % (chlog, chlognew)
-        continue
-    # TODO: Use optimized versions
-    if re.match (r"(.*\.[sS]|.*-intel-shaext\.c|.*-ssse3-i386\.c|.*-ppc\.c|.*-ssse3-amd64\.c|.*-s390x\.c|rijndael-aesni\.c|crc-intel-pclmul\.c|.*-armv8-ce.c|.*-aarch64-ce\.c|.*-p10le\.c|rijndael-padlock.c|.*-ppc[89]le.c|rijndael-vaes.c|rijndael-vaes-i386.c|serpent-avx512-x86.c)$", cipher_file):
-        chlog = "%s%s: Removed\n" % (chlog, chlognew)
-        continue
-    # We use pregenerated version
-    if cipher_file == "gost-s-box.c":
-        chlog = "%s%s: Removed\n" % (chlog, chlognew)
-        continue
-    # Autogenerated files. Not even worth mentionning in ChangeLog
-    if re.match (r"Makefile\.in$", cipher_file):
-        continue
-    nch = False
-    if re.match (r".*\.[ch]$", cipher_file):
-        isc = re.match (r".*\.c$", cipher_file)
-        f = codecs.open (infile, "r", "utf-8")
-        fw = codecs.open (outfile, "w", "utf-8")
-        fw.write ("/* This file was automatically imported with \n")
-        fw.write ("   import_gcry.py. Please don't modify it */\n")
-        add_license = cipher_file == "pubkey-util.c" or (isc and not cipher_file in extra_files_list)
-        if add_license:
-            fw.write ("#include <grub/dl.h>\n")
-        if cipher_file == "camellia.h":
-            fw.write ("#include <grub/misc.h>\n")
-            fw.write ("void camellia_setup128(const unsigned char *key, grub_uint32_t *subkey);\n")
-            fw.write ("void camellia_setup192(const unsigned char *key, grub_uint32_t *subkey);\n")
-            fw.write ("void camellia_setup256(const unsigned char *key, grub_uint32_t *subkey);\n")
-            fw.write ("void camellia_encrypt128(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
-            fw.write ("void camellia_encrypt192(const grub_uint32_t *subkey, grub_uint32_t *io);\n")                      
-            fw.write ("void camellia_encrypt256(const grub_uint32_t *subkey, grub_uint32_t *io);\n")                      
-            fw.write ("void camellia_decrypt128(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
-            fw.write ("void camellia_decrypt192(const grub_uint32_t *subkey, grub_uint32_t *io);\n")                      
-            fw.write ("void camellia_decrypt256(const grub_uint32_t *subkey, grub_uint32_t *io);\n")                      
-            fw.write ("#define memcpy grub_memcpy\n")
-        # Whole libgcrypt is distributed under GPLv3+ or compatible
-        if add_license:
-            fw.write ("GRUB_MOD_LICENSE (\"GPLv3+\");\n")
-
-        ciphernames = []
-        mdnames = []
-        mdctxsizes = []
-        pknames = []
-        hold = False
-        skip = 0
-        skip2 = False
-        ismd = False
-        ismddefine = False
-        mdarg = 0
-        ispk = False
-        iscipher = False
-        iscryptostart = False
-        iscomma = False
-        skip_statement = False
-        skip_comma = False
-        if isc:
-            modname = "gcry_%s" % removesuffix(removesuffix(cipher_file, ".c"), "-glue").replace("-", "_")
-        for line in f:
-            line = line
-            if skip_statement:
-                if not re.search (";", line) is None:
-                    skip_statement = False
-                continue
-            if skip > 0:
-                if line[0] == "}":
-                    skip = skip - 1
-                continue
-            if skip2:
-                if not re.search (" *};", line) is None:
-                    skip2 = False
-                continue
-            if iscryptostart:
-                s = re.search (" *\"([A-Z0-9_a-z-]*)\"", line)
-                if not s is None:
-                    sg = s.groups()[0]
-                    cryptolist.write (("%s: %s\n") % (sg, modname))
-                    iscryptostart = False
-            if ismd:
-                spl = line.split (",")
-                if mdarg + len (spl) > 9 and mdarg <= 9 and ("sizeof" in spl[9-mdarg]):
-                    mdctxsizes.append (spl[9-mdarg].lstrip ().rstrip())
-                mdarg = mdarg + len (spl) - 1
-            if ismd or iscipher or ispk:
-                if not re.search (" *};", line) is None:
-                    escapenl = " \\" if ismddefine else ""
-                    if not iscomma:
-                        fw.write ("    ,%s\n" % escapenl)
-                    fw.write ("    GRUB_UTIL_MODNAME(\"%s\")%s\n" % (modname, escapenl))
-                    if ismd:
-                        if not (mdname in mdblocksizes):
-                            print ("ERROR: Unknown digest blocksize: %s\n"
-                                   % mdname)
-                            exit (1)
-                        fw.write ("    .blocksize = %s%s\n"
-                                  % (mdblocksizes [mdname], escapenl))
-                    ismd = False
-                    ismddefine = False
-                    mdarg = 0
-                    iscipher = False
-                    ispk = False
-                iscomma = not re.search (",$", line) is None
-            # Used only for selftests.
-            m = re.match (r"(static byte|static unsigned char|static const gcry_md_spec_t \* const) (weak_keys_chksum|digest_list)\[[0-9]*\] =", line)
-            if not m is None:
-                skip = 1
-                fname = m.groups ()[1]
-                chmsg = "(%s): Removed." % fname
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            if (not hold) and (re.match (r"[ \t]*(run_selftests|do_tripledes_set_extra_info),?", line) is not None):
-                iscomma = True
-                line = ""
-            if hold:
+cipher_files = sorted (os.listdir (cipher_dir_in))
+
+with codecs.open (os.path.join (cipher_dir_out, "crypto.lst"), "w", "utf-8") as cryptolist, \
+     codecs.open (os.path.join ("grub-core", "Makefile.gcry.def"), "w", "utf-8") as conf, \
+     codecs.open ("Makefile.utilgcry.def", "w", "utf-8") as confutil:
+
+    conf.write ("AutoGen definitions Makefile.tpl;\n\n")
+    confutil.write ("AutoGen definitions Makefile.tpl;\n\n")
+    confutil.write ("library = {\n")
+    confutil.write ("  name = libgrubgcry.a;\n")
+    confutil.write ("  cflags = '$(CFLAGS_GCRY)';\n")
+    confutil.write ("  cppflags = '$(CPPFLAGS_GCRY)';\n")
+    confutil.write ("  extra_dist = grub-core/lib/libgcrypt-grub/cipher/ChangeLog;\n")
+    confutil.write ("\n")
+
+    for src in ['src/const-time.c']:
+        confutil.write ("  common = grub-core/lib/libgcrypt-grub/%s;\n" % src)
+
+    confutil.write ("\n")
+
+
+    # rijndael is the only cipher using aliases. So no need for mangling, just
+    # hardcode it
+    cryptolist.write ("RIJNDAEL: gcry_rijndael\n")
+    cryptolist.write ("RIJNDAEL192: gcry_rijndael\n")
+    cryptolist.write ("RIJNDAEL256: gcry_rijndael\n")
+    cryptolist.write ("AES128: gcry_rijndael\n")
+    cryptolist.write ("AES-128: gcry_rijndael\n")
+    cryptolist.write ("AES-192: gcry_rijndael\n")
+    cryptolist.write ("AES-256: gcry_rijndael\n")
+
+    cryptolist.write ("ADLER32: adler32\n")
+    cryptolist.write ("CRC64: crc64\n")
+
+    extra_files = {
+        "gcry_camellia": ["camellia.c"], # Main file is camellia-glue.c
+        "gcry_sha512"  : ["hash-common.c"],
+    }
+    extra_files_list = [x for xs in extra_files.values() for x in xs] + [
+        "pubkey-util.c", "rsa-common.c", "dsa-common.c", "md.c"]
+
+    for cipher_file in cipher_files:
+        infile = os.path.join (cipher_dir_in, cipher_file)
+        outfile = os.path.join (cipher_dir_out, cipher_file)
+        if cipher_file in ["ChangeLog", "ChangeLog-2011"]:
+            continue
+        chlognew = "	* %s" % cipher_file
+        # Unused generic support files
+        if re.match (r"(Makefile\.am|primegen\.c|cipher\.c|cipher-.*\.c|mac-.*\.c|mac\.c|pubkey\.c)$", cipher_file):
+            chlog = "%s%s: Removed\n" % (chlog, chlognew)
+            continue
+        # TODO: Support KDF
+        if re.match (r"(kdf\.c|scrypt\.c)$", cipher_file):
+            chlog = "%s%s: Removed\n" % (chlog, chlognew)
+            continue
+        # TODO: Support chacha20 and poly1305
+        # TODO: Support ECC
+        # TODO: Support quantum-resistant
+        if cipher_file in ["poly1305.c", "chacha20.c", "ecc.c", "elgamal.c",
+                           "sntrup761.c", "mceliece6688128f.c", "kyber-common.c",
+                           "kyber.c", "kyber-kdep.c", "kem-ecc.c",
+                           "kem.c"] or re.match (r"^ecc-.*\.c$", cipher_file):
+            chlog = "%s%s: Removed\n" % (chlog, chlognew)
+            continue
+        # TODO: Use optimized versions
+        if re.match (r"(.*\.[sS]|.*-intel-shaext\.c|.*-ssse3-i386\.c|.*-ppc\.c|.*-ssse3-amd64\.c|.*-s390x\.c|rijndael-aesni\.c|crc-intel-pclmul\.c|.*-armv8-ce.c|.*-aarch64-ce\.c|.*-p10le\.c|rijndael-padlock.c|.*-ppc[89]le.c|rijndael-vaes.c|rijndael-vaes-i386.c|serpent-avx512-x86.c)$", cipher_file):
+            chlog = "%s%s: Removed\n" % (chlog, chlognew)
+            continue
+        # We use pregenerated version
+        if cipher_file == "gost-s-box.c":
+            chlog = "%s%s: Removed\n" % (chlog, chlognew)
+            continue
+        # Autogenerated files. Not even worth mentionning in ChangeLog
+        if re.match (r"Makefile\.in$", cipher_file):
+            continue
+        nch = False
+        if re.match (r".*\.[ch]$", cipher_file):
+            isc = re.match (r".*\.c$", cipher_file)
+            with codecs.open (infile, "r", "utf-8") as f, codecs.open (outfile, "w", "utf-8") as fw:
+                fw.write ("/* This file was automatically imported with \n")
+                fw.write ("   import_gcry.py. Please don't modify it */\n")
+                add_license = cipher_file == "pubkey-util.c" or (isc and not cipher_file in extra_files_list)
+                if add_license:
+                    fw.write ("#include <grub/dl.h>\n")
+                if cipher_file == "camellia.h":
+                    fw.write ("#include <grub/misc.h>\n")
+                    fw.write ("void camellia_setup128(const unsigned char *key, grub_uint32_t *subkey);\n")
+                    fw.write ("void camellia_setup192(const unsigned char *key, grub_uint32_t *subkey);\n")
+                    fw.write ("void camellia_setup256(const unsigned char *key, grub_uint32_t *subkey);\n")
+                    fw.write ("void camellia_encrypt128(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
+                    fw.write ("void camellia_encrypt192(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
+                    fw.write ("void camellia_encrypt256(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
+                    fw.write ("void camellia_decrypt128(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
+                    fw.write ("void camellia_decrypt192(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
+                    fw.write ("void camellia_decrypt256(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
+                    fw.write ("#define memcpy grub_memcpy\n")
+                # Whole libgcrypt is distributed under GPLv3+ or compatible
+                if add_license:
+                    fw.write ("GRUB_MOD_LICENSE (\"GPLv3+\");\n")
+
+                ciphernames = []
+                mdnames = []
+                mdctxsizes = []
+                pknames = []
                 hold = False
-                # We're optimising for size and exclude anything needing good
-                # randomness.
-                if re.match ("(_gcry_hash_selftest_check_one|bulk_selftest_setkey|run_selftests|do_tripledes_set_extra_info|selftest|sm4_selftest|_gcry_[a-z0-9_]*_hash_buffers|_gcry_sha1_hash_buffer|tripledes_set2keys|_gcry_rmd160_mixblock|serpent_test|dsa_generate_ext|test_keys|gen_k|sign|gen_x931_parm_xp|generate_x931|generate_key|dsa_generate|dsa_sign|ecc_sign|generate|generate_fips186|_gcry_register_pk_dsa_progress|_gcry_register_pk_ecc_progress|progress|scanval|ec2os|ecc_generate_ext|ecc_generate|ecc_get_param|_gcry_register_pk_dsa_progress|gen_x931_parm_xp|gen_x931_parm_xi|rsa_decrypt|rsa_sign|rsa_generate_ext|rsa_generate|secret|check_exponent|rsa_blind|rsa_unblind|extract_a_from_sexp|curve_free|curve_copy|point_set|_gcry_dsa_gen_rfc6979_k|bits2octets|int2octets|_gcry_md_debug|_gcry_md_selftest|_gcry_md_is_enabled|_gcry_md_is_secure|_gcry_md_init|_gcry_md_info|md_get_algo|md_extract|_gcry_md_get |_gcry_md_get_algo |_gcry_md_extract|_gcry_md_setkey|md_setkey|prepare_macpads|_gcry_md_algo_name|search_oid|spec_from_oid|spec_from_name|spec_from_algo|map_algo|cshake_hash_buffers|blake2b_vl_hash|selftest_seq)", line) is not None:
-
-                    skip = 1
-                    if not re.match ("selftest", line) is None and cipher_file == "idea.c":
-                        skip = 3
-
-                    if not re.match ("serpent_test", line) is None:
-                        fw.write ("static const char *serpent_test (void) { return 0; }\n");
-                    if not re.match ("sm4_selftest", line) is None:
-                        fw.write ("static const char *sm4_selftest (void) { return 0; }\n");
-                    hash_buf = re.match ("(_gcry_[a-z0-9_]*_hash_buffers)", line)
-                    if hash_buf is not None:
-                        fw.write ("#define %s 0" % (hash_buf.group(0)))
-                    if not re.match ("dsa_generate", line) is None:
-                        fw.write ("#define dsa_generate 0");
-                    if not re.match ("ecc_generate", line) is None:
-                        fw.write ("#define ecc_generate 0");
-                    if not re.match ("rsa_generate ", line) is None:
-                        fw.write ("#define rsa_generate 0");
-                    if not re.match ("rsa_sign", line) is None:
-                        fw.write ("#define rsa_sign 0");
-                    if not re.match ("rsa_decrypt", line) is None:
-                        fw.write ("#define rsa_decrypt 0");
-                    if not re.match ("dsa_sign", line) is None:
-                        fw.write ("#define dsa_sign 0");
-                    if not re.match ("ecc_sign", line) is None:
-                        fw.write ("#define ecc_sign 0");
-                    if not re.match ("search_oid", line) is None:
-                        fw.write ("#define search_oid(a,b) grub_crypto_lookup_md_by_oid(a)")
-                    if not re.match ("spec_from_name", line) is None:
-                        fw.write ("#define spec_from_name grub_crypto_lookup_md_by_name")
-                    fname = re.match ("[a-zA-Z0-9_]*", line).group ()
-                    chmsg = "(%s): Removed." % fname
+                skip = 0
+                skip2 = False
+                ismd = False
+                ismddefine = False
+                mdarg = 0
+                ispk = False
+                iscipher = False
+                iscryptostart = False
+                iscomma = False
+                skip_statement = False
+                skip_comma = False
+                if isc:
+                    modname = "gcry_%s" % removesuffix(removesuffix(cipher_file, ".c"),
+                                                       "-glue").replace("-", "_")
+                for line in f:
+                    if skip_statement:
+                        if not re.search (";", line) is None:
+                            skip_statement = False
+                        continue
+                    if skip > 0:
+                        if line[0] == "}":
+                            skip = skip - 1
+                        continue
+                    if skip2:
+                        if not re.search (" *};", line) is None:
+                            skip2 = False
+                        continue
+                    if iscryptostart:
+                        s = re.search (" *\"([A-Z0-9_a-z-]*)\"", line)
+                        if not s is None:
+                            sg = s.groups()[0]
+                            cryptolist.write (("%s: %s\n") % (sg, modname))
+                            iscryptostart = False
+                    if ismd:
+                        spl = line.split (",")
+                        if mdarg + len (spl) > 9 and mdarg <= 9 and ("sizeof" in spl[9-mdarg]):
+                            mdctxsizes.append (spl[9-mdarg].lstrip ().rstrip())
+                        mdarg = mdarg + len (spl) - 1
+                    if ismd or iscipher or ispk:
+                        if not re.search (" *};", line) is None:
+                            escapenl = " \\" if ismddefine else ""
+                            if not iscomma:
+                                fw.write ("    ,%s\n" % escapenl)
+                            fw.write ("    GRUB_UTIL_MODNAME(\"%s\")%s\n" % (modname, escapenl))
+                            if ismd:
+                                if mdname not in mdblocksizes:
+                                    print ("ERROR: Unknown digest blocksize: %s\n"
+                                           % mdname)
+                                    exit (1)
+                                fw.write ("    .blocksize = %s%s\n"
+                                          % (mdblocksizes [mdname], escapenl))
+                            ismd = False
+                            ismddefine = False
+                            mdarg = 0
+                            iscipher = False
+                            ispk = False
+                        iscomma = not re.search (",$", line) is None
+                    # Used only for selftests.
+                    m = re.match (r"(static byte|static unsigned char|static const gcry_md_spec_t \* const) (weak_keys_chksum|digest_list)\[[0-9]*\] =", line)
+                    if not m is None:
+                        skip = 1
+                        fname = m.groups ()[1]
+                        chmsg = "(%s): Removed." % fname
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    if (not hold) and (re.match (r"[ \t]*(run_selftests|do_tripledes_set_extra_info),?", line) is not None):
+                        iscomma = True
+                        line = ""
+                    if hold:
+                        hold = False
+                        # We're optimising for size and exclude anything needing good
+                        # randomness.
+                        if re.match ("(_gcry_hash_selftest_check_one|bulk_selftest_setkey|run_selftests|do_tripledes_set_extra_info|selftest|sm4_selftest|_gcry_[a-z0-9_]*_hash_buffers|_gcry_sha1_hash_buffer|tripledes_set2keys|_gcry_rmd160_mixblock|serpent_test|dsa_generate_ext|test_keys|gen_k|sign|gen_x931_parm_xp|generate_x931|generate_key|dsa_generate|dsa_sign|ecc_sign|generate|generate_fips186|_gcry_register_pk_dsa_progress|_gcry_register_pk_ecc_progress|progress|scanval|ec2os|ecc_generate_ext|ecc_generate|ecc_get_param|_gcry_register_pk_dsa_progress|gen_x931_parm_xp|gen_x931_parm_xi|rsa_decrypt|rsa_sign|rsa_generate_ext|rsa_generate|secret|check_exponent|rsa_blind|rsa_unblind|extract_a_from_sexp|curve_free|curve_copy|point_set|_gcry_dsa_gen_rfc6979_k|bits2octets|int2octets|_gcry_md_debug|_gcry_md_selftest|_gcry_md_is_enabled|_gcry_md_is_secure|_gcry_md_init|_gcry_md_info|md_get_algo|md_extract|_gcry_md_get |_gcry_md_get_algo |_gcry_md_extract|_gcry_md_setkey|md_setkey|prepare_macpads|_gcry_md_algo_name|search_oid|spec_from_oid|spec_from_name|spec_from_algo|map_algo|cshake_hash_buffers|blake2b_vl_hash|selftest_seq)", line) is not None:
+
+                            skip = 1
+                            if not re.match ("selftest", line) is None and cipher_file == "idea.c":
+                                skip = 3
+
+                            if not re.match ("serpent_test", line) is None:
+                                fw.write ("static const char *serpent_test (void) { return 0; }\n")
+                            if not re.match ("sm4_selftest", line) is None:
+                                fw.write ("static const char *sm4_selftest (void) { return 0; }\n")
+                            hash_buf = re.match ("(_gcry_[a-z0-9_]*_hash_buffers)", line)
+                            if hash_buf is not None:
+                                fw.write ("#define %s 0" % (hash_buf.group(0)))
+                            if not re.match ("dsa_generate", line) is None:
+                                fw.write ("#define dsa_generate 0")
+                            if not re.match ("ecc_generate", line) is None:
+                                fw.write ("#define ecc_generate 0")
+                            if not re.match ("rsa_generate ", line) is None:
+                                fw.write ("#define rsa_generate 0")
+                            if not re.match ("rsa_sign", line) is None:
+                                fw.write ("#define rsa_sign 0")
+                            if not re.match ("rsa_decrypt", line) is None:
+                                fw.write ("#define rsa_decrypt 0")
+                            if not re.match ("dsa_sign", line) is None:
+                                fw.write ("#define dsa_sign 0")
+                            if not re.match ("ecc_sign", line) is None:
+                                fw.write ("#define ecc_sign 0")
+                            if not re.match ("search_oid", line) is None:
+                                fw.write ("#define search_oid(a,b) grub_crypto_lookup_md_by_oid(a)")
+                            if not re.match ("spec_from_name", line) is None:
+                                fw.write ("#define spec_from_name grub_crypto_lookup_md_by_name")
+                            fname = re.match ("[a-zA-Z0-9_]*", line).group ()
+                            chmsg = "(%s): Removed." % fname
+                            if nch:
+                                chlognew = "%s\n	%s" % (chlognew, chmsg)
+                            else:
+                                chlognew = "%s %s" % (chlognew, chmsg)
+                                nch = True
+                            continue
+                        else:
+                            fw.write (holdline)
+                    m = re.match ("# *include <(.*)>", line)
+                    if not m is None:
+                        chmsg = "Removed including of %s" % m.groups ()[0]
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s: %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match ("(const )?gcry_cipher_spec_t", line)
+                    if isc and not m is None:
+                        assert not ismd
+                        assert not ispk
+                        assert not iscipher
+                        assert not iscryptostart
+                        ciphername = removeprefix(removeprefix(line, "const "),
+                                                  "gcry_cipher_spec_t").strip ()
+                        ciphername = re.match("[a-zA-Z0-9_]*",ciphername).group ()
+                        ciphernames.append (ciphername)
+                        iscipher = True
+                        iscryptostart = True
+
+                    m = re.match ("(const )?gcry_pk_spec_t", line)
+                    if isc and not m is None:
+                        assert not ismd
+                        assert not ispk
+                        assert not iscipher
+                        assert not iscryptostart
+                        pkname = removeprefix(removeprefix(line, "const "), "gcry_pk_spec_t").strip ()
+                        pkname = re.match("[a-zA-Z0-9_]*",pkname).group ()
+                        pknames.append (pkname)
+                        ispk = True
+                        iscryptostart = True
+
+                    m = re.match (r"DEFINE_BLAKE2_VARIANT\((.), (.), ([0-9]*)", line)
+                    if isc and not m is None:
+                        bs = m.groups()[0]
+                        bits = m.groups()[2]
+                        mdname = "_gcry_digest_spec_blake2%s_%s" % (bs, bits)
+                        mdnames.append (mdname)
+
+                    m = re.match ("(const )?gcry_md_spec_t", line)
+                    if isc and not m is None:
+                        assert not ismd
+                        assert not ispk
+                        assert not iscipher
+                        assert not iscryptostart
+                        line = removeprefix(line, "const ")
+                        mdname = removeprefix(removeprefix(line, "const "), "gcry_md_spec_t").strip ()
+                        mdname = re.match("[a-zA-Z0-9_]*",mdname).group ()
+                        mdnames.append (mdname)
+                        ismd = True
+                        ismddefine = False
+                        mdarg = 0
+                        iscryptostart = True
+                    m = re.match ("  (const )?gcry_md_spec_t _gcry_digest_spec_blake2.*\\\\", line)
+                    if isc and not m is None:
+                        assert not ismd
+                        assert not ispk
+                        assert not iscipher
+                        assert not iscryptostart
+                        line = removeprefix(line, "  const ")
+                        ismd = True
+                        ismddefine = True
+                        mdname = "_gcry_digest_spec_blake2"
+                        mdarg = 0
+                        iscryptostart = True
+                    m = re.match (r"static const char \*selftest.*;$", line)
+                    if not m is None:
+                        fname = line[len (r"static const char \*"):]
+                        fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
+                        chmsg = "(%s): Removed declaration." % fname
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match ("static gcry_mpi_t gen_k .*;$", line)
+                    if not m is None:
+                        chmsg = "(gen_k): Removed declaration."
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match ("static (int|void) test_keys .*;$", line)
+                    if not m is None:
+                        chmsg = "(test_keys): Removed declaration."
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match ("static void secret .*;$", line)
+                    if not m is None:
+                        chmsg = "(secret): Removed declaration."
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match (r"static void \(\*progress_cb\).*;$", line)
+                    if not m is None:
+                        chmsg = "(progress_cb): Removed declaration."
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match (r"static void \*progress_cb_data.*;$", line)
+                    if not m is None:
+                        chmsg = "(progress_cb): Removed declaration."
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+
+                    m = re.match (r"((static )?const char( |)\*|static const gcry_md_spec_t \*|(static )?gpg_err_code_t|gpg_error_t|void|(static )?int|(static )?unsigned int|(static )?gcry_err_code_t|static gcry_mpi_t|static void|void|static elliptic_curve_t) *$", line)
+                    if not m is None:
+                        hold = True
+                        holdline = line
+                        continue
+                    m = re.match (r"static int tripledes_set2keys \(.*\);", line)
+                    if not m is None:
+                        continue
+                    m = re.match (r"static int tripledes_set3keys \(.*\);", line)
+                    if not m is None:
+                        continue
+                    m = re.match (r"static int tripledes_set2keys \(", line)
+                    if not m is None:
+                        skip_statement = True
+                        continue
+                    m = re.match (r"static int tripledes_set3keys \(", line)
+                    if not m is None:
+                        skip_statement = True
+                        continue
+                    m = re.match ("static const char sample_secret_key", line)
+                    if not m is None:
+                        skip_statement = True
+                        continue
+                    m = re.match ("static const char sample_public_key", line)
+                    if not m is None:
+                        skip_statement = True
+                        continue
+                    m = re.match ("static void sign|static gpg_err_code_t sign|static gpg_err_code_t generate",
+                                  line)
+                    if not m is None:
+                        skip_statement = True
+                        continue
+
+                    m = re.match ("cipher_extra_spec_t", line)
+                    if isc and not m is None:
+                        skip2 = True
+                        fname = line[len ("cipher_extra_spec_t "):]
+                        fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
+                        chmsg = "(%s): Removed." % fname
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match ("pk_extra_spec_t", line)
+                    if isc and not m is None:
+                        skip2 = True
+                        fname = line[len ("pk_extra_spec_t "):]
+                        fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
+                        chmsg = "(%s): Removed." % fname
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    m = re.match ("md_extra_spec_t", line)
+                    if isc and not m is None:
+                        skip2 = True
+                        fname = line[len ("md_extra_spec_t "):]
+                        fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
+                        chmsg = "(%s): Removed." % fname
+                        if nch:
+                            chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        else:
+                            chlognew = "%s %s" % (chlognew, chmsg)
+                            nch = True
+                        continue
+                    fw.write (line)
+                if len (ciphernames) > 0 or len (mdnames) > 0 or len (pknames) > 0:
+                    modfiles = [cipher_file]
+                    if modname in extra_files:
+                        modfiles += extra_files[modname]
+                    if len (ciphernames) > 0 or len (mdnames) > 0:
+                        modules_sym_md.append (modname)
+                    chmsg = "(GRUB_MOD_INIT(%s)): New function\n" % modname
                     if nch:
                         chlognew = "%s\n	%s" % (chlognew, chmsg)
                     else:
-                        chlognew = "%s %s" % (chlognew, chmsg)
-                        nch = True                        
-                    continue
-                else:
-                    fw.write (holdline)
-            m = re.match ("# *include <(.*)>", line)
-            if not m is None:
-                chmsg = "Removed including of %s" % m.groups ()[0]
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s: %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            m = re.match ("(const )?gcry_cipher_spec_t", line)
-            if isc and not m is None:
-                assert (not ismd)
-                assert (not ispk)
-                assert (not iscipher)
-                assert (not iscryptostart)
-                ciphername = removeprefix(removeprefix(line, "const "), "gcry_cipher_spec_t").strip ()
-                ciphername = re.match("[a-zA-Z0-9_]*",ciphername).group ()
-                ciphernames.append (ciphername)
-                iscipher = True
-                iscryptostart = True
-
-            m = re.match ("(const )?gcry_pk_spec_t", line)
-            if isc and not m is None:
-                assert (not ismd)
-                assert (not ispk)
-                assert (not iscipher)
-                assert (not iscryptostart)
-                pkname = removeprefix(removeprefix(line, "const "), "gcry_pk_spec_t").strip ()
-                pkname = re.match("[a-zA-Z0-9_]*",pkname).group ()
-                pknames.append (pkname)
-                ispk = True
-                iscryptostart = True
-
-            m = re.match (r"DEFINE_BLAKE2_VARIANT\((.), (.), ([0-9]*)", line)
-            if isc and not m is None:
-                bs = m.groups()[0]
-                bits = m.groups()[2]
-                mdname = "_gcry_digest_spec_blake2%s_%s" % (bs, bits)
-                mdnames.append (mdname)
-
-            m = re.match ("(const )?gcry_md_spec_t", line)
-            if isc and not m is None:
-                assert (not ismd)
-                assert (not ispk)
-                assert (not iscipher)
-                assert (not iscryptostart)
-                line = removeprefix(line, "const ")
-                mdname = removeprefix(removeprefix(line, "const "), "gcry_md_spec_t").strip ()
-                mdname = re.match("[a-zA-Z0-9_]*",mdname).group ()
-                mdnames.append (mdname)
-                ismd = True
-                ismddefine = False
-                mdarg = 0
-                iscryptostart = True
-            m = re.match ("  (const )?gcry_md_spec_t _gcry_digest_spec_blake2.*\\\\", line)
-            if isc and not m is None:
-                assert (not ismd)
-                assert (not ispk)
-                assert (not iscipher)
-                assert (not iscryptostart)
-                line = removeprefix(line, "  const ")
-                ismd = True
-                ismddefine = True
-                mdname = "_gcry_digest_spec_blake2"
-                mdarg = 0
-                iscryptostart = True
-            m = re.match (r"static const char \*selftest.*;$", line)
-            if not m is None:
-                fname = line[len (r"static const char \*"):]
-                fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
-                chmsg = "(%s): Removed declaration." % fname
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            m = re.match ("static gcry_mpi_t gen_k .*;$", line)
-            if not m is None:
-                chmsg = "(gen_k): Removed declaration."
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            m = re.match ("static (int|void) test_keys .*;$", line)
-            if not m is None:
-                chmsg = "(test_keys): Removed declaration."
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            m = re.match ("static void secret .*;$", line)
-            if not m is None:
-                chmsg = "(secret): Removed declaration."
-                if nch:
+                        chlognew = "%s%s" % (chlognew, chmsg)
+                        nch = True
+                    fw.write ("\n\nGRUB_MOD_INIT(%s)\n" % modname)
+                    fw.write ("{\n")
+                    for ciphername in ciphernames:
+                        chmsg = "Register cipher %s" % ciphername
+                        chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        fw.write ("  grub_cipher_register (&%s);\n" % ciphername)
+                    for ctxsize in mdctxsizes:
+                        fw.write ("  COMPILE_TIME_ASSERT(%s <= GRUB_CRYPTO_MAX_MD_CONTEXT_SIZE);\n" % ctxsize)
+                    for mdname in mdnames:
+                        chmsg = "Register digest %s" % mdname
+                        chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        fw.write ("  grub_md_register (&%s);\n" % mdname)
+                    for pkname in pknames:
+                        chmsg = "Register pk %s" % pkname
+                        chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        fw.write ("  grub_crypto_pk_%s = &%s;\n"
+                                  % (pkname.replace ("_gcry_pubkey_spec_", ""), pkname))
+                    fw.write ("}")
+                    chmsg = "(GRUB_MOD_FINI(%s)): New function\n" % modname
                     chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
+                    fw.write ("\n\nGRUB_MOD_FINI(%s)\n" % modname)
+                    fw.write ("{\n")
+                    for ciphername in ciphernames:
+                        chmsg = "Unregister cipher %s" % ciphername
+                        chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        fw.write ("  grub_cipher_unregister (&%s);\n" % ciphername)
+                    for mdname in mdnames:
+                        chmsg = "Unregister MD %s" % mdname
+                        chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        fw.write ("  grub_md_unregister (&%s);\n" % mdname)
+                    for pkname in pknames:
+                        chmsg = "Unregister pk %s" % pkname
+                        chlognew = "%s\n	%s" % (chlognew, chmsg)
+                        fw.write ("  grub_crypto_pk_%s = 0;\n"
+                                  % (pkname.replace ("_gcry_pubkey_spec_", "")))
+                    fw.write ("}\n")
+                    conf.write ("module = {\n")
+                    conf.write ("  name = %s;\n" % modname)
+                    for src in modfiles:
+                        conf.write ("  common = lib/libgcrypt-grub/cipher/%s;\n" % src)
+                        if len (ciphernames) > 0 or len (mdnames) > 0:
+                            confutil.write ("  common = grub-core/lib/libgcrypt-grub/cipher/%s;\n" % src)
+                    if modname == "gcry_ecc":
+                        conf.write ("  common = lib/libgcrypt-grub/mpi/ec.c;\n")
+                        conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls';\n")
+                    elif modname in ["gcry_rijndael", "gcry_md4", "gcry_md5", "gcry_rmd160", "gcry_sha1", "gcry_sha256", "gcry_sha512", "gcry_tiger"]:
+                        # Alignment checked by hand
+                        conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-cast-align';\n")
+                    else:
+                        conf.write ("  cflags = '$(CFLAGS_GCRY)';\n")
+                    conf.write ("  cppflags = '$(CPPFLAGS_GCRY)';\n")
+                    conf.write ("};\n\n")
+                    if nch:
+                        chlog = "%s%s\n" % (chlog, chlognew)
+                elif isc and cipher_file not in extra_files_list:
+                    print ("WARNING: C file isn't a module: %s" % cipher_file)
+                    os.remove (outfile)
+                    chlog = "%s\n	* %s: Removed" % (chlog, cipher_file)
                 continue
-            m = re.match (r"static void \(\*progress_cb\).*;$", line)
-            if not m is None:
-                chmsg = "(progress_cb): Removed declaration."
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
+        chlog = "%s%sSkipped unknown file\n" % (chlog, chlognew)
+        print ("WARNING: unknown file %s" % cipher_file)
+
+    for src in sorted (os.listdir (os.path.join (indir, "src"))):
+        if src in ["versioninfo.rc.in", "ath.c", "ChangeLog-2011",
+                   "dumpsexp.c", "fips.c", "gcrypt.h.in",
+                   "gcryptrnd.c", "getrandom.c",
+                   "global.c", "hmac256.c",
+                   "hwfeatures.c", "libgcrypt-config.in",
+                   "libgcrypt.def", "libgcrypt.m4",
+                   "libgcrypt.vers", "Makefile.am",
+                   "Manifest", "misc.c",
+                   "missing-string.c", "module.c",
+                   "secmem.c",
+                   "stdmem.c", "visibility.c"]:
+            continue
+        outfile = os.path.join (basedir, "src", src)
+        infile = os.path.join (indir, "src", src)
+        if os.path.isdir (infile):
+            continue
+        with codecs.open (outfile, "w", "utf-8") as fw:
+            if src == "gcrypt-module.h":
                 continue
-            m = re.match (r"static void \*progress_cb_data.*;$", line)
-            if not m is None:
-                chmsg = "(progress_cb): Removed declaration."
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
+            if src == "visibility.h":
+                fw.write ("# include <grub/gcrypt/gcrypt.h>\n")
                 continue
+            with codecs.open (infile, "r", "utf-8") as f:
+                if src == "types.h":
+                    fw.write (f.read ().replace ("float f;", "").replace ("double g;", ""))
+                    continue
 
-            m = re.match (r"((static )?const char( |)\*|static const gcry_md_spec_t \*|(static )?gpg_err_code_t|gpg_error_t|void|(static )?int|(static )?unsigned int|(static )?gcry_err_code_t|static gcry_mpi_t|static void|void|static elliptic_curve_t) *$", line)
-            if not m is None:
-                hold = True
-                holdline = line
-                continue
-            m = re.match (r"static int tripledes_set2keys \(.*\);", line)
-            if not m is None:
-                continue
-            m = re.match (r"static int tripledes_set3keys \(.*\);", line)
-            if not m is None:
-                continue
-            m = re.match (r"static int tripledes_set2keys \(", line)
-            if not m is None:
-                skip_statement = True
-                continue
-            m = re.match (r"static int tripledes_set3keys \(", line)
-            if not m is None:
-                skip_statement = True
-                continue
-            m = re.match ("static const char sample_secret_key", line)
-            if not m is None:
-                skip_statement = True
-                continue
-            m = re.match ("static const char sample_public_key", line)
-            if not m is None:
-                skip_statement = True
-                continue
-            m = re.match ("static void sign|static gpg_err_code_t sign|static gpg_err_code_t generate",
-                          line)
-            if not m is None:
-                skip_statement = True
-                continue
+                if src == "cipher-proto.h":
+                    fw.write("#include <grub/crypto.h>\n")
+                    fw.write("typedef gcry_selftest_func_t selftest_func_t;")
+                    continue
 
-            m = re.match ("cipher_extra_spec_t", line)
-            if isc and not m is None:
-                skip2 = True
-                fname = line[len ("cipher_extra_spec_t "):]
-                fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
-                chmsg = "(%s): Removed." % fname
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            m = re.match ("pk_extra_spec_t", line)
-            if isc and not m is None:
-                skip2 = True
-                fname = line[len ("pk_extra_spec_t "):]
-                fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
-                chmsg = "(%s): Removed." % fname
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            m = re.match ("md_extra_spec_t", line)
-            if isc and not m is None:
-                skip2 = True
-                fname = line[len ("md_extra_spec_t "):]
-                fname = re.match ("[a-zA-Z0-9_]*", fname).group ()
-                chmsg = "(%s): Removed." % fname
-                if nch:
-                    chlognew = "%s\n	%s" % (chlognew, chmsg)
-                else:
-                    chlognew = "%s %s" % (chlognew, chmsg)
-                    nch = True
-                continue
-            fw.write (line)
-        if len (ciphernames) > 0 or len (mdnames) > 0 or len (pknames) > 0:
-            modfiles = [cipher_file]
-            if modname in extra_files.keys():
-                modfiles += extra_files[modname]
-            if len (ciphernames) > 0 or len (mdnames) > 0:
-                modules_sym_md.append (modname)
-            chmsg = "(GRUB_MOD_INIT(%s)): New function\n" % modname
-            if nch:
-                chlognew = "%s\n	%s" % (chlognew, chmsg)
-            else:
-                chlognew = "%s%s" % (chlognew, chmsg)
-                nch = True
-            fw.write ("\n\nGRUB_MOD_INIT(%s)\n" % modname)
-            fw.write ("{\n")
-            for ciphername in ciphernames:
-                chmsg = "Register cipher %s" % ciphername
-                chlognew = "%s\n	%s" % (chlognew, chmsg)
-                fw.write ("  grub_cipher_register (&%s);\n" % ciphername)
-            for ctxsize in mdctxsizes:
-                fw.write ("  COMPILE_TIME_ASSERT(%s <= GRUB_CRYPTO_MAX_MD_CONTEXT_SIZE);\n" % ctxsize)
-            for mdname in mdnames:
-                chmsg = "Register digest %s" % mdname
-                chlognew = "%s\n	%s" % (chlognew, chmsg)
-                fw.write ("  grub_md_register (&%s);\n" % mdname)
-            for pkname in pknames:
-                chmsg = "Register pk %s" % pkname
-                chlognew = "%s\n	%s" % (chlognew, chmsg)
-                fw.write ("  grub_crypto_pk_%s = &%s;\n"
-                          % (pkname.replace ("_gcry_pubkey_spec_", ""), pkname))
-            fw.write ("}")
-            chmsg = "(GRUB_MOD_FINI(%s)): New function\n" % modname
-            chlognew = "%s\n	%s" % (chlognew, chmsg)
-            fw.write ("\n\nGRUB_MOD_FINI(%s)\n" % modname)
-            fw.write ("{\n")
-            for ciphername in ciphernames:
-                chmsg = "Unregister cipher %s" % ciphername
-                chlognew = "%s\n	%s" % (chlognew, chmsg)
-                fw.write ("  grub_cipher_unregister (&%s);\n" % ciphername)
-            for mdname in mdnames:
-                chmsg = "Unregister MD %s" % mdname
-                chlognew = "%s\n	%s" % (chlognew, chmsg)
-                fw.write ("  grub_md_unregister (&%s);\n" % mdname)
-            for pkname in pknames:
-                chmsg = "Unregister pk %s" % pkname
-                chlognew = "%s\n	%s" % (chlognew, chmsg)
-                fw.write ("  grub_crypto_pk_%s = 0;\n"
-                          % (pkname.replace ("_gcry_pubkey_spec_", "")))
-            fw.write ("}\n")
-            conf.write ("module = {\n")
-            conf.write ("  name = %s;\n" % modname)
-            for src in modfiles:
-                conf.write ("  common = lib/libgcrypt-grub/cipher/%s;\n" % src)
-                if len (ciphernames) > 0 or len (mdnames) > 0:
-                    confutil.write ("  common = grub-core/lib/libgcrypt-grub/cipher/%s;\n" % src)
-            if modname == "gcry_ecc":
-                conf.write ("  common = lib/libgcrypt-grub/mpi/ec.c;\n")
-                conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls';\n")
-            elif modname == "gcry_rijndael" or modname == "gcry_md4" or modname == "gcry_md5" or modname == "gcry_rmd160" or modname == "gcry_sha1" or modname == "gcry_sha256" or modname == "gcry_sha512" or modname == "gcry_tiger":
-                # Alignment checked by hand
-                conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-cast-align';\n");
-            else:
-                conf.write ("  cflags = '$(CFLAGS_GCRY)';\n");
-            conf.write ("  cppflags = '$(CPPFLAGS_GCRY)';\n");
-            conf.write ("};\n\n")
-            f.close ()
-            fw.close ()
-            if nch:
-                chlog = "%s%s\n" % (chlog, chlognew)
-        elif isc and cipher_file not in extra_files_list:
-            print ("WARNING: C file isn't a module: %s" % cipher_file)
-            f.close ()
-            fw.close ()
-            os.remove (outfile)
-            chlog = "%s\n	* %s: Removed" % (chlog, cipher_file)
-        continue
-    chlog = "%s%sSkipped unknown file\n" % (chlog, chlognew)
-    print ("WARNING: unknown file %s" % cipher_file)
-
-cryptolist.close ()
-
-for src in sorted (os.listdir (os.path.join (indir, "src"))):
-    if src == "versioninfo.rc.in" or src == "ath.c" or src == "ChangeLog-2011" \
-            or src == "dumpsexp.c" or src == "fips.c" or src == "gcrypt.h.in" \
-            or src == "gcryptrnd.c"or src == "getrandom.c" \
-            or src == "global.c" or src == "hmac256.c" \
-            or src == "hwfeatures.c" or src == "libgcrypt-config.in" \
-            or src == "libgcrypt.def" or src == "libgcrypt.m4" \
-            or src == "libgcrypt.vers" or src == "Makefile.am" \
-            or src == "Manifest" or src == "misc.c" \
-            or src == "missing-string.c" or src == "module.c" \
-            or src == "secmem.c" \
-            or src == "stdmem.c" or src == "visibility.c":
-        continue
-    outfile = os.path.join (basedir, "src", src)
-    infile = os.path.join (indir, "src", src)
-    if os.path.isdir (infile):
-        continue
-    fw = codecs.open (outfile, "w", "utf-8")
-    if src == "gcrypt-module.h":
-        fw.close ()
-        continue
-    if src == "visibility.h":
-        fw.write ("# include <grub/gcrypt/gcrypt.h>\n")
-        fw.close ()
-        continue
-    f = codecs.open (infile, "r", "utf-8")
-    if src == "types.h":
-        fw.write (f.read ().replace ("float f;", "").replace ("double g;", ""))
-        f.close ()
-        fw.close ()
-        continue
-
-    if src == "cipher-proto.h":
-        fw.write("#include <grub/crypto.h>\n")
-        fw.write("typedef gcry_selftest_func_t selftest_func_t;")
-        f.close ()
-        fw.close ()
-        continue
-
-    if src == "g10lib.h":
-        fw.write("#include <cipher_wrap.h>\n")
-        fw.write("#include <grub/crypto.h>\n")
-        fw.write("#include <stdlib.h>\n")
-        fw.write (f.read ().replace ("(printf,f,a)", "(__printf__,f,a)").replace ("#include \"../compat/libcompat.h\"", "").replace("#define N_(a) (a)", ""))
-        f.close ()
-        fw.close ()
-        continue
-
-    fw.write (f.read ())
-    f.close ()
-    fw.close ()
-
-for src in sorted (os.listdir (os.path.join (indir, "mpi"))):
-    if src == "config.links" or src == "ChangeLog-2011" \
-            or src == "Manifest" \
-            or src == "Makefile.am":
-        continue
-    infile = os.path.join (indir, "mpi", src)
-    outfile = os.path.join (basedir, "mpi", src)
-    if os.path.isdir (infile):
-        continue
-    f = codecs.open (infile, "r", "utf-8")
-    fw = codecs.open (outfile, "w", "utf-8")
-    fw.write ("/* This file was automatically imported with \n")
-    fw.write ("   import_gcry.py. Please don't modify it */\n")
-    hold = False
-    skip = 0
-    for line in f:
-        if skip > 0:
-            if line[0] == "}":
-                skip = skip - 1
-            continue
-        if hold:
-            hold = False
-            # We're optimising for size and exclude anything needing good
-            # randomness.
-            if not re.match ("(_gcry_mpi_get_hw_config|gcry_mpi_randomize|_gcry_mpi_randomize)", line) is None:
-                skip = 1
-                continue
-            else:
-                fw.write (holdline)
-        m = re.match (r"(const char( |)\*|void) *$", line)
-        if not m is None:
-            hold = True
-            holdline = line
+                if src == "g10lib.h":
+                    fw.write("#include <cipher_wrap.h>\n")
+                    fw.write("#include <grub/crypto.h>\n")
+                    fw.write("#include <stdlib.h>\n")
+                    fw.write (f.read ().replace ("(printf,f,a)", "(__printf__,f,a)").replace ("#include \"../compat/libcompat.h\"", "").replace("#define N_(a) (a)", ""))
+                    continue
+
+                fw.write (f.read ())
+
+    for src in sorted (os.listdir (os.path.join (indir, "mpi"))):
+        if src in ["config.links", "ChangeLog-2011", "Manifest", "Makefile.am"]:
             continue
-        m = re.match (r"#include \"mod-source-info\.h\"", line)
-        if not m is None:
+        infile = os.path.join (indir, "mpi", src)
+        outfile = os.path.join (basedir, "mpi", src)
+        if os.path.isdir (infile):
             continue
-        fw.write (line)
-
-chlog = "%s	* crypto.lst: New file.\n" % chlog
-
-outfile = os.path.join (cipher_dir_out, "types.h")
-fw=codecs.open (outfile, "w", "utf-8")
-fw.write ("#include <grub/types.h>\n")
-fw.write ("#include <cipher_wrap.h>\n")
-chlog = "%s	* types.h: New file.\n" % chlog
-fw.close ()
-
-outfile = os.path.join (cipher_dir_out, "memory.h")
-fw=codecs.open (outfile, "w", "utf-8")
-fw.write ("#include <cipher_wrap.h>\n")
-chlog = "%s	* memory.h: New file.\n" % chlog
-fw.close ()
-
-
-outfile = os.path.join (cipher_dir_out, "cipher.h")
-fw=codecs.open (outfile, "w", "utf-8")
-fw.write ("#include <grub/crypto.h>\n")
-fw.write ("#include <cipher_wrap.h>\n")
-chlog = "%s	* cipher.h: Likewise.\n" % chlog
-fw.close ()
-
-outfile = os.path.join (cipher_dir_out, "g10lib.h")
-fw=codecs.open (outfile, "w", "utf-8")
-fw.write ("#include <cipher_wrap.h>\n")
-chlog = "%s	* g10lib.h: Likewise.\n" % chlog
-fw.close ()
-
-conf.close ();
-
-initfile = codecs.open (os.path.join (cipher_dir_out, "init.c"), "w", "utf-8")
-initfile.write ("#include <grub/crypto.h>\n")
-for module in modules_sym_md:
-    initfile.write ("extern void grub_%s_init (void);\n" % module)
-    initfile.write ("extern void grub_%s_fini (void);\n" % module)
-initfile.write ("\n")
-initfile.write ("void\n")
-initfile.write ("grub_gcry_init_all (void)\n")
-initfile.write ("{\n")
-for module in modules_sym_md:
-    initfile.write ("  grub_%s_init ();\n" % module)
-initfile.write ("}\n")
-initfile.write ("\n")
-initfile.write ("void\n")
-initfile.write ("grub_gcry_fini_all (void)\n")
-initfile.write ("{\n")
-for module in modules_sym_md:
-    initfile.write ("  grub_%s_fini ();\n" % module)
-initfile.write ("}\n")
-initfile.close ()
-
-confutil.write ("  common = grub-core/lib/libgcrypt-grub/cipher/init.c;\n")
-confutil.write ("};\n");
-confutil.close ();
+        with codecs.open (infile, "r", "utf-8") as f, codecs.open (outfile, "w", "utf-8") as fw:
+            fw.write ("/* This file was automatically imported with \n")
+            fw.write ("   import_gcry.py. Please don't modify it */\n")
+            hold = False
+            holdline = ""
+            skip = 0
+            for line in f:
+                if skip > 0:
+                    if line[0] == "}":
+                        skip = skip - 1
+                    continue
+                if hold:
+                    hold = False
+                    # We're optimising for size and exclude anything needing good
+                    # randomness.
+                    if not re.match ("(_gcry_mpi_get_hw_config|gcry_mpi_randomize|_gcry_mpi_randomize)", line) is None:
+                        skip = 1
+                        continue
+                    else:
+                        fw.write (holdline)
+                m = re.match (r"(const char( |)\*|void) *$", line)
+                if not m is None:
+                    hold = True
+                    holdline = line
+                    continue
+                m = re.match (r"#include \"mod-source-info\.h\"", line)
+                if not m is None:
+                    continue
+                fw.write (line)
+
+    chlog = "%s	* crypto.lst: New file.\n" % chlog
+
+    outfile = os.path.join (cipher_dir_out, "types.h")
+    with codecs.open (outfile, "w", "utf-8") as fw:
+        fw.write ("#include <grub/types.h>\n")
+        fw.write ("#include <cipher_wrap.h>\n")
+        chlog = "%s	* types.h: New file.\n" % chlog
+
+    outfile = os.path.join (cipher_dir_out, "memory.h")
+    with codecs.open (outfile, "w", "utf-8") as fw:
+        fw.write ("#include <cipher_wrap.h>\n")
+        chlog = "%s	* memory.h: New file.\n" % chlog
+
+
+    outfile = os.path.join (cipher_dir_out, "cipher.h")
+    with codecs.open (outfile, "w", "utf-8") as fw:
+        fw.write ("#include <grub/crypto.h>\n")
+        fw.write ("#include <cipher_wrap.h>\n")
+        chlog = "%s	* cipher.h: Likewise.\n" % chlog
+
+    outfile = os.path.join (cipher_dir_out, "g10lib.h")
+    with codecs.open (outfile, "w", "utf-8") as fw:
+        fw.write ("#include <cipher_wrap.h>\n")
+        chlog = "%s	* g10lib.h: Likewise.\n" % chlog
+
+    conf.close ()
+
+    with codecs.open (os.path.join (cipher_dir_out, "init.c"), "w", "utf-8") as initfile:
+        initfile.write ("#include <grub/crypto.h>\n")
+        for module in modules_sym_md:
+            initfile.write ("extern void grub_%s_init (void);\n" % module)
+            initfile.write ("extern void grub_%s_fini (void);\n" % module)
+        initfile.write ("\n")
+        initfile.write ("void\n")
+        initfile.write ("grub_gcry_init_all (void)\n")
+        initfile.write ("{\n")
+        for module in modules_sym_md:
+            initfile.write ("  grub_%s_init ();\n" % module)
+        initfile.write ("}\n")
+        initfile.write ("\n")
+        initfile.write ("void\n")
+        initfile.write ("grub_gcry_fini_all (void)\n")
+        initfile.write ("{\n")
+        for module in modules_sym_md:
+            initfile.write ("  grub_%s_fini ();\n" % module)
+        initfile.write ("}\n")
+
+    confutil.write ("  common = grub-core/lib/libgcrypt-grub/cipher/init.c;\n")
+    confutil.write ("};\n")
+    confutil.close ()
 
 
 outfile = os.path.join (cipher_dir_out, "ChangeLog")
-fw=codecs.open (outfile, "w", "utf-8")
-dt = datetime.date.today ()
-fw.write ("%04d-%02d-%02d  Automatic import tool\n" % \
-          (dt.year,dt.month, dt.day))
-fw.write ("\n")
-fw.write ("	Imported ciphers to GRUB\n")
-fw.write ("\n")
-fw.write (chlog)
-fw.write ("\n")
-fw.close ()
+with codecs.open (outfile, "w", "utf-8") as fw:
+    dt = datetime.date.today ()
+    fw.write ("%04d-%02d-%02d  Automatic import tool\n" % \
+              (dt.year,dt.month, dt.day))
+    fw.write ("\n")
+    fw.write ("	Imported ciphers to GRUB\n")
+    fw.write ("\n")
+    fw.write (chlog)
+    fw.write ("\n")
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#8 lore raw

PATCH v11 8/14 Remove now unneeded gcrypt compilation flag

In reply to Vladimir Serbinenko

HAVE_STRTOUL is now defined in stdlib.h. Include it in g10lib.h rather than defining on command line

---
 conf/Makefile.common | 2 +-
 util/import_gcry.py  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
conf/Makefile.common +1 -1
index 5cada4568..0df4d6e7a 100644
@@ -82,7 +82,7 @@ CFLAGS_POSIX = -fno-builtin
 CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
 
 CFLAGS_GCRY = -Wno-error=sign-compare -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
-CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -D_GCRYPT_CONFIG_H_INCLUDED=1 -DHAVE_STRTOUL=1 -I$(top_srcdir)/include/grub/gcrypt
+CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -D_GCRYPT_CONFIG_H_INCLUDED=1 -I$(top_srcdir)/include/grub/gcrypt
 
 CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
 
util/import_gcry.py +1 -0
index 489356d37..1be18cf91 100644
@@ -617,6 +617,7 @@ for src in sorted (os.listdir (os.path.join (indir, "src"))):
     if src == "g10lib.h":
         fw.write("#include <cipher_wrap.h>\n")
         fw.write("#include <grub/crypto.h>\n")
+        fw.write("#include <stdlib.h>\n")
         fw.write (f.read ().replace ("(printf,f,a)", "(__printf__,f,a)").replace ("#include \"../compat/libcompat.h\"", "").replace("#define N_(a) (a)", ""))
         f.close ()
         fw.close ()
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#3 lore raw

PATCH v11 3/14 b64dec: Adjust for compilation in GRUB environment

In reply to Vladimir Serbinenko
---
 grub-core/lib/b64dec.c | 36 +++++++++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 11 deletions(-)
grub-core/lib/b64dec.c +25 -11
index 868d98568..8aafa9700 100644
@@ -26,7 +26,21 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "gpgrt-int.h"
+#include <grub/crypto.h>
+
+struct _gpgrt_b64state
+{
+  int idx;
+  int quad_count;
+  char *title;
+  unsigned char radbuf[4];
+  unsigned int crc;
+  gpg_err_code_t lasterr;
+  unsigned int flags;
+  unsigned int stop_seen:1;
+  unsigned int invalid_encoding:1;
+  unsigned int using_decoder:1;
+};
 
 
 /* The reverse base-64 list used for base-64 decoding. */
@@ -64,22 +78,22 @@ enum decoder_states
    string the decoder will skip everything until a "-----BEGIN " line
    has been seen, decoding ends at a "----END " line.  */
 gpgrt_b64state_t
-_gpgrt_b64dec_start (const char *title)
+gpgrt_b64dec_start (const char *title)
 {
   gpgrt_b64state_t state;
   char *t = NULL;
 
   if (title)
     {
-      t = xtrystrdup (title);
+      t = grub_strdup (title);
       if (!t)
         return NULL;
     }
 
-  state = xtrycalloc (1, sizeof (struct _gpgrt_b64state));
+  state = grub_calloc (1, sizeof (struct _gpgrt_b64state));
   if (!state)
     {
-      xfree (t);
+      grub_free (t);
       return NULL;
     }
 
@@ -100,7 +114,7 @@ _gpgrt_b64dec_start (const char *title)
 /* Do in-place decoding of base-64 data of LENGTH in BUFFER.  Stores the
    new length of the buffer at R_NBYTES. */
 gpg_err_code_t
-_gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length,
+gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length,
                     size_t *r_nbytes)
 {
   enum decoder_states ds = state->idx;
@@ -115,7 +129,7 @@ _gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length,
     {
       *r_nbytes = 0;
       state->lasterr = GPG_ERR_EOF;
-      xfree (state->title);
+      grub_free (state->title);
       state->title = NULL;
       return state->lasterr;
     }
@@ -241,7 +255,7 @@ _gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length,
             state->stop_seen = 1;
           break;
         default:
-          gpgrt_assert (!"invalid state");
+          grub_fatal ("invalid state");
         }
     }
 
@@ -257,7 +271,7 @@ _gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length,
 /* Return an error code in case an encoding error has been found
    during decoding. */
 gpg_err_code_t
-_gpgrt_b64dec_finish (gpgrt_b64state_t state)
+gpgrt_b64dec_finish (gpgrt_b64state_t state)
 {
   gpg_error_t err;
 
@@ -270,10 +284,10 @@ _gpgrt_b64dec_finish (gpgrt_b64state_t state)
     err = state->lasterr;
   else
     {
-      xfree (state->title);
+      grub_free (state->title);
       err = state->invalid_encoding? GPG_ERR_BAD_DATA : 0;
     }
-  xfree (state);
+  grub_free (state);
 
   return err;
 }
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel