From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [Patch v2 0/2] Use RngLib instead of TimerLib for OpensslLib To: Michael D Kinney ,devel@edk2.groups.io From: "Matthew Carlson" X-Originating-Location: Everett, Washington, US (50.34.40.129) X-Originating-Platform: Windows Chrome 84 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 31 Jul 2020 13:15:45 -0700 References: In-Reply-To: Message-ID: <7762.1596226545346567006@groups.io> Content-Type: multipart/alternative; boundary="Vn24dyDlGAeEizZx5gpi" --Vn24dyDlGAeEizZx5gpi Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hey Mike! Thanks for the comments. I've addressed the feedback below. 1. All good comments. I think I've addressed them all. New patch series sh= ould be coming soon. 2. This is a problem for BaseCryptLibOnProtocol. We can't use a null lib f= or RngLib since it explodes when it tries to seed OpenSSL with entropy. I t= hink for now, let's stick with established dependencies and figure this out= at a later date. I added an RngLib that uses the DXE RNG Protocol. 3. I don't see a typo? Calls=C2=A0RandomNumber64=C2=A0to=C2=A0fill a=C2=A0buffer=C2=A0of=C2=A0arbitrary=C2=A0size=C2=A0with=C2=A0random=C2=A0= bytes. @param [in]=C2=A0=C2=A0=C2=A0Length=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= = =A0=C2=A0Size=C2=A0of=C2=A0the=C2=A0buffer,=C2=A0in=C2=A0bytes,=C2=A0=C2= =A0to=C2=A0fill=C2=A0with. @param [out]=C2=A0=C2=A0RandBuffer=C2=A0=C2=A0=C2=A0=C2=A0Pointer=C2=A0to= =C2=A0the=C2=A0buffer=C2=A0to=C2=A0store=C2=A0the=C2=A0random=C2=A0result. @retval True=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Random=C2=A0by= tes=C2=A0generation=C2=A0succeeded. @retval False=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Failed=C2=A0to=C2= =A0request=C2=A0random=C2=A0bytes. -- - Matthew Carlson --Vn24dyDlGAeEizZx5gpi Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Hey Mike!

Thanks for the comments. I've addressed the feedbac= k below.

1. All good comments. I think I've addressed them all. = New patch series should be coming soon.

2. This is a problem for= BaseCryptLibOnProtocol. We can't use a null lib for RngLib since it explod= es when it tries to seed OpenSSL with entropy. I think for now, let's stick= with established dependencies and figure this out at a later date. I added= an RngLib that uses the DXE RNG Protocol. 

3. I don't see = a typo? 

  Calls RandomNumber64=  to fill
  a buffer of&nbs= p;arbitrary size with random bytes.

  @param[in]  =  Length        Size of&nb= sp;the buffer, in bytes,  to fill with.<= /span>
  @param[out]  = ;RandBuffer    Pointer to the buffer&nbs= p;to store the random result.

  @retval True = ;       Random bytes generatio= n succeeded.
  @retval False&nbs= p;      Failed to request rand= om bytes.
 = ;

--
- Matthew Carlson

--Vn24dyDlGAeEizZx5gpi--