-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
MODSEC-316: I think there are a couple of problems with the getkey() implementation.
- If the purpose of the key is to use it for crypto operations (I have not reviewed any other code, so I don't know.), then the standard random number generator is not sufficient. You'll want to use a proper PRNG.
- Even that aside, in the current implementation, time is used to seed the RNG, but its resolution of the clock is in seconds. Which means it is easily predictable.
- Re-seeding in the loop does not contribute to the randomness, and may actually be affecting it negatively.
- From a glance, the loop does not seem correct. There might be an off-by-one issue there.
Metadata
Metadata
Assignees
Labels
No labels