[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211120043052.GK25752@gondor.apana.org.au>
Date: Sat, 20 Nov 2021 12:30:52 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Lei He <helei.sig11@...edance.com>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
pizhenwei@...edance.com
Subject: Re: [PATCH] crypto: testmgr - Fix wrong test case of RSA
On Fri, Nov 05, 2021 at 08:25:31PM +0800, Lei He wrote:
> According to the BER encoding rules, integer value should be encoded
> as two's complement, and if the highest bit of a positive integer
> is 1, should add a leading zero-octet.
>
> The kernel's built-in RSA algorithm cannot recognize negative numbers
> when parsing keys, so it can pass this test case.
>
> Export the key to file and run the following command to verify the
> fix result:
>
> openssl asn1parse -inform DER -in /path/to/key/file
>
> Signed-off-by: Lei He <helei.sig11@...edance.com>
> ---
> crypto/testmgr.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists