linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Information required on how to provide reseed input to DRBG
@ 2020-08-13  9:01 Bhat, Jayalakshmi Manjunath
  2020-08-13 15:17 ` Stephan Mueller
  0 siblings, 1 reply; 5+ messages in thread
From: Bhat, Jayalakshmi Manjunath @ 2020-08-13  9:01 UTC (permalink / raw)
  To: linux-crypto

Hi All,

I could successfully execute the CAVS test for DRBG with  ""predResistanceEnabled" : true" reseedImplemented": false. 

I am trying to execute the tests with "predResistanceEnabled" : false; "reseedImplemented" : true. But not successful.

Can anyone please let me know how to provide reseed data to DRBG?

Regards.
Jayalakshmi



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Information required on how to provide reseed input to DRBG
  2020-08-13  9:01 Information required on how to provide reseed input to DRBG Bhat, Jayalakshmi Manjunath
@ 2020-08-13 15:17 ` Stephan Mueller
  2020-08-13 15:56   ` Bhat, Jayalakshmi Manjunath
  0 siblings, 1 reply; 5+ messages in thread
From: Stephan Mueller @ 2020-08-13 15:17 UTC (permalink / raw)
  To: linux-crypto, Bhat, Jayalakshmi Manjunath

Am Donnerstag, 13. August 2020, 11:01:27 CEST schrieb Bhat, Jayalakshmi 
Manjunath:

Hi Jayalakshmi,

> Hi All,
> 
> I could successfully execute the CAVS test for DRBG with 
> ""predResistanceEnabled" : true" reseedImplemented": false.
> 
> I am trying to execute the tests with "predResistanceEnabled" : false;
> "reseedImplemented" : true. But not successful.
> 
> Can anyone please let me know how to provide reseed data to DRBG?

See, for example, how drbg_nopr_sha256_tv_template is processed with 
drbg_cavs_test()
> 
> Regards.
> Jayalakshmi


Ciao
Stephan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Information required on how to provide reseed input to DRBG
  2020-08-13 15:17 ` Stephan Mueller
@ 2020-08-13 15:56   ` Bhat, Jayalakshmi Manjunath
  2020-08-14 16:42     ` Stephan Mueller
  0 siblings, 1 reply; 5+ messages in thread
From: Bhat, Jayalakshmi Manjunath @ 2020-08-13 15:56 UTC (permalink / raw)
  To: Stephan Mueller, linux-crypto

Hi Stephen,

Thanks you very much on the response. I actually went through the code that you mentioned. My question is on inputting reseed. Example input I have is something like this

"entropyInput" : "F929692DF52BC06878F67A4DBC76471C03981B987FF09BF7E29C18AD6F7F8397",
"nonce" : "8DB5A7ECEC06078C1C41D2C80AB6CB5EDFE00EA7B1AA6F4F907E80C9BAA008CE",
"persoString" : "C99B39DD7B8FB0F772",
"otherInput" : 
	 {
		"intendedUse" : "reSeed",
	        	"additionalInput" :  "32ED729CD8FCC001B6B2703F0DBE04D5EED127A615212FEC967566ABBFBC8913027D ",
		"entropyInput" : "6FE46781AF69B38550A4D2C3888C8E515D28A2A4F141A041F3E2E9A753E46A30"
     	 }, 
	 {
		"intendedUse" : "generate",
		 "additionalInput" : "3C758EC9ECFD905E5865FD8343556815FBD8A064846252CBC161BFEAAC4FA9AF4D0DB8D8B9FD2E06B2C7A3FD55",
	        	"entropyInput" : ""
	}, 
	{
		"intendedUse" : "generate",
		"additionalInput" : "8F8F3F52D2CEF7FA788E984DA152ECA82CF0493E37985E387B3CFCEC2639F610431CA0A81F740C4CD65230DD291733",
        		"entropyInput" : ""
	}

I understood 
how to use " entropyInput", " nonce" and " persoString". 
how to use " additionalInput" and " entropyInput" from generate section. 
My question is how to I use " additionalInput" and " entropyInput" from reSeed section. 

I could see only below APIs available to set the values.
crypto_drbg_get_bytes_addtl_test { crypto_rng_set_entropy, crypto_rng_generate)
crypto_drbg_reset_test {crypto_rng_set_entropy, crypto_rng_reset}
crypto_drbg_get_bytes_addtl { crypto_rng_generate)

I am not seeing any API to input reseed values or to trigger reseed?  

Regards,
Jaya


-----Original Message-----
From: linux-crypto-owner@vger.kernel.org <linux-crypto-owner@vger.kernel.org> On Behalf Of Stephan Mueller
Sent: Thursday, August 13, 2020 8:48 PM
To: linux-crypto@vger.kernel.org; Bhat, Jayalakshmi Manjunath <jayalakshmi.bhat@hp.com>
Subject: Re: Information required on how to provide reseed input to DRBG

Am Donnerstag, 13. August 2020, 11:01:27 CEST schrieb Bhat, Jayalakshmi
Manjunath:

Hi Jayalakshmi,

> Hi All,
> 
> I could successfully execute the CAVS test for DRBG with 
> ""predResistanceEnabled" : true" reseedImplemented": false.
> 
> I am trying to execute the tests with "predResistanceEnabled" : false; 
> "reseedImplemented" : true. But not successful.
> 
> Can anyone please let me know how to provide reseed data to DRBG?

See, for example, how drbg_nopr_sha256_tv_template is processed with
drbg_cavs_test()
> 
> Regards.
> Jayalakshmi


Ciao
Stephan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Information required on how to provide reseed input to DRBG
  2020-08-13 15:56   ` Bhat, Jayalakshmi Manjunath
@ 2020-08-14 16:42     ` Stephan Mueller
  2020-08-16 15:23       ` Bhat, Jayalakshmi Manjunath
  0 siblings, 1 reply; 5+ messages in thread
From: Stephan Mueller @ 2020-08-14 16:42 UTC (permalink / raw)
  To: linux-crypto, Bhat, Jayalakshmi Manjunath

Am Donnerstag, 13. August 2020, 17:56:49 CEST schrieb Bhat, Jayalakshmi 
Manjunath:

Hi Jayalakshmi,

> Hi Stephen,
> 
> Thanks you very much on the response. I actually went through the code that
> you mentioned. My question is on inputting reseed. Example input I have is
> something like this
> 
> "entropyInput" :
> "F929692DF52BC06878F67A4DBC76471C03981B987FF09BF7E29C18AD6F7F8397", "nonce"
> : "8DB5A7ECEC06078C1C41D2C80AB6CB5EDFE00EA7B1AA6F4F907E80C9BAA008CE",
> "persoString" : "C99B39DD7B8FB0F772",
> "otherInput" :
> 	 {
> 		"intendedUse" : "reSeed",
> 	        	"additionalInput" : 
> "32ED729CD8FCC001B6B2703F0DBE04D5EED127A615212FEC967566ABBFBC8913027D ",
> "entropyInput" :
> "6FE46781AF69B38550A4D2C3888C8E515D28A2A4F141A041F3E2E9A753E46A30" },
> 	 {
> 		"intendedUse" : "generate",
> 		 "additionalInput" :
> "3C758EC9ECFD905E5865FD8343556815FBD8A064846252CBC161BFEAAC4FA9AF4D0DB8D8B9
> FD2E06B2C7A3FD55", "entropyInput" : ""
> 	},
> 	{
> 		"intendedUse" : "generate",
> 		"additionalInput" :
> "8F8F3F52D2CEF7FA788E984DA152ECA82CF0493E37985E387B3CFCEC2639F610431CA0A81F
> 740C4CD65230DD291733", "entropyInput" : ""
> 	}

Here is my code for that:


drbg_string_fill(&testentropy, entropyreseed->data,
				 entropyreseed->len);
drbg_string_fill(&addtl, addtlreseed->data, addtlreseed->len);
ret = crypto_drbg_reset_test(drng, &addtl, &test_data);

> 
> I understood
> how to use " entropyInput", " nonce" and " persoString".
> how to use " additionalInput" and " entropyInput" from generate section.
> My question is how to I use " additionalInput" and " entropyInput" from
> reSeed section.
> 
> I could see only below APIs available to set the values.
> crypto_drbg_get_bytes_addtl_test { crypto_rng_set_entropy,
> crypto_rng_generate) crypto_drbg_reset_test {crypto_rng_set_entropy,
> crypto_rng_reset}
> crypto_drbg_get_bytes_addtl { crypto_rng_generate)
> 
> I am not seeing any API to input reseed values or to trigger reseed?
> 
> Regards,
> Jaya
> 
> 
> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org
> <linux-crypto-owner@vger.kernel.org> On Behalf Of Stephan Mueller Sent:
> Thursday, August 13, 2020 8:48 PM
> To: linux-crypto@vger.kernel.org; Bhat, Jayalakshmi Manjunath
> <jayalakshmi.bhat@hp.com> Subject: Re: Information required on how to
> provide reseed input to DRBG
> 
> Am Donnerstag, 13. August 2020, 11:01:27 CEST schrieb Bhat, Jayalakshmi
> Manjunath:
> 
> Hi Jayalakshmi,
> 
> > Hi All,
> > 
> > I could successfully execute the CAVS test for DRBG with
> > ""predResistanceEnabled" : true" reseedImplemented": false.
> > 
> > I am trying to execute the tests with "predResistanceEnabled" : false;
> > "reseedImplemented" : true. But not successful.
> > 
> > Can anyone please let me know how to provide reseed data to DRBG?
> 
> See, for example, how drbg_nopr_sha256_tv_template is processed with
> drbg_cavs_test()
> 
> > Regards.
> > Jayalakshmi
> 
> Ciao
> Stephan


Ciao
Stephan



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Information required on how to provide reseed input to DRBG
  2020-08-14 16:42     ` Stephan Mueller
