From noloader at gmail.com Sun Feb 6 16:58:25 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Sun, 6 Feb 2022 10:58:25 -0500 Subject: Web server out of space Message-ID: Hi Everyone, I'm trying to read about bug T4717 (https://dev.gnupg.org/T4717). When I visit the bug report : Unhandled Exception ("AphrontQueryException") #1021: Disk full (/tmp/#sql-temptable-2232e2-1230f483-208a8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") Jeff From wk at gnupg.org Mon Feb 7 22:17:27 2022 From: wk at gnupg.org (Werner Koch) Date: Mon, 07 Feb 2022 22:17:27 +0100 Subject: [Announce] GnuPG 2.2.34 (LTS) released Message-ID: <87fsou8jh4.fsf@wheatstone.g10code.de> Hello! We are pleased to announce the availability of a new GnuPG LTS release: version 2.2.34. This release fixes a few minor problems and brings a few new options to ease user support and large scale installations. The LTS (long term support) series of GnuPG is guaranteed to be maintained at least until the end of 2024. See https://gnupg.org/download/index.html#end-of-life What is GnuPG ============= The GNU Privacy Guard (GnuPG, GPG) is a complete and free implementation of the OpenPGP and S/MIME standards. GnuPG allows to encrypt and sign data and communication, features a versatile key management system as well as access modules for public key directories. GnuPG itself is a command line tool with features for easy integration with other applications. The separate library GPGME provides a uniform API to use the GnuPG engine by software written in common programming languages. A wealth of frontend applications and libraries making use of GnuPG are available. As an universal crypto engine GnuPG provides support for S/MIME and Secure Shell in addition to OpenPGP. GnuPG can be freely used, modified and distributed under the terms of the GNU General Public License. Noteworthy changes in version 2.2.34 ==================================== * gpgconf: Backport the improved option reading and writing code from 2.3. [rG7a3a1ef370,T4788] * gpgconf: Do not list ignored options and mark forced options as read-only. [T5732] * gpgconf: Correctly show registry entries with --show-configs. [T5724] * gpgconf: Add command aliases -L, -K, and -R. [rGf16c535eee] * gpgconf: Tweak the use of the ldapserver option. [T5801] * gpgconf: Make "--launch gpg-agent" work again. [rG5a7ed6dd8f] * gpg: Accept Ed25519 private keys in modernized encoding. [T5120] * gpg: Fix adding the list of ultimate trusted keys. [T5742] * gpgsm: New option --ignore-cert-with-oid. [rGbcf446b70c] * dirmngr: Avoid initial delay on the first keyserver access in presence of --no-use-tor. [rGdde88897e2] * scdaemon: Also prefer Yubikeys if no reader port is given. [rG38c666ec3f] * agent: Make missing strings translatable and update German and Japanese translations. [T4777] * ssh: Fix adding an ed25519 key with a zero length comment. [T5794] * gpgtar: Create and handle extended headers to support long file names. [T5754] * Fix the creation of socket directories under Windows for non-ascii account names. [rG7d1215cb9c] * Improve the registry HKCU->HKLM fallback. [rG96db487a4d] * Prettify the --help output of most commands. Release-info: https://dev.gnupg.org/T5703 Getting the Software ==================== Please follow the instructions found at or read on: GnuPG 2.2.34 may be downloaded from one of the GnuPG mirror sites or direct from its primary FTP server. The list of mirrors can be found at . Note that GnuPG is not available at ftp.gnu.org. The GnuPG source code compressed using BZIP2 and its OpenPGP signature are available here: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.34.tar.bz2 (7082k) https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.34.tar.bz2.sig An installer for Windows without any graphical frontend except for a very minimal Pinentry tool is available here: https://gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.2.34_20220207.exe (4425k) https://gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.2.34_20220207.exe.sig The source used to build the Windows installer can be found in the same directory with a ".tar.xz" suffix. Please note that a new version of Gpg4win 3 will not be published. Gpg4win users should instead update to Gpg4win 4.0 which comes with the current stable branch of GnuPG. Checking the Integrity ====================== In order to check that the version of GnuPG which you are going to install is an original and unmodified one, you can do it in one of the following ways: * If you already have a version of GnuPG installed, you can simply verify the supplied signature. For example to verify the signature of the file gnupg-2.2.34.tar.bz2 you would use this command: gpg --verify gnupg-2.2.34.tar.bz2.sig gnupg-2.2.34.tar.bz2 This checks whether the signature file matches the source file. You should see a message indicating that the signature is good and made by one or more of the release signing keys. Make sure that this is a valid key, either by matching the shown fingerprint against a trustworthy list of valid release signing keys or by checking that the key has been signed by trustworthy other keys. See the end of this mail for information on the signing keys. * If you are not able to use an existing version of GnuPG, you have to verify the SHA-1 checksum. On Unix systems the command to do this is either "sha1sum" or "shasum". Assuming you downloaded the file gnupg-2.2.34.tar.bz2, you run the command like this: sha1sum gnupg-2.2.34.tar.bz2 and check that the output matches the next line: b931cc1aa287ad67b0efacb91e7b358bf4852278 gnupg-2.2.34.tar.bz2 1ba27aaa476c75b4be0a7d8958de722ccebc52da gnupg-w32-2.2.34_20220207.tar.xz a43d38390323022ea4af17336978855c9d553cee gnupg-w32-2.2.34_20220207.exe Internationalization ==================== This version of GnuPG has support for 26 languages with Chinese (traditional and simplified), Czech, French, German, Italian, Japanese, Norwegian, Polish, Russian, and Ukrainian being almost completely translated. Documentation and Support ========================= The file gnupg.info has the complete reference manual of the system. Separate man pages are included as well but they miss some of the details available only in thee manual. The manual is also available online at https://gnupg.org/documentation/manuals/gnupg/ or can be downloaded as PDF at https://gnupg.org/documentation/manuals/gnupg.pdf . You may also want to search the GnuPG mailing list archives or ask on the gnupg-users mailing list for advise on how to solve problems. Most of the new features are around for several years and thus enough public experience is available. https://wiki.gnupg.org has user contributed information around GnuPG and relate software. In case of build problems specific to this release please first check https://dev.gnupg.org/T5703 for updated information. Please consult the archive of the gnupg-users mailing list before reporting a bug: https://gnupg.org/documentation/mailing-lists.html. We suggest to send bug reports for a new release to this list in favor of filing a bug at https://bugs.gnupg.org. If you need commercial support go to https://gnupg.com or https://gnupg.org/service.html. If you are a developer and you need a certain feature for your project, please do not hesitate to bring it to the gnupg-devel mailing list for discussion. Thanks ====== Since 2001 maintenance and development of GnuPG is done by g10 Code GmbH and has mostly been financed by donations. Three full-time employed developers as well as two contractors exclusively work on GnuPG and closely related software like Libgcrypt, GPGME and Gpg4win. Fortunately, and this is still not common with free software, we have now established a way of financing the development while keeping all our software free and freely available for everyone. Our model is similar to the way RedHat manages RHEL and Fedora: Except for the actual binary of the MSI installer for Windows and client specific configuration files, all the software is available under the GNU GPL and other Open Source licenses. Thus customers may even build and distribute their own version of the software as long as they do not use our trademark GnuPG VS-Desktop?. We like to thank all the nice people who are helping the GnuPG project, be it testing, coding, translating, suggesting, auditing, administering the servers, spreading the word, answering questions on the mailing lists, or helping with donations. *Thank you all* Your GnuPG hackers p.s. This is an announcement only mailing list. Please send replies only to the gnupg-users'at'gnupg.org mailing list. List of Release Signing Keys: To guarantee that a downloaded GnuPG version has not been tampered by malicious entities we provide signature files for all tarballs and binary versions. The keys are also signed by the long term keys of their respective owners. Current releases are signed by one or more of these keys: rsa3072 2017-03-17 [expires: 2027-03-15] 5B80 C575 4298 F0CB 55D8 ED6A BCEF 7E29 4B09 2E28 Andre Heinecke (Release Signing Key) ed25519 2020-08-24 [expires: 2030-06-30] 6DAA 6E64 A76D 2840 571B 4902 5288 97B8 2640 3ADA Werner Koch (dist signing 2020) ed25519 2021-05-19 [expires: 2027-04-04] AC8E 115B F73E 2D8D 47FA 9908 E98E 9B2D 19C6 C8BD Niibe Yutaka (GnuPG Release Key) brainpoolP256r1 2021-10-15 [expires: 2029-12-31] 02F3 8DFF 731F F97C B039 A1DA 549E 695E 905B A208 GnuPG.com (Release Signing Key 2021) The keys are available at https://gnupg.org/signature_key.html and in any recently released GnuPG tarball in the file g10/distsigkey.gpg . Note that this mail has been signed by a different key. -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 227 bytes Desc: not available URL: -------------- next part -------------- _______________________________________________ Gnupg-announce mailing list Gnupg-announce at gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-announce From jussi.kivilinna at iki.fi Tue Feb 8 18:22:30 2022 From: jussi.kivilinna at iki.fi (Jussi Kivilinna) Date: Tue, 8 Feb 2022 19:22:30 +0200 Subject: [PATCH GnuPG] g10/mainproc: avoid extra hash contexts when decrypting MDC input Message-ID: <20220208172230.3679492-1-jussi.kivilinna@iki.fi> * g10/mainproc.c (mainproc_context): New member 'seen_pkt_encrypted_mdc'. (release_list): Clear 'seen_pkt_encrypted_mdc'. (proc_encrypted): Set 'seen_pkt_encrypted_mdc'. (have_seen_pkt_encrypted_aead): Rename to... (have_seen_pkt_encrypted_aead_or_mdc): ...this and add check for 'seen_pkt_encrypted_mdc'. (proc_plaintext): Do not enable extra hash contexts when decrypting MDC input. -- Avoiding extra hash contexts speeds up CFB/MDC decryption quite a lot. For example, decrypting symmetric-key AES-256 encrypted 4 GiB file from RAM to /dev/null sees ~3.4x speed increase on AMD Ryzen 5800X: AES256.CFB encryption: 783 MB/s AES256.CFB decryption: 386 MB/s (before) AES256.CFB encryption: 1.3 GB/s (after patch) Note, AEAD is still significantly faster: AES256.OCB encryption: 2.2 GB/s AES256.OCB decryption: 3.0 GB/s GnuPG-bug-id: T5820 Signed-off-by: Jussi Kivilinna --- g10/mainproc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/g10/mainproc.c b/g10/mainproc.c index 1ee5b9a6e..aa028e91b 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -88,6 +88,7 @@ struct mainproc_context ulong symkeys; /* Number of symmetrically encrypted session keys. */ struct pubkey_enc_list *pkenc_list; /* List of encryption packets. */ int seen_pkt_encrypted_aead; /* PKT_ENCRYPTED_AEAD packet seen. */ + int seen_pkt_encrypted_mdc; /* PKT_ENCRYPTED_MDC packet seen. */ struct { unsigned int sig_seen:1; /* Set to true if a signature packet has been seen. */ @@ -140,6 +141,7 @@ release_list( CTX c ) c->any.uncompress_failed = 0; c->last_was_session_key = 0; c->seen_pkt_encrypted_aead = 0; + c->seen_pkt_encrypted_mdc = 0; xfree (c->dek); c->dek = NULL; } @@ -547,6 +549,8 @@ proc_encrypted (CTX c, PACKET *pkt) if (pkt->pkttype == PKT_ENCRYPTED_AEAD) c->seen_pkt_encrypted_aead = 1; + if (pkt->pkttype == PKT_ENCRYPTED_MDC) + c->seen_pkt_encrypted_mdc = 1; if (early_plaintext) { @@ -823,7 +827,7 @@ proc_encrypted (CTX c, PACKET *pkt) static int -have_seen_pkt_encrypted_aead( CTX c ) +have_seen_pkt_encrypted_aead_or_mdc( CTX c ) { CTX cc; @@ -831,6 +835,8 @@ have_seen_pkt_encrypted_aead( CTX c ) { if (cc->seen_pkt_encrypted_aead) return 1; + if (cc->seen_pkt_encrypted_mdc) + return 1; } return 0; @@ -914,7 +920,7 @@ proc_plaintext( CTX c, PACKET *pkt ) } } - if (!any && !opt.skip_verify && !have_seen_pkt_encrypted_aead(c)) + if (!any && !opt.skip_verify && !have_seen_pkt_encrypted_aead_or_mdc(c)) { /* This is for the old GPG LITERAL+SIG case. It's not legal according to 2440, so hopefully it won't come up that often. -- 2.32.0 From jussi.kivilinna at iki.fi Wed Feb 9 17:13:47 2022 From: jussi.kivilinna at iki.fi (Jussi Kivilinna) Date: Wed, 9 Feb 2022 18:13:47 +0200 Subject: [PATCH GnuPG] g10/mainproc: avoid extra hash contexts when decrypting MDC input In-Reply-To: <20220208172230.3679492-1-jussi.kivilinna@iki.fi> References: <20220208172230.3679492-1-jussi.kivilinna@iki.fi> Message-ID: Hello, Does this patch look ok to push? -Jussi ps. Not sure why my email didn't reach mailing-list, I'm not seeing delivery errors at my end. On 8.2.2022 19.22, Jussi Kivilinna wrote: > * g10/mainproc.c (mainproc_context): New member > 'seen_pkt_encrypted_mdc'. > (release_list): Clear 'seen_pkt_encrypted_mdc'. > (proc_encrypted): Set 'seen_pkt_encrypted_mdc'. > (have_seen_pkt_encrypted_aead): Rename to... > (have_seen_pkt_encrypted_aead_or_mdc): ...this and add check for > 'seen_pkt_encrypted_mdc'. > (proc_plaintext): Do not enable extra hash contexts when decrypting > MDC input. > -- > > Avoiding extra hash contexts speeds up CFB/MDC decryption quite > a lot. For example, decrypting symmetric-key AES-256 encrypted > 4 GiB file from RAM to /dev/null sees ~3.4x speed increase on > AMD Ryzen 5800X: > > AES256.CFB encryption: 783 MB/s > AES256.CFB decryption: 386 MB/s (before) > AES256.CFB encryption: 1.3 GB/s (after patch) > > Note, AEAD is still significantly faster: > > AES256.OCB encryption: 2.2 GB/s > AES256.OCB decryption: 3.0 GB/s > > GnuPG-bug-id: T5820 > Signed-off-by: Jussi Kivilinna > --- > g10/mainproc.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/g10/mainproc.c b/g10/mainproc.c > index 1ee5b9a6e..aa028e91b 100644 > --- a/g10/mainproc.c > +++ b/g10/mainproc.c > @@ -88,6 +88,7 @@ struct mainproc_context > ulong symkeys; /* Number of symmetrically encrypted session keys. */ > struct pubkey_enc_list *pkenc_list; /* List of encryption packets. */ > int seen_pkt_encrypted_aead; /* PKT_ENCRYPTED_AEAD packet seen. */ > + int seen_pkt_encrypted_mdc; /* PKT_ENCRYPTED_MDC packet seen. */ > struct { > unsigned int sig_seen:1; /* Set to true if a signature packet > has been seen. */ > @@ -140,6 +141,7 @@ release_list( CTX c ) > c->any.uncompress_failed = 0; > c->last_was_session_key = 0; > c->seen_pkt_encrypted_aead = 0; > + c->seen_pkt_encrypted_mdc = 0; > xfree (c->dek); > c->dek = NULL; > } > @@ -547,6 +549,8 @@ proc_encrypted (CTX c, PACKET *pkt) > > if (pkt->pkttype == PKT_ENCRYPTED_AEAD) > c->seen_pkt_encrypted_aead = 1; > + if (pkt->pkttype == PKT_ENCRYPTED_MDC) > + c->seen_pkt_encrypted_mdc = 1; > > if (early_plaintext) > { > @@ -823,7 +827,7 @@ proc_encrypted (CTX c, PACKET *pkt) > > > static int > -have_seen_pkt_encrypted_aead( CTX c ) > +have_seen_pkt_encrypted_aead_or_mdc( CTX c ) > { > CTX cc; > > @@ -831,6 +835,8 @@ have_seen_pkt_encrypted_aead( CTX c ) > { > if (cc->seen_pkt_encrypted_aead) > return 1; > + if (cc->seen_pkt_encrypted_mdc) > + return 1; > } > > return 0; > @@ -914,7 +920,7 @@ proc_plaintext( CTX c, PACKET *pkt ) > } > } > > - if (!any && !opt.skip_verify && !have_seen_pkt_encrypted_aead(c)) > + if (!any && !opt.skip_verify && !have_seen_pkt_encrypted_aead_or_mdc(c)) > { > /* This is for the old GPG LITERAL+SIG case. It's not legal > according to 2440, so hopefully it won't come up that often. From wk at gnupg.org Thu Feb 10 13:40:05 2022 From: wk at gnupg.org (Werner Koch) Date: Thu, 10 Feb 2022 13:40:05 +0100 Subject: [PATCH GnuPG] g10/mainproc: avoid extra hash contexts when decrypting MDC input In-Reply-To: (Jussi Kivilinna's message of "Wed, 9 Feb 2022 18:13:47 +0200") References: <20220208172230.3679492-1-jussi.kivilinna@iki.fi> Message-ID: <87wni251zu.fsf@wheatstone.g10code.de> On Wed, 9 Feb 2022 18:13, Jussi Kivilinna said: > Does this patch look ok to push? Looks good for master. I will consider to abckport it to 2.2. Salam-Shalom, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 227 bytes Desc: not available URL: From jussi.kivilinna at iki.fi Thu Feb 10 19:17:31 2022 From: jussi.kivilinna at iki.fi (Jussi Kivilinna) Date: Thu, 10 Feb 2022 20:17:31 +0200 Subject: [PATCH GnuPG 2/2] g10/sign: sign_file: use iobuf_read for higher detached signing speed In-Reply-To: <20220210181731.932592-1-jussi.kivilinna@iki.fi> References: <20220210181731.932592-1-jussi.kivilinna@iki.fi> Message-ID: <20220210181731.932592-2-jussi.kivilinna@iki.fi> * g10/sign.c (sign_file): Use iobuf_read instead of iobuf_get for reading data from detached file. -- This patch reduces iobuf_read per byte processing overhead and speeds up detached signing. Detached signing speed on AMD Ryzen 5800X (4.3GiB file, SHA256): gpg process user time before: 3.951s after: 1.898s (2.0x faster) GnuPG-bug-id: T5826 Signed-off-by: Jussi Kivilinna --- g10/sign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g10/sign.c b/g10/sign.c index 98cfcb2e3..981cc250a 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -1328,7 +1328,7 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr, iobuf_push_filter (inp, text_filter, &tfx); } iobuf_push_filter (inp, md_filter, &mfx); - while (iobuf_get (inp) != -1) + while (iobuf_read (inp, NULL, 1<<30) != -1) ; iobuf_close (inp); inp = NULL; @@ -1339,7 +1339,7 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr, else { /* Read, so that the filter can calculate the digest. */ - while (iobuf_get(inp) != -1) + while (iobuf_read (inp, NULL, 1<<30) != -1) ; } } -- 2.32.0 From jussi.kivilinna at iki.fi Thu Feb 10 19:17:30 2022 From: jussi.kivilinna at iki.fi (Jussi Kivilinna) Date: Thu, 10 Feb 2022 20:17:30 +0200 Subject: [PATCH GnuPG 1/2] g10/plaintext: do_hash: use iobuf_read for higher performance Message-ID: <20220210181731.932592-1-jussi.kivilinna@iki.fi> * g10/plaintext.c (do_hash): Use iobuf_read instead of iobuf_get for reading data; Use gcry_md_write instead of gcry_md_putc for hash data. -- This patch reduces iobuf_read per byte processing overhead and speeds up detached signature verifying. Detached verifying speed on AMD Ryzen 5800X (4.3GiB file, SHA256): gpg process user time before: 9.410s after: 1.913s (4.9x faster) GnuPG-bug-id: T5826 Signed-off-by: Jussi Kivilinna --- g10/plaintext.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/g10/plaintext.c b/g10/plaintext.c index 3e169d93f..f20057cbb 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -545,11 +545,16 @@ do_hash (gcry_md_hd_t md, gcry_md_hd_t md2, IOBUF fp, int textmode) } else { - while ((c = iobuf_get (fp)) != -1) + byte *buffer = xmalloc (32768); + int ret; + + while ((ret = iobuf_read (fp, buffer, 32768)) != -1) { if (md) - gcry_md_putc (md, c); + gcry_md_write (md, buffer, ret); } + + xfree (buffer); } } -- 2.32.0