Home GnuPG
Diffusion GnuPG 047d699aa40c

gpgsm: Allow cipher mode as part of the algo for --cipher-algo.

Description

gpgsm: Allow cipher mode as part of the algo for --cipher-algo.

* common/miscellaneous.c (gnupg_cipher_mode_name): New.
* common/audit.c (proc_type_encrypt): Print the encryption mode.
* sm/misc.c (gpgsm_map_cipher_name_to_oid): New.
* sm/gpgsm.c (DEFAULT_CIPHER_ALGO): Change to AES256-CBC for
consistent error messages.
(main): Replace the alias name mapping using if-else by a call to the
new function.
* g10/misc.c (openpgp_aead_algo_name): Use gnupg_cipher_mode_name for
consistency.

Note that DEFAULT_CIPHER_ALGO may now also be used to make GCM the
default.

Take care: This is the first patch to implement GCM encryption. The
actual encryption part is not yet ready and instead a debug message
will be printed.

Details

Provenance
wernerAuthored on Tue, Apr 7, 3:16 PM
Parents
rG04fd775fce59: gpgsm: Make GCM fully compliant for de-vs
Branches
Unknown
Tags
Unknown
Tasks
T3979: GPGSM: Authenticated encryption