lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 16 May 2024 11:32:02 +0300
From: "Jarkko Sakkinen" <jarkko@...nel.org>
To: "Herbert Xu" <herbert@...dor.apana.org.au>
Cc: <linux-integrity@...r.kernel.org>, "James Prestwood"
 <prestwoj@...il.com>, "David S. Miller" <davem@...emloft.net>, "open
 list:CRYPTO API" <linux-crypto@...r.kernel.org>, "open list"
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] crypto: rsa-pkcs1pad: export rsa1_asn_lookup()

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@...il.com>
> > Signed-off-by: Jarkko Sakkinen <jarkko@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