Download the PHP package starkbank/ecdsa without Composer

On this page you can find all versions of the php package starkbank/ecdsa. 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 ecdsa

A lightweight and fast PHP ECDSA

Overview

This is a pure PHP implementation of the Elliptic Curve Digital Signature Algorithm. It is compatible with OpenSSL and uses elegant math such as Jacobian Coordinates to spped up the ECDSA on pure PHP.

Installation

Composer

To install the package with Composer, run:

To use the bindings, use Composer's autoload:

External dependencies

The package makes use of the 'GNU Multiple Precision' (GMP) library. For installation details, see: https://www.php.net/manual/en/gmp.installation.php

Curves

We currently support secp256k1, but you can add more curves to your project. You just need to use the Curve::add() method.

Speed

We ran a test on a Macbook Air M1 2020 using PHP 8.1. We ran the library 100 times and got the average time displayed bellow:

Library sign verify
starkbank-ecdsa 1.9ms 3.7ms

Sample Code

How to sign a json message for Stark Bank:

Simple use:

How to add more curves:

OpenSSL

This library is compatible with OpenSSL, so you can use it to generate keys:

Create a message.txt file and sign it:

It's time to verify:

You can also verify it on terminal:

NOTE: If you want to create a Digital Signature to use in the Stark Bank, you need to convert the binary signature to base64.

You can also verify it with this library:

Run all unit tests


All versions of ecdsa with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-gmp 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 starkbank/ecdsa contains the following files

Loading the files please wait ....