Download the PHP package ionux/phactor without Composer

On this page you can find all versions of the php package ionux/phactor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phactor

Phactor Logo

Build Status Scrutinizer Code Quality

Description

Phactor is a high-performance PHP implementation of the elliptic curve math functions required to generate private/public EC keypairs and ECDSA signatures based on secp256k1 curve parameters. This library also includes a class to generate Service Identification Numbers (SINs) based on the published Identity Protocol v1 spec.

These PHP classes are designed to be used in conjunction with software used for Bitcoin-related cryptographic operations right now but the ultimate, long-range goal is to become a more general-purpose mathematics library that can also be used for scientific computing and other non-ecc cryptography projects - basically anywhere you need a convenient interface to arbitrary precision math functions implemented in PHP.

Note: These classes require either the BC or GMP math PHP extension (GMP is preferred but will use BC as the fallback). You can read more about the GMP extention here: http://www.php.net/manual/en/book.gmp.php

Installation

Installation of this project is very easy using composer:

If you have git installed, you can clone the repository:

Or you can install manually by downloading a zip file from the Releases page and extracting the contents into your project's source directory.

Note: Phactor is under active development so you should always download the project from the Releases page. Those packages are the only packages you should rely upon in a production environment since the bleeding edge source changes could contain regressions.

Usage

Integrating these classes with your project is very simple. For example, after including the necessary Phactor class files (or using an autoloader), to generate keypairs:

An associative array will be returned upon success:

Depending on the speed of your hardware, keys can be generated in approximately 10ms or less using GMP.

To generate ECDSA signatures:

Which will return the signature encoded in the ASN.1 DER format:

To verify an existing signature, call the Verify() function which returns a boolean true/false:

Signatures and keys have been tested against OpenSSL and are interoperable. In fact, any other project that can import/export correct EC keypairs and ECDSA signatures will be compatible with this library.

Note: All points and signatures are verified to be mathematically correct before they're returned to the caller. An \Exception is thrown if a point or signature does not pass the verification methods.

The class to generate Service Identification Numbers (SINs) works in a similar fashion. Pass the compressed public key in hex form, for example:

Which will return a single, BASE-58 encoded value beginning with the letter 'T' (specific value to SINs). For example:

Note: When using this class to generate SINs for use in a Bitcoin-related project, the usage of uncompressed public keys is deprecated. Use only the compressed public key when generating a SIN for this purpose to remain compatible with the Bitcoin network.

Found a bug?

Let me know! Send a pull request or a patch. Questions? Ask! I will respond to all filed issues.

Support:

Contribute

Would you like to help with this project? Great! You don't have to be a developer, either. If you've found a bug or have an idea for an improvement, please open an issue and tell me about it.

If you are a developer wanting contribute an enhancement, bugfix or other patch to this project, please fork this repository and submit a pull request detailing your changes. I review all PRs!

This open source project is released under the MIT license which means if you would like to use this project's code in your own project you are free to do so. Speaking of, if you have used Phactor in a cool new project I would like to hear about it!

License


All versions of phactor with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-bcmath Version *
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ionux/phactor contains the following files

Loading the files please wait ....