public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io, Rebecca Cran <rebecca@nuviainc.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>,
	 Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	Ard Biesheuvel <Ard.Biesheuvel@arm.com>,
	 "leif@nuviainc.com" <leif@nuviainc.com>,
	"rfc@edk2.groups.io" <rfc@edk2.groups.io>,
	 Jiewen Yao <jiewen.yao@intel.com>,
	Rahul Kumar <rahul1.kumar@intel.com>, nd <nd@arm.com>,
	 Jose Marinho <Jose.Marinho@arm.com>
Subject: Re: [edk2-devel] RFC: Adding support for ARM (RNDR etc.) to RngDxe
Date: Thu, 11 Feb 2021 19:26:25 +0100	[thread overview]
Message-ID: <CAMj1kXFK=uFtF_F8S7PhWn_TQJzFm2HMC4Ns5Uh4vOFLtmQzrw@mail.gmail.com> (raw)
In-Reply-To: <dd307ec4-4b5f-4e98-aa32-3a145971548e@nuviainc.com>

On Wed, 10 Feb 2021 at 23:49, Rebecca Cran <rebecca@nuviainc.com> wrote:
>
> On 1/15/21 7:51 PM, Sami Mujawar wrote:
>
> > I have shared some initial thoughts on the RNG implementation updates at https://edk2.groups.io/g/devel/files/Designs/2021/0116/EDKII%20-%20Proposed%20update%20to%20RNG%20implementation.pdf
> >
> > Kindly let me know your feedback or if you have any queries.
> The ARMv8.5 RNDRRS instruction appears to be missing from the diagram on
> page 11 - it has RngLib|RNDR, which is listed under PRNG, but RNDRRS
> returns a true random number. From the Arm ARM:
>
> "Returns a 64-bit random number which is reseeded from the True
> Random Number source immediately before the read of the random number."
>

This is an unfortunate oversight in the architecture, but RNDRRS most
certainly does not return a true random number.

RNDR and RNDRRS both return the output of a DRBG (pseudo RNG), and the
only difference is the reseed rate: RNDRRS triggers a reseed on every
invocation, whereas RNDR triggers a reseed at an IMPDEF rate.

  reply	other threads:[~2021-02-11 18:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  4:32 RFC: Adding support for ARM (RNDR etc.) to RngDxe Rebecca Cran
2020-12-09  4:47 ` [edk2-devel] " Samer El-Haj-Mahmoud
2020-12-10 11:26   ` Sami Mujawar
2020-12-10 12:52     ` Leif Lindholm
2020-12-10 13:43       ` [edk2-rfc] " Yao, Jiewen
2021-01-14 21:05     ` Rebecca Cran
2021-01-16  2:51       ` Sami Mujawar
2021-02-10 22:49         ` Rebecca Cran
2021-02-11 18:26           ` Ard Biesheuvel [this message]
2021-04-20 20:04         ` Rebecca Cran
2021-04-22  9:30           ` Sami Mujawar
2021-04-26 14:45             ` Rebecca Cran
2021-04-26 21:28             ` Rebecca Cran
2021-04-26 21:45               ` [EXTERNAL] " Bret Barkelew
2021-04-27 13:22                 ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMj1kXFK=uFtF_F8S7PhWn_TQJzFm2HMC4Ns5Uh4vOFLtmQzrw@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox