Commit Graph

9 Commits

Author SHA1 Message Date
Neal H. Walfield c3e988287d Move digest functionality to the internal OpenPGP implementation
rpmio/digest.h contains definitions that are only used by the interal
OpenPGP parser, and are not required by the future Sequoia backend.
Move those definitions into rpmio/rpmpgp_internal.h.

Fixes #2006.
2022-04-13 10:25:04 +03:00
Panu Matilainen d44be2cbc1 Rename pgpHexStr() to rpmhex(), but preserve ABI for now
Fixup internal callers to use rpmhex(), deprecate pgpHexStr().
pgpHexStr() should be dropped at next soname bump, whenever that
happens.
2022-02-25 11:08:25 +01:00
Panu Matilainen 01d6605d93 Detach rpm's hash algorithm values from PGP hash algorith values
At this point this is quite literally merely a symbolic change,
as values from PGP hash algo are assumed equal to RPM hash algos,
but it's a necessary first step to supporting hashes not included
in RFC-4880.

Fixes: #1899
2022-02-25 11:08:25 +01:00
Justus Winter a1fac5beef Fix Ed25519 signature verification using libgcrypt
In OpenPGP, hashing is done independently of the signing algorithm,
hence they may be freely combined.
2021-11-10 12:33:25 +02:00
Michael Schroeder 8734c1b97e Support ed25519 signatures in digest_libgcrypt.c 2020-05-26 17:03:11 +03:00
Michael Schroeder 92c87b9713 Support the EdDSA public key algorithm
The algorithm identifier and encoding format are taken from the
not yet accepted update to rfc4480:

https://datatracker.ietf.org/doc/draft-ietf-openpgp-rfc4880bis/

Gnupg supports EdDSA since version 2.1.0 (released in 2014).
2020-05-26 17:03:11 +03:00
Michael Schroeder f1c06f5a99 Support DSA2 in digest_libgcrypt.c
For DSA2 we need to truncate the hash to the size of the pubkey's Q value.
2020-04-09 15:00:08 +03:00
Ross Burton 61ea5a8ea6 rpmio: initialise libgcrypt
If we're using libgcrypt for hashing we need to initialise libgcrypt as
otherwise it is not thread-safe.  Without this it will crash when used
in parallel packaging runs.

Fixes #968
2019-12-05 12:53:29 +02:00
Michael Schroeder 037106ecc8 Support libgrypt as crypto library 2019-09-10 09:55:41 +03:00