1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-15 00:29:49 +02:00
gnupg/agent
Werner Koch 4159567f7e
agent: Implement new protection mode openpgp-s2k3-ocb-aes.
* agent/protect.c (agent_protect): Add arg use_ocb.  Change all caller
to pass -1 for default.
* agent/protect-tool.c: New option --debug-use-ocb.
(oDebugUseOCB): New.
(opt_debug_use_ocb): New.
(main): Set option.
(read_and_protect): Implement option.

* agent/protect.c (OCB_MODE_SUPPORTED): New macro.
(PROT_DEFAULT_TO_OCB): New macro.
(do_encryption): Add args use_ocb, hashbegin, hashlen, timestamp_exp,
and timestamp_exp_len.  Implement OCB.
(agent_protect): Change to support OCB.
(do_decryption): Add new args is_ocb, aadhole_begin, and aadhole_len.
Implement OCB.
(merge_lists): Allow NULL for sha1hash.
(agent_unprotect): Change to support OCB.
(agent_private_key_type): Remove debug output.
--

Instead of using the old OpenPGP way of appending a hash of the
plaintext and encrypt that along with the plaintext, the new scheme
uses a proper authenticated encryption mode.  See keyformat.txt for a
description.  Libgcrypt 1.7 is required.

This mode is not yet enabled because there would be no way to return
to an older GnuPG version.  To test the new scheme use
gpg-protect-tool:

 ./gpg-protect-tool -av -P abc -p --debug-use-ocb <plain.key >prot.key
 ./gpg-protect-tool -av -P abc -u <prot.key

Any key from the private key storage should work.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-04-12 14:38:44 +02:00
..
agent.h agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
cache.c Fix typos found using codespell. 2015-11-17 12:50:22 +01:00
call-pinentry.c agent: New option --pinentry-timeout 2016-01-20 11:22:44 +01:00
call-scd.c common: New put_membuf_cb to replace static membuf_data_cb. 2016-01-08 06:33:27 +01:00
ChangeLog-2011 Fix typos 2015-10-28 10:20:17 +01:00
command-ssh.c agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
command.c agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
cvt-openpgp.c agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
cvt-openpgp.h agent: IMPORT_KEY with --force option fix. 2015-12-24 14:19:53 +09:00
divert-scd.c Fix typos found using codespell. 2015-11-17 12:50:22 +01:00
findkey.c agent: allow removal of the shadowed key. 2016-03-17 08:37:58 +09:00
genkey.c agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
gpg-agent-w32info.rc w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
gpg-agent.c agent: Send PROGRESS status lines to the client. 2016-01-25 11:20:23 +01:00
keyformat.txt agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
learncard.c agent: Add --force option for LEARN. 2015-04-03 17:33:11 +09:00
Makefile.am Remove obsolete directories from AM_CPPFLAGS. 2015-04-10 13:11:59 +02:00
pkdecrypt.c agent: Replace some sprintf. 2014-12-02 14:13:53 +01:00
pksign.c agent: Fix RSA verification for card. 2016-01-05 10:15:49 +09:00
preset-passphrase.c common: Remove two JNLIB_ macros (jnlib merge). 2015-04-24 16:10:15 +02:00
protect-tool.c agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
protect.c agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
t-protect.c agent: Implement new protection mode openpgp-s2k3-ocb-aes. 2016-04-12 14:38:44 +02:00
trans.c Changed to GPLv3. 2007-07-04 19:49:40 +00:00
trustlist.c agent: Improve error handling. 2015-11-19 16:18:20 +01:00
w32main.c Fix typos found using codespell. 2015-11-17 12:50:22 +01:00
w32main.h Changed to GPLv3. 2007-07-04 19:49:40 +00:00