From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Herbert Xu" <herbert@gondor.apana.org.au>
Cc: <linux-integrity@vger.kernel.org>,
"James Prestwood" <prestwoj@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"open list:CRYPTO API" <linux-crypto@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] crypto: rsa-pkcs1pad: export rsa1_asn_lookup()
Date: Thu, 16 May 2024 11:32:02 +0300 [thread overview]
Message-ID: <D1AXGT9YQXFN.QWKG529CLJUG@kernel.org> (raw)
In-Reply-To: <ZkWIFjGzB3ngUgsP@gondor.apana.org.au>
On Thu May 16, 2024 at 7:14 AM EEST, Herbert Xu wrote:
> On Wed, May 15, 2024 at 06:02:10PM +0300, Jarkko Sakkinen wrote:
> > ASN.1 template is required for TPM2 asymmetric keys, as it needs to be
> > piggy-packed with the input data before applying TPM2_RSA_Decrypt. This
> > patch prepares crypto subsystem for the addition of those keys.
> >
> > Later rsa_lookup_asn1() can be enabled in crypto/asymmetric_keys/Kconfig
> > by:
> >
> > depends on CRYPTO_RSA >= <TPM2 asymmetric keys>
> >
> > Cc: James Prestwood <prestwoj@gmail.com>
> > Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> > ---
> > v2:
> > - Fix typo in the kdoc.
> > - Export also the template struct.
> > ---
> > crypto/rsa-pkcs1pad.c | 16 ++++++++++------
> > include/crypto/rsa-pkcs1pad.h | 20 ++++++++++++++++++++
> > 2 files changed, 30 insertions(+), 6 deletions(-)
> > create mode 100644 include/crypto/rsa-pkcs1pad.h
>
> Please provide a link to the patch that will make use of this.
OK, fair enough. Will be part of the full patch set.
Overally I can say that this will be used to make textbook RSA
to a proper RSA signature ASN.1 and appropriate padding. I.e.
breath new life to this patch, which has duplicate code:
https://lore.kernel.org/all/20200518172704.29608-18-prestwoj@gmail.com/
TPM2_RSA_Decrypt is exactly textbook RSA so it partially needs
the code from kernel's RSA implementation.
BR, Jarkko
prev parent reply other threads:[~2024-05-16 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 15:02 [PATCH v2] crypto: rsa-pkcs1pad: export rsa1_asn_lookup() Jarkko Sakkinen
2024-05-16 4:14 ` Herbert Xu
2024-05-16 8:32 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D1AXGT9YQXFN.QWKG529CLJUG@kernel.org \
--to=jarkko@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prestwoj@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox