aboutsummaryrefslogtreecommitdiffstats
path: root/g10 (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-04-19Support v5 signature generation (not fully working yet).gniibe/crypto-refreshNIIBE Yutaka1-2/+31
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-13Output v5 signature.NIIBE Yutaka1-2/+10
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-13Check v5 signature correctly.NIIBE Yutaka2-1/+18
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-12crypto-refresh secret key handling for v5 key.NIIBE Yutaka1-1/+1
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-12Allow secret key import with no uidnode for v5 key.NIIBE Yutaka1-1/+1
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-12Allow issuer fpr in unhashed area.NIIBE Yutaka1-0/+2
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-12Allow no uidnode for v5 key.NIIBE Yutaka1-2/+2
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-12Add v5 signature salt.NIIBE Yutaka2-0/+17
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-12Parse v5 signature subpacket.NIIBE Yutaka1-8/+24
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-04-12Parse Preferred AEAD cerphersuites subpacket.NIIBE Yutaka1-1/+13
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-03-30gpg: Accept GCM and v5 AEAD with v2 SEIPD packet.NIIBE Yutaka5-97/+149
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-25gpg: Accept SEIPDv2 packet.NIIBE Yutaka2-23/+228
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-22Fix the semantics of memory_cost.NIIBE Yutaka1-1/+1
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-21Fix length of KEK, no additional data.NIIBE Yutaka1-7/+3
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-21experiment with Argon2id.NIIBE Yutaka5-32/+213
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-21accept Argon2 as S2K specifier.NIIBE Yutaka1-4/+30
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-21start experiment for newer S2K.NIIBE Yutaka9-46/+61
Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-08g10/mainproc: avoid extra hash contexts when decrypting MDC inputJussi Kivilinna1-2/+8
* 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 <[email protected]>
2022-02-02gpg: Fix for -Wformat when using uint64_t.NIIBE Yutaka2-4/+5
* g10/cipher-aead.c (do_flush): Use PRIu64. * g10/decrypt-data.c (aead_underflow): Likewise. -- Even among LP64 data model machines, uint64_t type may differ; unsigned long or unsigned long long. Only portable way is use of PRIu64. Signed-off-by: NIIBE Yutaka <[email protected]>
2022-02-01gpg,sm: Set --verbose and clear --quiet in debug mode.Werner Koch1-0/+6
* g10/gpg.c (set_debug): Tweak options. * sm/gpgsm.c (set_debug): Ditto.
2022-01-28gpg: Allow --dearmor to decode all kinds of armor files.Werner Koch3-8/+34
* g10/filter.h (armor_filter_context_t): New fields dearmor_mode and dearmor_state. * g10/dearmor.c (dearmor_file): Set dearmor_mode. * g10/armor.c (is_armor_header): Magic to switch to generic dearmor mode. (parse_header_line): Treat non OpenPGP armor in a special way. (check_input): Ditto. (radix64_read): Detect non OpenPGP armor END lines.
2022-01-18gpg: Print Yubikey version correctly.Werner Koch3-2/+38
* g10/call-agent.c (learn_status_cb): Parse APPVERSION. * g10/call-agent.h (struct agent_card_info_s): Add field appversion. * g10/card-util.c (print_a_version): New. (current_card_status): Print version from appversion. -- This is a regression due to the PIV support. Note that the newer gpg-card worked correctly. GnuPG-bug-id: 5787
2022-01-12gpg: Fix adding the list of ultimate trusted keys.NIIBE Yutaka4-2/+48
* g10/keygen.c (do_generate_keypair): Remove another call to update_ownertrust. * g10/trust.c (update_ownertrust): Add call to tdb_update_utk. * g10/trustdb.c (tdb_update_utk): New. * g10/trustdb.h (tdb_update_utk): New. -- GnuPG-bug-id: 5742 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-01-11gpg: Report failed generation of subkey pair via status interfaceIngo Klöcker1-1/+5
* g10/keygen.c (generate_subkeypair): On error, write error and "key not created" message to status interface. -- This change allows users of the status/command interface to detect errors when adding a subkey to a key. Similar status messages are output by do_generate_keypair. GnuPG-bug-id: 5771
2022-01-11gpg: Request keygrip of key to add via command interfaceIngo Klöcker1-2/+2
* g10/keygen.c (ask_algo): Request keygrip via cpr_get. * doc/help.txt (gpg.keygen.keygrip): New help text. -- This change makes it possible to add an existing (sub)key to another key via the status/command interface. GnuPG-bug-id: 5771
2021-12-20gpg: Correctly set the ownertrust for a new key.Werner Koch1-3/+1
* g10/keygen.c (do_generate_keypair): Use update_ownertrust. -- GnuPG-bug-id: 5742
2021-12-20gpg: Add unfinished code for --export-secret-ssh-key.Werner Koch3-35/+449
* g10/gpg.c (exportSecretSshKey): New. (opts): Add --export-secret-ssh-key. (main): Implement option. * g10/export.c (do_export_stream): Factor keywrap key code out to ... (get_keywrap_key): new. (mb_write_uint32, mb_write_uint8) (mb_write_data, mb_write_cstring) (mb_write_string, mb_write_mpi): New. (receive_raw_seckey_from_agent): New. (export_secret_ssh_key): New. -- Due to time constraints the code is not yet ready.
2021-12-20gpg: Allow passing a keygrip as description to pinentry.Werner Koch2-15/+37
* g10/keydb.h (FORMAT_KEYDESC_KEYGRIP): New. * g10/passphrase.c (gpg_format_keydesc): Add new mode. Signed-off-by: Werner Koch <[email protected]>
2021-12-10gpg: Emit compatible Ed25519 signature.NIIBE Yutaka3-1/+87
* g10/pkglue.c (sexp_extract_param_sos_nlz): New. * g10/pkglue.h: Add the declaration. * g10/sign.c (do_sign): Use sexp_extract_param_sos_nlz for Ed25519. -- Ed25519 signature in GnuPG 2.2 has no leading zeros. GnuPG-bug-id: 5331 Signed-off-by: NIIBE Yutaka <[email protected]>
2021-11-24gpg: Fix function prototype to match declaration.Jakub Jelen1-3/+7
* g10/test-stubs.c (keyserver_import_mbox): Fix prototype -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <[email protected]>
2021-11-24gpg: Fix format_keyid.NIIBE Yutaka1-5/+4
* g10/keyid.c (format_keyid): Allocate buffer earlier. -- Signed-off-by: NIIBE Yutaka <[email protected]>
2021-11-24gpg: Fix key conversion for SSH.NIIBE Yutaka1-5/+6
* g10/export.c (key_to_sshblob): Use put_membuf with length counted beforehand, and use memcmp instead of strncmp. -- GnuPG-bug-id: 5393 Signed-off-by: NIIBE Yutaka <[email protected]>
2021-11-22gpg: New option --forbid-gen-key.Werner Koch1-9/+40
* g10/gpg.c (oForbidGenKey, opts): New option. (mopt): New local struct (gen_key_forbidden): New. (main): Set and handle the option. -- In large system installation it is sometimes useful to make it a bit harder for users to generate their own keys. An example is a policy to not use on-disk keys.
2021-11-18gpg,gpgsm: Add option --min-rsa-length.Werner Koch2-0/+6
* common/compliance.c (min_compliant_rsa_length): New. (gnupg_pk_is_compliant): Take in account. (gnupg_pk_is_allowed): Ditto. (gnupg_set_compliance_extra_info): New. * g10/gpg.c (oMinRSALength): New. (opts): Add --min-rsa-length. (main): Set value. * g10/options.h (opt): Add field min_rsa_length. * sm/gpgsm.c (oMinRSALength): New. (opts): Add --min-rsa-length. (main): Set value. * sm/gpgsm.h (opt): Add field min_rsa_length.
2021-11-13Update release signing keysWerner Koch1-0/+0
-- The last key is new. As usual the key is on a dedicated card with the Admin PIN accessible to a few core hackers. # ------------------------ >8 ------------------------ pub rsa3072 2017-03-17 [SC] [expires: 2027-03-15] 5B80C5754298F0CB55D8ED6ABCEF7E294B092E28 sig R BCEF7E294B092E28 2017-03-17 Andre Heinecke (Release Signing Key) uid Andre Heinecke (Release Signing Key) sig 3 BCEF7E294B092E28 2017-03-17 Andre Heinecke (Release Signing Key) sig 1FDF723CF462B6B1 2017-03-17 Andre Heinecke <[email protected]> pub ed25519 2020-08-24 [SC] [expires: 2030-06-30] 6DAA6E64A76D2840571B4902528897B826403ADA uid Werner Koch (dist signing 2020) sig 3 528897B826403ADA 2020-08-24 Werner Koch (dist signing 2020) sig 249B39D24F25E3B6 2020-08-24 Werner Koch (dist sig) sig 63113AE866587D0A 2020-08-24 [email protected] sig E3FDFF218E45B72B 2020-08-24 Werner Koch (wheatstone commit signing) sig F2AD85AC1E42B367 2020-08-24 Werner Koch <[email protected]> pub ed25519 2021-05-19 [SC] [expires: 2027-04-04] AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD uid Niibe Yutaka (GnuPG Release Key) sig 3 E98E9B2D19C6C8BD 2021-05-19 Niibe Yutaka (GnuPG Release Key) sig 00B45EBD4CA7BABE 2021-09-14 NIIBE Yutaka <[email protected]> sig E267B052364F028D 2021-09-14 NIIBE Yutaka <[email protected]> pub brainpoolP256r1 2021-10-15 [SC] [expires: 2029-12-31] 02F38DFF731FF97CB039A1DA549E695E905BA208 uid GnuPG.com (Release Signing Key 2021) sig 3 549E695E905BA208 2021-10-15 GnuPG.com (Release Signing Key 2021) sig 528897B826403ADA 2021-10-15 Werner Koch (dist signing 2020) sig E3FDFF218E45B72B 2021-10-15 Werner Koch (wheatstone commit signing)
2021-11-13gpg: Remove stale ultimately trusted keys from the trustdb.Werner Koch6-17/+72
* g10/tdbdump.c (export_ownertrust): Skip records marked with the option --trusted-key. (import_ownertrust): Clear the trusted-key flag. * g10/tdbio.h (struct trust_record): Add field flags. * g10/tdbio.c (tdbio_dump_record): Improve output. (tdbio_read_record, tdbio_write_record): Handle flags. * g10/trustdb.c (verify_own_keys): Clear stale trusted-keys and set the flag for new --trusted-keys. (tdb_update_ownertrust): Add arg as_trusted_key. Update callers. -- GnuPG-bug-id: 5685 Signed-off-by: Werner Koch <[email protected]>
2021-11-12gpg: Don't use malloc for kek_params.NIIBE Yutaka1-8/+5
* g10/ecdh.c (pk_ecdh_default_params): Use stack for kek_params. -- GnuPG-bug-id: 5393 Signed-off-by: NIIBE Yutaka <[email protected]>
2021-11-12gpg: Avoid uninitialized revkey.fprlen.Jakub Jelen1-0/+2
* g10/keygen.c (parse_revocation_key): Store the fingerprint length in created structure. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <[email protected]>
2021-11-04gpg: Fix indentation of --print-mds and --print-md sha512.Werner Koch1-4/+4
* g10/gpg.c (print_hex): Fix indentation. -- GnuPG-bug-id: 5679
2021-10-22gpg: Fix printing of binary notations.Werner Koch1-2/+6
* g10/keylist.c (show_notation): Print binary notation from BDAT. -- GnuPG-bug-id: 5667
2021-10-13gpg: New option --override-compliance-checkWerner Koch3-12/+47
* g10/gpg.c (oOverrideComplianceCheck): New. (opts): Add new option. (main): Set option and add check for batch mode. * g10/options.h (opt): Add flags.override_compliance_check. * g10/sig-check.c (check_signature2): Factor complaince checking out to ... (check_key_verify_compliance): this. Turn error into a warning in override mode. -- There is one important use case for this: For systems configured globally to use de-vs mode, Ed25519 and other key types are not allowed because they are not listred in the BSI algorithm catalog. Now, our release signing keys happen to be Ed25519 and thus we need to offer a way for users to check new versions even if the system is in de-vs mode. This does on purpose not work in --batch mode so that scripted solutions won't accidently pass a signature check. GnuPG-bug-id: 5655
2021-09-29gpg: Handle backsig for v5 signature.NIIBE Yutaka1-6/+8
* g10/getkey.c (merge_selfsigs_subkey): Check v5 signature correctly. -- GnuPG-bug-id: 5628 Signed-off-by: NIIBE Yutaka <[email protected]>
2021-09-29gpg: Ed448 and X448 are only for v5 (for subkey).NIIBE Yutaka1-1/+6
* g10/keygen.c (generate_subkeypair): Specify KEYGEN_FLAG_CREATE_V5_KEY for Ed448 or X448 key. -- Reported-by: William Holmes Fixes-commit: 36355394d865f5760075e62267d70f7a7d5dd671 GnuPG-bug-id: 5609 Signed-off-by: NIIBE Yutaka <[email protected]>
2021-09-28gpg: Skip the packet when not used for AEAD.NIIBE Yutaka1-0/+1
* g10/free-packet.c (free_packet): Add the case for case PKT_ENCRYPTED_AEAD. -- GnuPG-bug-id: 5464 Signed-off-by: NIIBE Yutaka <[email protected]>
2021-09-14gpg: Print a warning when importing a bad cv25519 secret key.Werner Koch1-1/+17
* g10/import.c (transfer_secret_keys): Add simple check. -- Note that the requirement for a set high bit is not yet checked. GnuPG-bug-id: 5464
2021-09-14Update release signing keys.Werner Koch1-0/+0
-- These are now # ------------------------ >8 ------------------------ pub rsa3072 2017-03-17 [SC] [expires: 2027-03-15] 5B80C5754298F0CB55D8ED6ABCEF7E294B092E28 sig R BCEF7E294B092E28 2017-03-17 Andre Heinecke (Release Signing Key) uid Andre Heinecke (Release Signing Key) sig 3 BCEF7E294B092E28 2017-03-17 Andre Heinecke (Release Signing Key) sig 1FDF723CF462B6B1 2017-03-17 Andre Heinecke <[email protected]> pub ed25519 2020-08-24 [SC] [expires: 2030-06-30] 6DAA6E64A76D2840571B4902528897B826403ADA uid Werner Koch (dist signing 2020) sig 3 528897B826403ADA 2020-08-24 Werner Koch (dist signing 2020) sig 249B39D24F25E3B6 2020-08-24 Werner Koch (dist sig) sig 63113AE866587D0A 2020-08-24 [email protected] sig E3FDFF218E45B72B 2020-08-24 Werner Koch (wheatstone commit signing) sig F2AD85AC1E42B367 2020-08-24 Werner Koch <[email protected]> pub ed25519 2021-05-19 [SC] [expires: 2027-04-04] AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD uid Niibe Yutaka (GnuPG Release Key) sig 3 E98E9B2D19C6C8BD 2021-05-19 Niibe Yutaka (GnuPG Release Key) sig 00B45EBD4CA7BABE 2021-09-14 NIIBE Yutaka <[email protected]> sig E267B052364F028D 2021-09-14 NIIBE Yutaka <[email protected]>
2021-08-28gpg: Print a note about the obsolete option --secret-keyring.Werner Koch1-1/+1
-- GnuPG-bug-id: 2749
2021-08-27gpg: Change default and max AEAD chunk size to 4 MiBWerner Koch1-3/+3
-- This is per OpenPGP WG design team decision from 2021-08-13 (raising a new wall after exactly 60 years ;-) Signed-off-by: Werner Koch <[email protected]>
2021-08-24gpg: Report the status of NO_SECKEY for decryption.NIIBE Yutaka1-2/+2
* g10/mainproc.c (proc_encrypted): Fix the condition to report NO_SECKEY even when the key was not considered by get_session_key. -- GnuPG-bug-id: 5562 Signed-off-by: NIIBE Yutaka <[email protected]>
2021-08-19gpg: Return SUCCESS/FAILURE status also for --card-edit/name.Werner Koch1-3/+8
* g10/card-util.c (change_name): Call write_sc_op_status. -- Reported-by: Joey Berkovitz