This will be quick.
You are tooling with phpseclib on macOS. You try generating some hefty, say 4096 bit keypairs and BigInteger times out after 60 seconds. WTF do you do?
Well, BigInteger.php will leverage OpenSSL and/or bcmath for this kind of stuff, but it seems it gets a migraine after 2048 bits. It’ll charge after mcrypt and gmp too, if they are available, but neither is in macOS’s default PHP. We’ve covered mcrypt in the recent (and many days) past, and I had it and libsodium installed on my “device” when I filled an Apache error log up with fatals. Hence I looked to get gmp running.
It’s a relatively simple process … first gather all the items listed in this post on installing mcrypt. Then, you are going to follow some simple steps.(more…)