Proposal for "Crypt_DiffieHellman"

» Metadata » Status
» Description
Implementation of the Diffie-Hellman Key Exchange cryptographic protocol in PHP5. The protocol enables two parties without any prior knowledge of each other to establish a secure shared secret key across an insecure channel of communication. This is useful in established a shared key for signing subsequent messages which can be used to authenticate the message as being sent by the newly associated party.

This implementation has been designed to operate in two broad modes. Mode 1, the default, accepts public/private keys as a string (usually since they represent a large integer outside the 32bit range). Mode 2, accepts public/privae keys in their binary form and internally translates this into a usable number form using a BigInteger class. Both modes are also available when extracting a public key for sending to the other party.

In addition, support is included for extracting the big-endian two's complement of the output binary values for all keys. Binary form is commonly used for transmitting key values across the wire.

Included is a small BigInteger wrapper across BCMath and GMP. It is expected that if Math_BigInteger is upgraded to PHP5 for PEAR2 that this wrapper will be dropped. In the meantime it has no other function other than to support Diffie-Hellman operations.
» Dependencies » Links
» Timeline » Changelog
  • First Draft: 2007-06-22
  • Proposal: 2007-06-22
  • Call for Votes: 2007-07-02
  • Pádraic Brady
    [2007-06-29 10:32 UTC]

    Have updated proposed Crypt_HMAC2 package as follows:

    * Increased coverage of input/output modes to big integer string, binary and binary big-endian two's complement (btwoc).
    * Added ability to set or reset a specific Math library corresponding to the preferred math extension
    * Fixed some minor PEAR CS breaches
    * Updated phpdoc comments
    * API changed slightly for input/output flexibility
    * Non-getter methods return the object allowing fluid interfacing
  • Pádraic Brady
    [2007-07-02 16:41 UTC]

    Status updated to "Call for votes".

    Be gentle - it's my first PEAR proposal ;). I've made a few edits to the proposal description, and changes to code as detailed in the changelog emailed to the list late last week.