* [PATCH] crypto: testmgr - fix version number of RSA tests
@ 2022-06-15 9:13 Lei He
2022-06-24 1:53 ` PING: " 何磊
0 siblings, 1 reply; 11+ messages in thread
From: Lei He @ 2022-06-15 9:13 UTC (permalink / raw)
To: herbert, davem, linux-crypto, linux-kernel; +Cc: helei.sig11, pizhenwei
From: lei he <helei.sig11@bytedance.com>
According to PKCS#1 standard, the 'otherPrimeInfos' field contains
the information for the additional primes r_3, ..., r_u, in order.
It shall be omitted if the version is 0 and shall contain at least
one instance of OtherPrimeInfo if the version is 1, see:
https://www.rfc-editor.org/rfc/rfc3447#page-44
Replace the version number '1' with 0, otherwise, some drivers may
not pass the run-time tests.
Signed-off-by: lei he <helei.sig11@bytedance.com>
---
crypto/testmgr.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 4d7449fc6a65..d57f24b906f1 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -186,7 +186,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
#ifndef CONFIG_CRYPTO_FIPS
.key =
"\x30\x81\x9A" /* sequence of 154 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x41" /* modulus - integer of 65 bytes */
"\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
"\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
@@ -216,7 +216,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
}, {
.key =
"\x30\x82\x01\x1D" /* sequence of 285 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x81\x81" /* modulus - integer of 129 bytes */
"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
"\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
@@ -260,7 +260,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
#endif
.key =
"\x30\x82\x02\x20" /* sequence of 544 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x82\x01\x01\x00" /* modulus - integer of 256 bytes */
"\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
"\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* PING: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-15 9:13 [PATCH] crypto: testmgr - fix version number of RSA tests Lei He
@ 2022-06-24 1:53 ` 何磊
2022-06-24 8:54 ` Herbert Xu
0 siblings, 1 reply; 11+ messages in thread
From: 何磊 @ 2022-06-24 1:53 UTC (permalink / raw)
To: herbert, davem, linux-crypto, linux-kernel; +Cc: 何磊, pizhenwei
PING!
> On Jun 15, 2022, at 5:13 PM, Lei He <helei.sig11@bytedance.com> wrote:
>
> From: lei he <helei.sig11@bytedance.com>
>
> According to PKCS#1 standard, the 'otherPrimeInfos' field contains
> the information for the additional primes r_3, ..., r_u, in order.
> It shall be omitted if the version is 0 and shall contain at least
> one instance of OtherPrimeInfo if the version is 1, see:
> https://www.rfc-editor.org/rfc/rfc3447#page-44
>
> Replace the version number '1' with 0, otherwise, some drivers may
> not pass the run-time tests.
>
> Signed-off-by: lei he <helei.sig11@bytedance.com>
> ---
> crypto/testmgr.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/crypto/testmgr.h b/crypto/testmgr.h
> index 4d7449fc6a65..d57f24b906f1 100644
> --- a/crypto/testmgr.h
> +++ b/crypto/testmgr.h
> @@ -186,7 +186,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
> #ifndef CONFIG_CRYPTO_FIPS
> .key =
> "\x30\x81\x9A" /* sequence of 154 bytes */
> - "\x02\x01\x01" /* version - integer of 1 byte */
> + "\x02\x01\x00" /* version - integer of 1 byte */
> "\x02\x41" /* modulus - integer of 65 bytes */
> "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
> "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
> @@ -216,7 +216,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
> }, {
> .key =
> "\x30\x82\x01\x1D" /* sequence of 285 bytes */
> - "\x02\x01\x01" /* version - integer of 1 byte */
> + "\x02\x01\x00" /* version - integer of 1 byte */
> "\x02\x81\x81" /* modulus - integer of 129 bytes */
> "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
> "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
> @@ -260,7 +260,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
> #endif
> .key =
> "\x30\x82\x02\x20" /* sequence of 544 bytes */
> - "\x02\x01\x01" /* version - integer of 1 byte */
> + "\x02\x01\x00" /* version - integer of 1 byte */
> "\x02\x82\x01\x01\x00" /* modulus - integer of 256 bytes */
> "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
> "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: PING: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-24 1:53 ` PING: " 何磊
@ 2022-06-24 8:54 ` Herbert Xu
2022-06-24 10:29 ` [External] " 何磊
0 siblings, 1 reply; 11+ messages in thread
From: Herbert Xu @ 2022-06-24 8:54 UTC (permalink / raw)
To: 何磊; +Cc: davem, linux-crypto, linux-kernel, pizhenwei
On Fri, Jun 24, 2022 at 09:53:02AM +0800, 何磊 wrote:
> PING!
Please resubmit.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [External] PING: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-24 8:54 ` Herbert Xu
@ 2022-06-24 10:29 ` 何磊
2022-06-25 0:32 ` Herbert Xu
0 siblings, 1 reply; 11+ messages in thread
From: 何磊 @ 2022-06-24 10:29 UTC (permalink / raw)
To: Herbert Xu; +Cc: 何磊, davem, linux-crypto, linux-kernel, pizhenwei
> On Jun 24, 2022, at 4:54 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Fri, Jun 24, 2022 at 09:53:02AM +0800, 何磊 wrote:
>> PING!
>
> Please resubmit.
>
Thanks a lot for your reply, a new patch has been sent.
By the way, why this patch needs to be resubmitted. Please let me know if I have made any mistakes.
> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [External] PING: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-24 10:29 ` [External] " 何磊
@ 2022-06-25 0:32 ` Herbert Xu
2022-06-27 6:16 ` Lei He
0 siblings, 1 reply; 11+ messages in thread
From: Herbert Xu @ 2022-06-25 0:32 UTC (permalink / raw)
To: 何磊; +Cc: davem, linux-crypto, linux-kernel, pizhenwei
On Fri, Jun 24, 2022 at 06:29:29PM +0800, 何磊 wrote:
>
>
> > On Jun 24, 2022, at 4:54 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >
> > On Fri, Jun 24, 2022 at 09:53:02AM +0800, 何磊 wrote:
> >> PING!
> >
> > Please resubmit.
> >
>
> Thanks a lot for your reply, a new patch has been sent.
> By the way, why this patch needs to be resubmitted. Please let me know if I have made any mistakes.
You first sent a subsequent version that superceded the
original patch. That subsequent patch was then dismissed because
you replied in the thread saying that it needed changes.
Please be more careful in how you send patches and thread them.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [External] PING: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-25 0:32 ` Herbert Xu
@ 2022-06-27 6:16 ` Lei He
2022-06-27 6:47 ` Lei He
0 siblings, 1 reply; 11+ messages in thread
From: Lei He @ 2022-06-27 6:16 UTC (permalink / raw)
To: Herbert Xu; +Cc: Lei He, davem, linux-crypto, linux-kernel, pizhenwei
> On Jun 25, 2022, at 8:32 AM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Fri, Jun 24, 2022 at 06:29:29PM +0800, 何磊 wrote:
>>
>>
>>> On Jun 24, 2022, at 4:54 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>>>
>>> On Fri, Jun 24, 2022 at 09:53:02AM +0800, 何磊 wrote:
>>>> PING!
>>>
>>> Please resubmit.
>>>
>>
>> Thanks a lot for your reply, a new patch has been sent.
>> By the way, why this patch needs to be resubmitted. Please let me know if I have made any mistakes.
>
> You first sent a subsequent version that superceded the
> original patch. That subsequent patch was then dismissed because
> you replied in the thread saying that it needed changes.
>
> Please be more careful in how you send patches and thread them.
Thanks for the explanation, now all patches have been resubmitted. Sorry
for the extra trouble, I'll be more careful in the future.
>
> Cheers,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [External] PING: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-27 6:16 ` Lei He
@ 2022-06-27 6:47 ` Lei He
0 siblings, 0 replies; 11+ messages in thread
From: Lei He @ 2022-06-27 6:47 UTC (permalink / raw)
To: Herbert Xu; +Cc: Lei He, davem, linux-crypto, linux-kernel, pizhenwei
> On Jun 27, 2022, at 2:16 PM, Lei He <helei.sig11@bytedance.com> wrote:
>
>>
>> On Jun 25, 2022, at 8:32 AM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>>
>> On Fri, Jun 24, 2022 at 06:29:29PM +0800, 何磊 wrote:
>>>
>>>
>>>> On Jun 24, 2022, at 4:54 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>>>>
>>>> On Fri, Jun 24, 2022 at 09:53:02AM +0800, 何磊 wrote:
>>>>> PING!
>>>>
>>>> Please resubmit.
>>>>
>>>
>>> Thanks a lot for your reply, a new patch has been sent.
>>> By the way, why this patch needs to be resubmitted. Please let me know if I have made any mistakes.
>>
>> You first sent a subsequent version that superceded the
>> original patch. That subsequent patch was then dismissed because
>> you replied in the thread saying that it needed changes.
>>
>> Please be more careful in how you send patches and thread them.
>
> Thanks for the explanation, now all patches have been resubmitted. Sorry
> for the extra trouble, I'll be more careful in the future.
Here are the links to the latest patches:
https://lkml.org/lkml/2022/6/23/150
https://lkml.org/lkml/2022/6/24/357
>
>>
>> Cheers,
>> --
>> Email: Herbert Xu <herbert@gondor.apana.org.au>
>> Home Page: http://gondor.apana.org.au/~herbert/
>> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 0/4] virtio-crypto: support ECDSA algorithm
@ 2022-06-17 7:07 Lei He
2022-06-17 7:07 ` [PATCH] crypto: testmgr - fix version number of RSA tests Lei He
0 siblings, 1 reply; 11+ messages in thread
From: Lei He @ 2022-06-17 7:07 UTC (permalink / raw)
To: herbert, davem, dhowells, mst
Cc: arei.gonglei, jasowang, linux-crypto, linux-kernel, pizhenwei,
helei.sig11, f4bug, berrange
From: lei he <helei.sig11@bytedance.com>
This patch supports the ECDSA algorithm for virtio-crypto:
1. fixed the problem that the max_signature_size of ECDSA is
incorrectly calculated.
2. make pkcs8_private_key_parser can identify ECDSA private keys.
3. implement ECDSA algorithm for virtio-crypto device
lei he (4):
crypto: fix the calculation of max_size for ECDSA
crypto: pkcs8 parser support ECDSA private keys
crypto: remove unused field in pkcs8_parse_context
virtio-crypto: support ECDSA algorithm
crypto/Kconfig | 1 +
crypto/Makefile | 2 +
crypto/akcipher.c | 10 +
crypto/asymmetric_keys/pkcs8.asn1 | 2 +-
crypto/asymmetric_keys/pkcs8_parser.c | 46 +++-
crypto/ecdsa.c | 3 +-
crypto/ecdsa_helper.c | 45 +++
.../virtio/virtio_crypto_akcipher_algs.c | 259 ++++++++++++++++--
include/crypto/internal/ecdsa.h | 15 +
include/linux/asn1_encoder.h | 2 +
lib/asn1_encoder.c | 3 +-
11 files changed, 360 insertions(+), 28 deletions(-)
create mode 100644 crypto/ecdsa_helper.c
create mode 100644 include/crypto/internal/ecdsa.h
--
2.20.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-17 7:07 [PATCH 0/4] virtio-crypto: support ECDSA algorithm Lei He
@ 2022-06-17 7:07 ` Lei He
2022-06-19 7:09 ` Michael S. Tsirkin
0 siblings, 1 reply; 11+ messages in thread
From: Lei He @ 2022-06-17 7:07 UTC (permalink / raw)
To: herbert, davem, dhowells, mst
Cc: arei.gonglei, jasowang, linux-crypto, linux-kernel, pizhenwei,
helei.sig11, f4bug, berrange
From: lei he <helei.sig11@bytedance.com>
According to PKCS#1 standard, the 'otherPrimeInfos' field contains
the information for the additional primes r_3, ..., r_u, in order.
It shall be omitted if the version is 0 and shall contain at least
one instance of OtherPrimeInfo if the version is 1, see:
https://www.rfc-editor.org/rfc/rfc3447#page-44
Replace the version number '1' with 0, otherwise, some drivers may
not pass the run-time tests.
Signed-off-by: lei he <helei.sig11@bytedance.com>
---
crypto/testmgr.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 4d7449fc6a65..d57f24b906f1 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -186,7 +186,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
#ifndef CONFIG_CRYPTO_FIPS
.key =
"\x30\x81\x9A" /* sequence of 154 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x41" /* modulus - integer of 65 bytes */
"\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
"\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
@@ -216,7 +216,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
}, {
.key =
"\x30\x82\x01\x1D" /* sequence of 285 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x81\x81" /* modulus - integer of 129 bytes */
"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
"\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
@@ -260,7 +260,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
#endif
.key =
"\x30\x82\x02\x20" /* sequence of 544 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x82\x01\x01\x00" /* modulus - integer of 256 bytes */
"\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
"\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-17 7:07 ` [PATCH] crypto: testmgr - fix version number of RSA tests Lei He
@ 2022-06-19 7:09 ` Michael S. Tsirkin
0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2022-06-19 7:09 UTC (permalink / raw)
To: Lei He
Cc: herbert, davem, dhowells, arei.gonglei, jasowang, linux-crypto,
linux-kernel, pizhenwei, f4bug, berrange
On Fri, Jun 17, 2022 at 03:07:51PM +0800, Lei He wrote:
> From: lei he <helei.sig11@bytedance.com>
>
> According to PKCS#1 standard, the 'otherPrimeInfos' field contains
> the information for the additional primes r_3, ..., r_u, in order.
> It shall be omitted if the version is 0 and shall contain at least
> one instance of OtherPrimeInfo if the version is 1, see:
> https://www.rfc-editor.org/rfc/rfc3447#page-44
>
> Replace the version number '1' with 0, otherwise, some drivers may
> not pass the run-time tests.
>
> Signed-off-by: lei he <helei.sig11@bytedance.com>
Why is this posted as part of the virtio-crypto patchset thread though?
> ---
> crypto/testmgr.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/crypto/testmgr.h b/crypto/testmgr.h
> index 4d7449fc6a65..d57f24b906f1 100644
> --- a/crypto/testmgr.h
> +++ b/crypto/testmgr.h
> @@ -186,7 +186,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
> #ifndef CONFIG_CRYPTO_FIPS
> .key =
> "\x30\x81\x9A" /* sequence of 154 bytes */
> - "\x02\x01\x01" /* version - integer of 1 byte */
> + "\x02\x01\x00" /* version - integer of 1 byte */
> "\x02\x41" /* modulus - integer of 65 bytes */
> "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
> "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
> @@ -216,7 +216,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
> }, {
> .key =
> "\x30\x82\x01\x1D" /* sequence of 285 bytes */
> - "\x02\x01\x01" /* version - integer of 1 byte */
> + "\x02\x01\x00" /* version - integer of 1 byte */
> "\x02\x81\x81" /* modulus - integer of 129 bytes */
> "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
> "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
> @@ -260,7 +260,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
> #endif
> .key =
> "\x30\x82\x02\x20" /* sequence of 544 bytes */
> - "\x02\x01\x01" /* version - integer of 1 byte */
> + "\x02\x01\x00" /* version - integer of 1 byte */
> "\x02\x82\x01\x01\x00" /* modulus - integer of 256 bytes */
> "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
> "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
> --
> 2.20.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] crypto: testmgr - fix version number of RSA tests
@ 2022-06-24 10:06 Lei He
2022-06-30 8:16 ` Herbert Xu
0 siblings, 1 reply; 11+ messages in thread
From: Lei He @ 2022-06-24 10:06 UTC (permalink / raw)
To: herbert, davem; +Cc: linux-crypto, linux-kernel, pizhenwei, lei he
From: lei he <helei.sig11@bytedance.com>
According to PKCS#1 standard, the 'otherPrimeInfos' field contains
the information for the additional primes r_3, ..., r_u, in order.
It shall be omitted if the version is 0 and shall contain at least
one instance of OtherPrimeInfo if the version is 1, see:
https://www.rfc-editor.org/rfc/rfc3447#page-44
Replace the version number '1' with 0, otherwise, some drivers may
not pass the run-time tests.
Signed-off-by: lei he <helei.sig11@bytedance.com>
---
crypto/testmgr.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 4d7449fc6a65..d57f24b906f1 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -186,7 +186,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
#ifndef CONFIG_CRYPTO_FIPS
.key =
"\x30\x81\x9A" /* sequence of 154 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x41" /* modulus - integer of 65 bytes */
"\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
"\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
@@ -216,7 +216,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
}, {
.key =
"\x30\x82\x01\x1D" /* sequence of 285 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x81\x81" /* modulus - integer of 129 bytes */
"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
"\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
@@ -260,7 +260,7 @@ static const struct akcipher_testvec rsa_tv_template[] = {
#endif
.key =
"\x30\x82\x02\x20" /* sequence of 544 bytes */
- "\x02\x01\x01" /* version - integer of 1 byte */
+ "\x02\x01\x00" /* version - integer of 1 byte */
"\x02\x82\x01\x01\x00" /* modulus - integer of 256 bytes */
"\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
"\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
base-commit: 92f20ff72066d8d7e2ffb655c2236259ac9d1c5d
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] crypto: testmgr - fix version number of RSA tests
2022-06-24 10:06 Lei He
@ 2022-06-30 8:16 ` Herbert Xu
0 siblings, 0 replies; 11+ messages in thread
From: Herbert Xu @ 2022-06-30 8:16 UTC (permalink / raw)
To: Lei He; +Cc: davem, linux-crypto, linux-kernel, pizhenwei
On Fri, Jun 24, 2022 at 06:06:25PM +0800, Lei He wrote:
> From: lei he <helei.sig11@bytedance.com>
>
> According to PKCS#1 standard, the 'otherPrimeInfos' field contains
> the information for the additional primes r_3, ..., r_u, in order.
> It shall be omitted if the version is 0 and shall contain at least
> one instance of OtherPrimeInfo if the version is 1, see:
> https://www.rfc-editor.org/rfc/rfc3447#page-44
>
> Replace the version number '1' with 0, otherwise, some drivers may
> not pass the run-time tests.
>
> Signed-off-by: lei he <helei.sig11@bytedance.com>
> ---
> crypto/testmgr.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-06-30 8:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 9:13 [PATCH] crypto: testmgr - fix version number of RSA tests Lei He
2022-06-24 1:53 ` PING: " 何磊
2022-06-24 8:54 ` Herbert Xu
2022-06-24 10:29 ` [External] " 何磊
2022-06-25 0:32 ` Herbert Xu
2022-06-27 6:16 ` Lei He
2022-06-27 6:47 ` Lei He
2022-06-17 7:07 [PATCH 0/4] virtio-crypto: support ECDSA algorithm Lei He
2022-06-17 7:07 ` [PATCH] crypto: testmgr - fix version number of RSA tests Lei He
2022-06-19 7:09 ` Michael S. Tsirkin
2022-06-24 10:06 Lei He
2022-06-30 8:16 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.