<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>247581</bug_id>
          
          <creation_ts>2022-11-07 13:03:57 -0800</creation_ts>
          <short_desc>Improve clarity of cryptographically random number functions</short_desc>
          <delta_ts>2022-11-10 16:32:09 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=247471</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=247756</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>247758</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Adler">darin</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>don.olmstead</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1910854</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-11-07 13:03:57 -0800</bug_when>
    <thetext>1) Change the 3 callers of cryptographicallyRandomUint32 to use cryptographicallyRandomNumber instead.
2) Remove cryptographicallyRandomUint32.
3) Move cryptographicallyRandomUint64 to CryptographicallyRandomNumber.h
4) Move cryptographicallyRandomUnitInterval to CryptographicallyRandomNumber.h.
5) Rename cryptographicallyRandomUint64 to cryptographicallyRandomUInt64 or cryptographicallyRandom&lt;uint64_t&gt;.
6) Consider renaming cryptographicallyRandomNumber to cryptographicallyRandomUInt32 or cryptographicallyRandom&lt;uint32_t&gt;.
7) Consider renaming weakRandom to weakRandomUInt32 or weakRandom&lt;uint32_t&gt;.
8) Consider renaming RandomNumber.h to WeakRandomNumber.h.
9) Document that cryptographicallyRandomUnitInterval has only 32 bits of randomness in it to further discourage uninformed use of it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1910865</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-11-07 13:39:08 -0800</bug_when>
    <thetext>&lt;rdar://problem/102057413&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1910909</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-11-07 15:50:17 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/6227</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911323</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-11-09 11:42:13 -0800</bug_when>
    <thetext>Committed 256493@main (017574a4e19b): &lt;https://commits.webkit.org/256493@main&gt;

Reviewed commits have been landed. Closing PR #6227 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911638</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2022-11-10 13:33:16 -0800</bug_when>
    <thetext>Re-opened since this is blocked by bug 247758</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911646</commentid>
    <comment_count>5</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2022-11-10 13:39:14 -0800</bug_when>
    <thetext>Reverted because this caused API test crashes on iOS simulator. Details in https://bugs.webkit.org/show_bug.cgi?id=247756</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911662</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-11-10 14:32:17 -0800</bug_when>
    <thetext>I’ll re-land this with a stub that keeps the iOS simulator working.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911668</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-11-10 14:40:25 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/6366</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911705</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-11-10 16:32:06 -0800</bug_when>
    <thetext>Committed 256555@main (08e4dc175b88): &lt;https://commits.webkit.org/256555@main&gt;

Reviewed commits have been landed. Closing PR #6366 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>