Commit graph

9 commits

Author SHA1 Message Date
Platonides
e4f5349402 Improve MWCryptRand comments a bit.
Change-Id: Id9e3818f38927079d703913c894f26a3ce9a0895
2012-04-03 16:15:02 +02:00
Platonides
a94add3fe8 Also add some entropy from the container folders.
Change-Id: I6e1ba061341b7741ade17abfdd46734e38f8f475
2012-04-02 20:21:02 +02:00
Reedy
6d56dddeca Swap $bytes .= $iv; for $buffer .= $iv;
Add a few bits of documentation

Change-Id: I0997d6eaaa37f312633db4556752cb38d8b4a3b0
2012-03-23 00:45:17 +00:00
Tim Starling
4b8e45d604 * Removed the $method parameters from MWCryptRand. Apparently Dantman didn't know about our awesome debug traceback functions like wfGetAllCallers(). The weird optional-middle-parameter calling convention thankfully disappears as a consequence.
* Reduced the amount of debug log noise slightly, removing a few redundant messages.
2012-03-21 10:27:34 +00:00
Sam Reed
1c283f2a41 Followup r114270 (essentially reverts it), and r114233, use class member variables as they are already defined 2012-03-20 14:21:27 +00:00
Sam Reed
c9e9462eb4 Followup r114233, define the method static variables to be used 2012-03-20 14:16:46 +00:00
Daniel Friesen
e2ee009e5c Commit the cryptrand project worked on in git:
- MWCryptRand: A new api for generating cryptographic randomness for security tokens. Uses whatever cryptographic source is available and if not falls back to using random state and clock drift.
- wfRandomString - A simple non-cryptographic pesudo-random string generation function to replace wfGenerateToken which was written pretending to be secure when it's really not.
- Core updates to use MWCryptRand in various places:
-- user_token generation (to do this we stop generating user_token implicitly and only generate it when needed to avoid depleting the system's entropy pool by reading random data we'll never use)
-- email confirmation token generation
-- password salt generation
-- temporary password generation
-- Generation of the automatic watchlist token
-- login and create user tokens
-- session ids when php's entropy sources are not set
-- the installer when generating wgSecretKey and the upgrade key
2012-03-20 05:17:40 +00:00
Daniel Friesen
d293a19804 Revert CryptRand class in r111964 till after the git migration. 2012-02-20 22:35:14 +00:00
Daniel Friesen
3040055fc5 Commit a new cryptographic random generator class for use in MediaWiki.
Waiting for it to be reviewed before actually making use of it inside code and adding a RELEASE-NOTES entry.
2012-02-20 21:22:52 +00:00