[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D44CXPF7VCWY.3PA48YV8MVXF1@kernel.org>
Date: Thu, 12 Sep 2024 16:58:38 +0300
From: "Jarkko Sakkinen" <jarkko@...nel.org>
To: "Roberto Sassu" <roberto.sassu@...weicloud.com>, <dhowells@...hat.com>,
<dwmw2@...radead.org>, <herbert@...dor.apana.org.au>, <davem@...emloft.net>
Cc: <linux-kernel@...r.kernel.org>, <keyrings@...r.kernel.org>,
<linux-crypto@...r.kernel.org>, <zohar@...ux.ibm.com>,
<linux-integrity@...r.kernel.org>, <torvalds@...ux-foundation.org>,
"Roberto Sassu" <roberto.sassu@...wei.com>
Subject: Re: [PATCH v3 05/14] PGPLIB: Signature parser
On Wed Sep 11, 2024 at 3:29 PM EEST, Roberto Sassu wrote:
> From: David Howells <dhowells@...hat.com>
>
> Provide some PGP signature parsing helpers:
>
> (1) A function to parse V4 signature subpackets and pass the desired ones
> to a processor function:
>
> int pgp_parse_sig_subpkts(const u8 *data, size_t datalen,
> struct pgp_parse_sig_context *ctx);
>
> (2) A function to parse out basic signature parameters from any PGP
> signature such that the algorithms and public key can be selected:
>
> int pgp_parse_sig_params(const u8 **_data, size_t *_datalen,
> struct pgp_sig_parameters *p);
>
> Signed-off-by: David Howells <dhowells@...hat.com>
> Co-developed-by: Roberto Sassu <roberto.sassu@...wei.com>
> Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> ---
> crypto/asymmetric_keys/pgp_library.c | 284 +++++++++++++++++++++++++++
> crypto/asymmetric_keys/pgplib.h | 25 +++
> 2 files changed, 309 insertions(+)
>
> diff --git a/crypto/asymmetric_keys/pgp_library.c b/crypto/asymmetric_keys/pgp_library.c
> index 1b87f8af411b..a9708ccbcb81 100644
> --- a/crypto/asymmetric_keys/pgp_library.c
> +++ b/crypto/asymmetric_keys/pgp_library.c
> @@ -260,3 +260,287 @@ int pgp_parse_public_key(const u8 **_data, size_t *_datalen,
> return 0;
> }
> EXPORT_SYMBOL_GPL(pgp_parse_public_key);
> +
> +/**
> + * pgp_parse_sig_subpkt_header - Parse a PGP V4 signature subpacket header
()
BR, Jarkko
Powered by blists - more mailing lists