Proposal for "BigInteger"

» Metadata » Status
» Description
Pure-PHP arbitrary precission integer arithmetic library. Supports base-10, base-16, and base-256 numbers. Negative numbers are supported in all publically accessable functions save for modPow and modInverse.

Encryption is, by far, the most common application of libraries such as this. In SSH v1, for example, there are 768 bit (232 decimal digits) and 1024 bit (309 decimal digits) modulo's that need one needs to contend with when performing modular exponentiation for the purposes of RSA encryption. Since the base number can be up to one less than the modulo, there is atleast 50% chance that this number will be atleast a quarter as large as the modulo (eg. 256+ bits; how much bigger the probability is depends on the modulo's exact value). Mathematical operations on numbers this large require libraries capable of supporting integers of any arbitrary size, hence this library.
» Dependencies » Links
» Timeline » Changelog
  • First Draft: 2006-06-09
  • Proposal: 2006-06-09
  • Call for Votes: 2006-06-27
  • Voting Extended: 2006-07-05