title: How can I split two random numbers created with mt_rand()?
body: <p>I currently have the following code below:</p>
  
  <pre><code>$akey = mt_rand() . mt_rand() . mt_rand() . mt_rand();
  $bkey = mt_rand() . mt_rand() . mt_rand() . mt_rand();
  $ckey =  $akey . $bkey;
  </code></pre>
  
  <p>If I have ONLY ckey, is there any way to divine akey and bkey from it (without knowing them already)?</p>
  
  <p>I am scratching my head.  I believe mt_rand() could be 6 one time and 1bb3D the next.  I was thinking initially to use some way to split the string in half (50% on each side), but if the akey and bkey are different lengths then that won't work.</p>
  
  <p>Can I pad each one first to ensure they're equal and THEN split?  And if so, how?  Or is there a better way to do this?</p>
  
  <p>(Edit:  The purpose is to have a key made up of 2 other parts.  Three people will hold the parts: ckey or akey and bkey.  One person will have full control with ckey, whereas akey and bkey holders must depend on each other to access. I think actually there's no reason why it would have to be mt_rand() except it was working fine up to this point.  If there's another way to get a 30 char ckey and then halve it into akey and bkey, that's fine.  But nobody will know the other keys.  There do seem to be some functions out there though I don't know how to tell which are the most "random" or secure...)</p>
  
  <p>Thank you!</p>