1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

sm: Support decryption of password based encryption (pwri)

* sm/decrypt.c (string_from_gcry_buffer): New.
(pwri_parse_pbkdf2): New.
(pwri_decrypt): New.
(prepare_decryption): Support pwri.
(gpgsm_decrypt): Test for PWRI.  Move IS_DE_VS flag to DFPARM.

* common/sexputil.c (cipher_mode_to_string): New.
--

Note that this is not finished because we need to implement a password
callback.  For now "abc" is used as passwort.

Latest libksba is also required to return the required info.

Signed-off-by: Werner Koch <wk@gnupg.org>
Backported-from-master: 02029f9eab

Note that this change also prints the used algorithm and shows some
existsing diagnostics only in verbose mode.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2021-05-14 18:53:44 +02:00
parent b6f8cd7eef
commit 6f31acac76
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 493 additions and 57 deletions

View file

@ -216,6 +216,7 @@ int get_pk_algo_from_canon_sexp (const unsigned char *keydata,
char *pubkey_algo_string (gcry_sexp_t s_pkey, enum gcry_pk_algos *r_algoid);
const char *pubkey_algo_to_string (int algo);
const char *hash_algo_to_string (int algo);
const char *cipher_mode_to_string (int mode);
/*-- convert.c --*/
int hex2bin (const char *string, void *buffer, size_t length);