@ 2020-08-16 15:23       ` Bhat, Jayalakshmi Manjunath
  0 siblings, 0 replies; 5+ messages in thread
From: Bhat, Jayalakshmi Manjunath @ 2020-08-16 15:23 UTC (permalink / raw)
  To: Stephan Mueller, linux-crypto

Hi Stephan,

Thank you. Initially I was thinking this is the approach. However I was confused on drbg instance state.
This worked well. Thank you very much once again.

Regards,
Jayalakshmi

-----Original Message-----
From: Stephan Mueller <smueller@chronox.de> 
Sent: Friday, August 14, 2020 10:13 PM
To: linux-crypto@vger.kernel.org; Bhat, Jayalakshmi Manjunath <jayalakshmi.bhat@hp.com>
Subject: Re: Information required on how to provide reseed input to DRBG

Am Donnerstag, 13. August 2020, 17:56:49 CEST schrieb Bhat, Jayalakshmi
Manjunath:

Hi Jayalakshmi,

> Hi Stephen,
> 
> Thanks you very much on the response. I actually went through the code 
> that you mentioned. My question is on inputting reseed. Example input 
> I have is something like this
> 
> "entropyInput" :
> "F929692DF52BC06878F67A4DBC76471C03981B987FF09BF7E29C18AD6F7F8397", "nonce"
> : "8DB5A7ECEC06078C1C41D2C80AB6CB5EDFE00EA7B1AA6F4F907E80C9BAA008CE",
> "persoString" : "C99B39DD7B8FB0F772",
> "otherInput" :
> 	 {
> 		"intendedUse" : "reSeed",
> 	        	"additionalInput" : 
> "32ED729CD8FCC001B6B2703F0DBE04D5EED127A615212FEC967566ABBFBC8913027D 
> ", "entropyInput" :
> "6FE46781AF69B38550A4D2C3888C8E515D28A2A4F141A041F3E2E9A753E46A30" },
> 	 {
> 		"intendedUse" : "generate",
> 		 "additionalInput" :
> "3C758EC9ECFD905E5865FD8343556815FBD8A064846252CBC161BFEAAC4FA9AF4D0DB
> 8D8B9 FD2E06B2C7A3FD55", "entropyInput" : ""
> 	},
> 	{
> 		"intendedUse" : "generate",
> 		"additionalInput" :
> "8F8F3F52D2CEF7FA788E984DA152ECA82CF0493E37985E387B3CFCEC2639F610431CA
> 0A81F 740C4CD65230DD291733", "entropyInput" : ""
> 	}

Here is my code for that:


drbg_string_fill(&testentropy, entropyreseed->data,
				 entropyreseed->len);
drbg_string_fill(&addtl, addtlreseed->data, addtlreseed->len); ret = crypto_drbg_reset_test(drng, &addtl, &test_data);

> 
> I understood
> how to use " entropyInput", " nonce" and " persoString".
> how to use " additionalInput" and " entropyInput" from generate section.
> My question is how to I use " additionalInput" and " entropyInput" 
> from reSeed section.
> 
> I could see only below APIs available to set the values.
> crypto_drbg_get_bytes_addtl_test { crypto_rng_set_entropy,
> crypto_rng_generate) crypto_drbg_reset_test {crypto_rng_set_entropy, 
> crypto_rng_reset} crypto_drbg_get_bytes_addtl { crypto_rng_generate)
> 
> I am not seeing any API to input reseed values or to trigger reseed?
> 
> Regards,
> Jaya
> 
> 
> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org
> <linux-crypto-owner@vger.kernel.org> On Behalf Of Stephan Mueller Sent:
> Thursday, August 13, 2020 8:48 PM
> To: linux-crypto@vger.kernel.org; Bhat, Jayalakshmi Manjunath 
> <jayalakshmi.bhat@hp.com> Subject: Re: Information required on how to 
> provide reseed input to DRBG
> 
> Am Donnerstag, 13. August 2020, 11:01:27 CEST schrieb Bhat, 
> Jayalakshmi
> Manjunath:
> 
> Hi Jayalakshmi,
> 
> > Hi All,
> > 
> > I could successfully execute the CAVS test for DRBG with 
> > ""predResistanceEnabled" : true" reseedImplemented": false.
> > 
> > I am trying to execute the tests with "predResistanceEnabled" : 
> > false; "reseedImplemented" : true. But not successful.
> > 
> > Can anyone please let me know how to provide reseed data to DRBG?
> 
> See, for example, how drbg_nopr_sha256_tv_template is processed with
> drbg_cavs_test()
> 
> > Regards.
> > Jayalakshmi
> 
> Ciao
> Stephan


Ciao
Stephan



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-16 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13  9:01 Information required on how to provide reseed input to DRBG Bhat, Jayalakshmi Manjunath
2020-08-13 15:17 ` Stephan Mueller
2020-08-13 15:56   ` Bhat, Jayalakshmi Manjunath
2020-08-14 16:42     ` Stephan Mueller
2020-08-16 15:23       ` Bhat, Jayalakshmi Manjunath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).