jgit/org.eclipse.jgit.gpg.bc.test
Thomas Wolf bdc48aeac7 GPG: handle extended private key format
Add detection for the key-value pair format that was available in
gpg-agent for some time already and that has become the default since
gpg-agent 2.2.20. If a secret key in the .gnupg/private-keys-v1.d
directory is found to have this format, extract the human-readable key
from it, convert it to the binary serialized form and hand that to
BouncyCastle.

Encrypted keys in the new format may use AES/OCB. OCB is a patent-
encumbered algorithm; although there is a license for open-source
software, that may not be good enough and OCB may not be available in
Java. It is not available in the default security provider in Java,
and it is also not available in the BouncyCastle version included in
Eclipse.

Implement AES/OCB decryption, throwing a PGPException with a nice
message if the algorithm is not available. Include a copy of the normal
s-expression parser of BouncyCastle and fix it to properly handle data
from such keys: such keys do not contain an internal hash since the
AES/OCB cipher includes and checks a MAC already.

Bug: 570501
Change-Id: Ifa6391a809a84cfc6ae7c6610af6a79204b4143b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-02-19 18:24:47 -05:00
..
.settings Ignore missing javadoc tags in test bundles 2020-11-29 20:16:38 +01:00
META-INF GPG: handle extended private key format 2021-02-19 18:24:47 -05:00
tst/org/eclipse/jgit/gpg/bc/internal GPG: handle extended private key format 2021-02-19 18:24:47 -05:00
tst-rsrc/org/eclipse/jgit/gpg/bc/internal/keys GPG: handle extended private key format 2021-02-19 18:24:47 -05:00
.classpath GPG: compute the keygrip to find a secret key 2021-02-16 00:37:01 +01:00
.gitignore GPG: compute the keygrip to find a secret key 2021-02-16 00:37:01 +01:00
.project Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
BUILD GPG: compute the keygrip to find a secret key 2021-02-16 00:37:01 +01:00
about.html Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
build.properties GPG: compute the keygrip to find a secret key 2021-02-16 00:37:01 +01:00
plugin.properties Decouple BouncyCastle from JGit Core 2020-06-01 01:26:22 +02:00
pom.xml GPG: compute the keygrip to find a secret key 2021-02-16 00:37:01 +01:00