Re: [PATCH] crypto: testmgr - Fix wrong test case of RSA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> ---
>  crypto/testmgr.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux