Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How secure is SecRandomCopyBytes() (Apple's RNG)? Has anyone ever reviewed it?

share|improve this question
"This reference manual is a work in progress. Some classes are still lacking detailed descriptions." Why is it that - in general - cryptographic libs seem to be ignoring even the most basic software engineering practices... sigh. – Maarten Bodewes Nov 29 '13 at 14:00
It looks like RandomPool is an interface, not a full blown implementation, so there is no answering that question. You can ask how secure AutoSeededRandomPool is, but that depends directly on the operating system. In the end, for a pure library that does not do IO itself, there is no way to seed without some support of the operating system or the CPU. – Maarten Bodewes Nov 29 '13 at 14:09

Apple's RNG is cryptographically secure, provided it has had enough time to gather entropy. The early PRNG, though, was found to have problems in the iPhone as recently as iOS7, according to a researcher from Azimuth Security.

I have not heard of any problems regarding the SecRandomCopyBytes() routine for a regular app, and there are lots of eyes on it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.