Date: Tue, 14 Jul 2015 05:25:38 +1000 From: Peter Jeremy <peter@rulingia.com> To: Mark Murray <markm@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285439 - head/sys/dev/random Message-ID: <20150713192538.GF22240@server.rulingia.com> In-Reply-To: <201507130838.t6D8cLEZ076018@repo.freebsd.org> References: <201507130838.t6D8cLEZ076018@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--XvKFcGCOAo53UbWW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2015-Jul-13 08:38:21 +0000, Mark Murray <markm@FreeBSD.org> wrote: >+ /* >+ * Belt-and-braces. >+ * Round up the read length to a crypto block size multiple, >+ * which is what the underlying generator is expecting. >+ * See the random_buf size requirements in the Yarrow/Fortuna code. >+ */ >+ read_len +=3D RANDOM_BLOCKSIZE; >+ read_len -=3D read_len % RANDOM_BLOCKSIZE; Note that if read_len was already a multiple of RANDOM_BLOCKSIZE, this will pad it by an additional RANDOM_BLOCKSIZE. I don't think this matters but it's not what the comment implies. (The comment also goes over 80 columns). --=20 Peter Jeremy --XvKFcGCOAo53UbWW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVpBCyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0viwP+QGhNPciPwB55B7xQicXu5j0 +u3q/yPDnS5rMoh++DpLwYtwrs/X5aYz/1lgblH/Hp+qdiNBYwpOq+9mAMti/v6n YDAU3/PmVpBxp9lCcIRCs1fLlloeulJp2PnHHSwyXixdkJ26Lj4en3nnAlG8ZG1E Ysx1XeZIAHjGxcR518DTd5UriXjkncczOGYXXBo5YkkYC2uK8yxBWD7U/MexOAxh IyMGbV0eymAsAFVLvq3XAtyI4bRIp8eTM9iNz+6phrpx9opZUesDlk4b7bJY7KtC 9lTglEElHdUV/4qftq/WlNNDYdBcFbf5WiKctnS68yyoLl3NNqJ+fViXKZ39OOku 5cvfFWzsuBm1rLARr589yoZNoP+lntpoGxXNNVPzFbBlQVw+oDAb+kLfrL/hrTxX OT9Q1nypwyDJGQSsYOU3PQIPryFPwQxOaZsuSmJMN0Q+GoTxB5umCaQutkoshu2p VGjdKYjDULrky1Kkfhi0fhhJYALciNMvkGfBETCikB1LxjV8JyZRoO7wvlsgIpB7 Um+WIUEpb1aN1pvCseWEI6avWA32XB5u4dSReJj0dQR4WWpn0SE0YDuseej8A0OY ye9ylbrl7xluvzw1/wmo7wZ3ruI8VyGSLdOas51KnioQ+YIm8843rm9NOEM034th NIAvaKAlqR12qBNXIAOs =9Tr6 -----END PGP SIGNATURE----- --XvKFcGCOAo53UbWW--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150713192538.GF22240>