Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8125773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:55:30+00:00 2026-06-06T06:55:30+00:00

I am trying to create an IV with the function: mcrypt_create_iv(32, MCRYPT_DEV_RANDOM) this causes

  • 0

I am trying to create an IV with the function:

mcrypt_create_iv(32, MCRYPT_DEV_RANDOM)

this causes the script to time out after more than 60 seconds. (maybe more?) but when I use URANDOM, it works fine almost instantly. From what I read it should take about 4 seconds with MCRYPT_DEV_RANDOM, but it is definitely taking too long. There is nothing in the error log.

I have it installed with apache2 and php5 on an ubuntu 12.04 server.

I have run the exact same code on my centos server without issues.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:55:33+00:00Added an answer on June 6, 2026 at 6:55 am

    Both RANDOM and Unblocking-RANDOM (URANDOM) will supply you random data, but while RANDOM will block if the “entropy well” dries due to over-use, and restart when it has been replenished, URANDOM won’t.

    Pro: URANDOM won’t block.
    Con: URANDOM, if left without entropy, will feed you not-really-so-random data.

    For crypto purposes, unless you’re really paranoid, I think that URANDOM should suffice.

    See this Ubuntu page:
    http://manpages.ubuntu.com/manpages/jaunty/man4/random.4.html

    I (wrongly) thought that the RANDOM sources were user-controllable, but it appears they aren’t. Apparently, nothing much is happening on that computer, so that the kernel entropy generator finds nothing to grind.

    On the plus side, the URANDOM generator is said to be very good and is recommended for practically everything.

    (I’m editing out some previous suggestions of mine that wouldn’t work for you, since they would require, at the very least, a recompilation of PHP).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a function that updates another value, and initially (after
I'm trying create this function such that if any key besides any of the
I'm trying to create this function: CREATE FUNCTION remove_non_alphanum (prm_strInput varchar(3000)) RETURNS VARCHAR(3000) DETERMINISTIC
I'm trying to create function that provides historical volatility after getting symbol from Yahoo.
I'm trying to create function that will do this same thing for 3 different
I'm trying to create a function that disables voting button after an Ajax POST
I am trying to create a function that does this: drop table t_rv_openitem; select
I'm trying to create a function that would append two vectors together, but I
I am trying to create a function as per my requirements. But, when am
I'm trying to create a function that searches up a WebControl's parent-child relationship (basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.