aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * gpg: Mark disabled keys and add show-ownertrust list option.Werner Koch2024-04-176-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/options.h (LIST_SHOW_OWNERTRUST): New. * g10/keylist.c (print_key_line): Show wonertrust and always show whether a key is disabled. * g10/gpg.c (parse_list_options): Add "show-ownertrust". * g10/gpgv.c (get_ownertrust_string): Add stub. * g10/test-stubs.c (get_ownertrust_string): Add stub. -- Note that in a --with-colons listing the ownertrust has always been emitted and the disabled state is marked in that listing with a special 'D' usage.
| * gpg: New command --quick-set-ownertrust.Werner Koch2024-04-174-2/+105
| | | | | | | | | | | | | | * g10/gpg.c (aQuickSetOwnertrust): New. (opts): Add new command. (main): Implement it. * g10/keyedit.c (keyedit_quick_set_ownertrust): New.
| * agent: Fix error handling of READKEY.Werner Koch2024-04-051-1/+3
| | | | | | | | | | | | | | * agent/command.c (cmd_readkey): Jump to leave on reading error. -- Fixes-commit: d7a3c455c5e29b19b66772f86dda925064e34896
| * gpg: Don't show the "fast path listing" diagnostic with --quiet.Werner Koch2024-04-051-2/+3
| | | | | | | | | | | | | | | | * g10/call-agent.c (agent_probe_any_secret_key): Act on --quiet. -- When using the extra-socket this disagnostic will be printed because a listing of all secret keys is not allowed by a remote gpg.
| * gpg: Do not allow to accidently set the RENC usage.Werner Koch2024-04-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (print_key_flags): Print "RENC" if set. (ask_key_flags_with_mask): Remove RENC from the possible set of usages. Add a direct way to set it iff the key is encryption capable. -- This could be done by using "set your own capabilities" for an RSA key. In fact it was always set in this case. GnuPG-bug-id: 7072
| * gpgconf: Change layout of the gpgconf -X output.Werner Koch2024-04-041-52/+71
| | | | | | | | | | | | | | | | | | * tools/gpgconf.c (list_dirs): Change the config mode output. (my_copy_file): Adjust output for org-mode style. (show_configs_one_file): Ditto. (show_other_registry_entries): Ditto. (show_registry_entries_from_file): Ditto. (show_configs): Ditto.
| * gpgconf: Check readability of some files with -XWerner Koch2024-03-181-8/+29
| | | | | | | | | | | | * tools/gpgconf.c (list_dirs): Rename arg from special to show_config_mode. Add "S.Uiserver" test and test existsing files for readability.
| * gpg: Make sure a DECRYPTION_OKAY is never issued for a bad OCB tag.Werner Koch2024-03-142-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | * g10/mainproc.c (proc_encrypted): Force a decryption failure if any error has been seen. * g10/decrypt-data.c (aead_checktag): Issue an ERROR line. -- GnuPG-bug-id: 7042 Note that gpg in any case returns a failure exit code but due to double forking GPGME would not see it.
| * gpg-check-pattern: Consider an empty pattern file as validWerner Koch2024-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | * tools/gpg-check-pattern.c (read_file): Check length before calling fread. -- The problem with an empty file is that es_fread is called to read one element of length zero which seems to be undefined behaviour and results in ENOENT on my test box.
* | gpg: Terminate key listing on output write error.Werner Koch2024-05-154-20/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keylist.c (list_all): Handle error from list_keyblock. (list_one): Ditto. (locate_one): Ditto. (list_keyblock): Detect write error, print, and return it. (list_keyblock_direct): Return error from list_keyblock. * g10/import.c (import_one_real): Break on listing error. -- Test by using gpg -k >/dev/full GnuPG-bug-id: 6185
* | tpm2d: Use BYTE type to acces TPM2B object.NIIBE Yutaka2024-05-151-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | * tpm2d/tpm2.c (tpm2_SensitiveToDuplicate): Don't use the cast of (TPM2B *). -- While it works (since the actual access is done by the macros), compiler may complain the alignment property of type BYTE * and TPM2B object is different. Signed-off-by: NIIBE Yutaka <[email protected]>
* | common: Remove unused function.NIIBE Yutaka2024-05-151-6/+0
| | | | | | | | | | | | | | | | * common/exechelp-posix.c (my_error): Remove. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | dirmngr: Fix a call of calloc.NIIBE Yutaka2024-05-141-1/+1
| | | | | | | | | | | | | | | | * dirmngr/ldap-parse-uri.c (ldap_parse_uri): Fix arguments. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: Algo "kyber" is now a shortcut for ky768_bp256.Werner Koch2024-05-061-2/+2
| | | | | | | | | | | | | | | | * g10/keygen.c (parse_key_parameter_part): Change Kyber defaults. -- Also kyber1024 is now a shortcut for ky1024_bp384. This change is to align it with the original wussler draft.
* | scd:piv: Support listing of retired keys with KEYINFO.Werner Koch2024-05-063-25/+47
| | | | | | | | | | | | | | | | | | | | | | | | * scd/app-piv.c (data_objects): Mark returned key as having a keypair. (do_with_keygrip): Check against encrusage and not used one tag. * tools/gpg-card.c (piv_keyref_is_retired): New. (list_all_kinfo): Pretty print retired keys. -- This allows to list all existing retired keys without using separate readkey commands.
* | speedo: Update the instructions to use the gnupg26 tag.Werner Koch2024-05-021-5/+5
| | | | | | | | --
* | gpg: Add a notation to Kyber encryption subkeysWerner Koch2024-05-021-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (struct opaque_data_usage_and_pk): New. (do_add_notation): New. (keygen_add_key_flags_from_oduap): New. (write_keybinding): Prepare for de-vs cplimance notation. Add a notation to Kyber subkeys. -- This code is based on the 2.2 commit b284412786d71c1cf382e1dff3a36ec6cce11556 However the de-vs notation is currently ineffective as long as Libgcrypt won't claim compliance. The new notation fips203.ipd.2023-08-24 has been added to allow detection of subkeys which have been crated with a pre-final FIPS203 spec for Kyber.
* | speedo: Change install directory for WindowsWerner Koch2024-04-262-7/+15
| | | | | | | | | | | | | | -- Given that we will build only 64 bit versions, we need to switch where stuff is installed on Windows.
* | speedo: Do not use the gpg-error-config in the build systemWerner Koch2024-04-261-2/+2
| | | | | | | | | | | | -- With that installed we don't get proper suport for SYSROOT.
* | speedo: Prepare for building 64 bit Windows versions.Werner Koch2024-04-261-12/+44
| | | | | | | | --
* | speedo: Set gnupg_ver macro to gnupg26_ver.Werner Koch2024-04-261-2/+2
| | | | | | | | | | | | -- Also fixed a syntax erro rin AUTHENTICODE_sign
* | agent:kem:ecc: Support a key on smartcard.NIIBE Yutaka2024-04-265-74/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/agent.h (agent_card_ecc_kem): New. * agent/divert-scd.c (agent_card_ecc_kem): New. * agent/pkdecrypt.c (ecc_extract_pk_from_key): New. (ecc_extract_sk_from_key): New. (ecc_raw_kem, get_cardkey, ecc_get_curve): New. (ecc_pgp_kem_decrypt): Support a key on smartcard for ECC. (composite_pgp_kem_decrypt): Handle a case of a key on smartcard. * common/sexputil.c (get_ecc_curve_from_key): New. * common/util.h (get_ecc_curve_from_key): New. -- GnuPG-bug-id: 7097 Signed-off-by: NIIBE Yutaka <[email protected]>
* | speedo: Use gpg-authcode-sign.sh and change archive label to v2.5.Werner Koch2024-04-253-90/+9
| | | | | | | | --
* | Install the new gpg-authcode-sign.sh script.Werner Koch2024-04-252-0/+258
| | | | | | | | | | | | | | | | | | | | * tools/gpg-authcode-sign.sh: New. * tools/Makefile.am (bin_SCRIPTS): Add that tool. -- This script makes use of gpg anyway and thus it is best to have it also installed with the gpg version used to cross-build our software. The script was orginally developed for gpg4win.
* | agent:kem: Fix memory leaks.NIIBE Yutaka2024-04-251-3/+6
| | | | | | | | | | | | | | | | | | * agent/pkdecrypt.c (composite_pgp_kem_decrypt): Release shadow_info memory. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | agent: Allow NULL for R_PADDING, when calling scd and tpm2d.NIIBE Yutaka2024-04-253-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/call-scd.c (padding_info_cb): Allow NULL. (agent_card_pkdecrypt): Likewise. * agent/divert-scd.c (divert_pkdecrypt): Likewise. * agent/divert-tpm2.c (divert_tpm2_pkdecrypt): Likewise. -- It's for RSA PKCD#1 encoding if the decrypt operation removes padding or not. When caller knows it's not RSA, this information is no use and it is better to allow NULL with the variable R_PADDING. Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: New option --require-pqc-encryptionWerner Koch2024-04-245-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (oRequirePQCEncryption): New. (opts): Add option. (main): Set option. * g10/mainproc.c (print_pkenc_list): Print a warning. * g10/options.h (flags): Add flag require_pqc_encryption. * g10/getkey.c (finish_lookup): Skip non-pqc keys if the option is set. -- GnuPG-bug-id: 6815
* | agent:kem: Factor out ECC KEM operation from composite KEM.NIIBE Yutaka2024-04-241-107/+136
| | | | | | | | | | | | | | | | | | * agent/pkdecrypt.c (ecc_pgp_kem_decrypt): New. (composite_pgp_kem_decrypt): Use ecc_pgp_kem_decrypt. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | agent: Simplify diverting operation to the smartcard.NIIBE Yutaka2024-04-241-10/+5
| | | | | | | | | | | | | | | | * agent/pkdecrypt.c (agent_pkdecrypt): Remove no_shadow_info variable. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: Split keygrip in a standard key listing.Werner Koch2024-04-231-2/+15
| | | | | | | | | | * g10/keylist.c (print_keygrip): New. (list_keyblock_print): Use new function to print the keygrip.
* | gpg: Support Kyber with Brainpool512r1.Werner Koch2024-04-2320-4/+750
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/openpgp-oid.c (oidtable): Add GCRY_KEM_RAW_BP512. * agent/pkdecrypt.c (ecc_table): Support bp512 * g10/pkglue.c (do_encrypt_kem): Ditto. * tests/openpgp/samplekeys: Add sample keys for kyber_bp256, bp384, and bp512. * tests/openpgp/privkeys: Add corresponding private keys. * tests/openpgp/samplemsgs: Add sample messages for those keys. -- GnuPG-bug-id: 6815
* | gpg: Support encryption with kyber_bp256 and kyber_bp384Werner Koch2024-04-233-2/+39
| | | | | | | | | | | | | | | | | | | | * common/openpgp-oid.c (oidtable): Support KEM for bp256 and bp384. * g10/pkglue.c (do_encrypt_kem): Ditto. -- GnuPG-bug-id: 6815 Note, this needs the very latest Libgcrypt to work properly
* | Remove the deprecated gcry_set_log_handler.Werner Koch2024-04-233-55/+0
| | | | | | | | | | | | | | | | * common/miscellaneous.c (my_gcry_logger): Remove. (setup_libgcrypt_logging): Do not call the deprecated gcry_set_log_handler. * kbx/kbxutil.c (my_gcry_logger): Remove. * tools/no-libgcrypt.c (gcry_set_log_handler): Remove stub.
* | tests: Add two Kyber sample keys and messages.Werner Koch2024-04-2312-4/+562
| | | | | | | | | | | | -- GnuPG-bug-id: 6815
* | gpg: Support encryption with kyber_cv448.Werner Koch2024-04-232-14/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/pkglue.c (do_encrypt_kem): Support cv25519 w/o 0x40 prefix. Support X448. (ECC_POINT_LEN_MAX): New. (ECC_HASH_LEN_MAX): New. * common/openpgp-oid.c (oidtable): Support X448 KEM. -- This needs more work. For example we should use a parameter table like what we do in agent/pkdecrypt.c. GnuPG-bug-id: 6815
* | Require Libgcrypt 1.11.0Werner Koch2024-04-233-65/+71
| | | | | | | | | | | | | | | | | | | | * configure.ac (NEED_LIBGCRYPT_VERSION): Set to 1.11.0 * agent/pkdecrypt.c (struct ecc_params): Move constants to the top. -- It does not make anymore sense to allow building with older Libgcrypt versions. After all PQ key support is a major feature and for this we need Libgcrypt.
* | agent:kem: More fix for PQC KEM with X448.NIIBE Yutaka2024-04-231-17/+16
| | | | | | | | | | | | | | | | | | | | | | * agent/pkdecrypt.c (struct ecc_params): Remove NAME_LEN field. (ecc_table): Update. (get_ecc_params): Use strcmp. (composite_pgp_kem_decrypt): Fix the call of gnupg_kem_combiner. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | agent:kem: Support other ML-KEM variants.NIIBE Yutaka2024-04-231-11/+40
| | | | | | | | | | | | | | | | | | | | * agent/pkdecrypt.c (composite_pgp_kem_decrypt): Care about ML-KEM 512 and 1024. -- Co-authored-by: Werner Koch <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* | agent:kem: Support other ECC curves.NIIBE Yutaka2024-04-231-21/+105
| | | | | | | | | | | | | | | | | | | | * agent/pkdecrypt.c (ecc_table): New. (get_ecc_params): New. (composite_pgp_kem_decrypt): Support other curves. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* | po: Update Portuguese Translation.Daniel Cerqueira2024-04-231-38/+9
| | | | | | | | Signed-off-by: Daniel Cerqueira <[email protected]>
* | tests: Avoid new C23 keyword true.Werner Koch2024-04-221-4/+4
| | | | | | | | | | | | | | * tests/asschk.c (eval_boolean): s/true/tru/ -- GnuPG-bug-is: 7093
* | gpg: Prepare Kyber encryption code for more variants.Werner Koch2024-04-183-24/+93
| | | | | | | | | | | | | | | | * common/openpgp-oid.c (oidtable): Add field kem_algo. (openpgp_oid_to_kem_algo): New. * g10/pkglue.c (do_encrypt_kem): Add support for Kyber1024. -- GnuPG-bug-id: 6815
* | gpg: Mark disabled keys and add show-ownertrust list option.Werner Koch2024-04-176-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/options.h (LIST_SHOW_OWNERTRUST): New. * g10/keylist.c (print_key_line): Show wonertrust and always show whether a key is disabled. * g10/gpg.c (parse_list_options): Add "show-ownertrust". * g10/gpgv.c (get_ownertrust_string): Add stub. * g10/test-stubs.c (get_ownertrust_string): Add stub. -- Note that in a --with-colons listing the ownertrust has always been emitted and the disabled state is marked in that listing with a special 'D' usage.
* | gpg: New command --quick-set-ownertrust.Werner Koch2024-04-174-2/+105
| | | | | | | | | | | | | | * g10/gpg.c (aQuickSetOwnertrust): New. (opts): Add new command. (main): Implement it. * g10/keyedit.c (keyedit_quick_set_ownertrust): New.
* | gpg: Make --with-subkey-fingerprint the default.Werner Koch2024-04-162-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (oWithoutSubkeyFingerprint): New. (opts): Add "without-subkey-fingerprint". (main): Make --with-subkey-fingerprint the default. Implementation the without option. -- Given that the default for the keyid format is none, the subkey fingerprints are important to do anything with a subkey. Thus we make the old option the default and provide a new option to revert it.
* | gpg: Fix minor Kyber display things.Werner Koch2024-04-152-1/+10
| | | | | | | | | | * common/compliance.c (gnupg_pk_is_compliant): Make Kyber known. * g10/misc.c (openpgp_pk_algo_name): Add "Kyber".
* | gpg: Implement Kyber encryption.Werner Koch2024-04-152-4/+214
| | | | | | | | | | | | | | | | | | | | * g10/build-packet.c (do_pubkey_enc): Support Kyber. * g10/pkglue.c (do_encrypt_kem): Implement. -- Note that the code does only work for ky768_cv25519 for now. GnuPG-bug-id: 6815
* | gpg: Add arg session_algo to pk_decrypt.Werner Koch2024-04-154-126/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/kem.c: Move constants to the top. Add some documentation. * g10/pkglue.c (pk_encrypt): Add arguments session_key and factor code out to ... (do_encrypt_rsa_elg): here, (do_encrypt_ecdh): and here, (do_encrypt_kem): and here. * g10/encrypt.c (write_pubkey_enc): Call with session key algorithm. -- This makes it easier to review the code.
* | scd:openpgp: Robust Data Object handling for constructed case.NIIBE Yutaka2024-04-151-0/+50
| | | | | | | | | | | | | | | | | | | | | | * scd/app-openpgp.c (get_cached_data): When it comes with its tag and length for the constructed Data Object, remove them. -- GnuPG-bug-id: 7058 Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: Prepare to use the fingerprint as fixed-info for Kyber.Werner Koch2024-04-123-8/+22
| | | | | | | | | | | | | | | | | | | | * g10/pubkey-enc.c (get_it): Use algo and fingerprint for the fixed-info. Keep a testing mode. * g10/options.h (COMPAT_T7014_OLD): New. * g10/gpg.c (compatibility_flags): Add "t71014-old" flag. -- GnuPG-bug-id: 6815