From: Herbert Xu Subject: [v4 PATCH 0/8] crypto: rsa - Do not gratuitously drop leading zeroes Date: Wed, 29 Jun 2016 19:31:25 +0800 Message-ID: <20160629113125.GA27643@gondor.apana.org.au> References: <20160622101432.GA30454@gondor.apana.org.au> <20160629095655.GA26056@gondor.apana.org.au> <20160629102649.GA26987@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Tudor Ambarus , Stephan Mueller , Mat Martineau , Denis Kenzior , Salvatore Benedetto To: Andrzej Zaborowski , Tadeusz Struk , Linux Crypto Mailing List Return-path: Received: from helcar.hengli.com.au ([209.40.204.226]:42334 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328AbcF2Lb3 (ORCPT ); Wed, 29 Jun 2016 07:31:29 -0400 Content-Disposition: inline In-Reply-To: <20160629102649.GA26987@gondor.apana.org.au> Sender: linux-crypto-owner@vger.kernel.org List-ID: Hi: This was prompted by the caam RSA submission where a lot of work was done just to strip the RSA output of leading zeroes. This is in fact completely pointless because the only user of RSA in the kernel then promptly puts them back. This patch series resolves this madness by simply leaving any leading zeroes in place. Note that we're not requiring authors to add leading zeroes, even though that is encouraged if it is easy to do. In practice you'd only run into this every 2^32 or 2^64 operations so please don't overdo it. I've also taken the opportunity to cleanup the pkcs1pad code. v4 fixes the newly added dh to use the new MPI SG interface. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt