Download the PHP package nicolasflamel/secp256k1-zkp without Composer

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

Secp256k1-zkp PHP Library

Description

PHP library for parts of libsecp256k1-zkp.

Installing

Run the following command from the root of your project to install this library and configure your project to use it.

Usage

After an Secp256k1Zkp object has been created, it can be used to perform all the secp256k1-zkp functions that this library implements.

The following code briefly shows how to use this library. A more complete example is available here.

Functions

  1. Secp256k1-zkp constructor: constructor(): Secp256k1Zkp

    This constructor is used to create a Secp256k1Zkp object and it returns the following value:

    • Secp256k1Zkp: An Secp256k1Zkp object.
  2. Secp256k1-zkp is valid private key method: isValidPrivateKey(string $privateKey): bool

    This method is used to check if a provided private key is valid and it accepts the following parameters:

    • string $privateKey: The private key to validate.

    This method returns the following values:

    • bool: TRUE if the private key is valid or FALSE if it is not.
  3. Secp256k1-zkp get public key method: getPublicKey(string $privateKey): string | FALSE

    This method is used to get a provided private key's public key and it accepts the following parameters:

    • string $privateKey: The private key to get the public key for.

    This method returns the following values:

    • string: The private key's public key.
    • FALSE: Getting the public key failed.
  4. Secp256k1-zkp add private keys method: addPrivateKeys(string &$firstPrivateKey, string $secondPrivateKey): bool

    This method is used to add two private keys and it accepts the following parameters:

    • string &$firstPrivateKey: The private key to add the second private key to. This variable will contain the sum of the private keys if the function returned TRUE.
    • string $secondPrivateKey: The private key to add to the first private key.

    This method returns the following values:

    • bool: TRUE if adding private keys was successful or FALSE if it failed.
  5. Secp256k1-zkp get blinding factor method: getBlindingFactor(string $blind, string $value): string | FALSE

    This method is used to get the blinding factor from a provided blind and value and it accepts the following parameters:

    • string $blind: The blind to use.
    • string $value: The value to use. This must be a non-negative integer.

    This method returns the following values:

    • string: The blinding factor for the provided blind and value.
    • FALSE: Getting the blinding factor failed.
  6. Secp256k1-zkp get commitment method: getCommitment(string $blindingFactor, string $value): string | FALSE

    This method is used to get the commitment for a provided value using a provided blinding factor and it accepts the following parameters:

    • string $blindingFactor: The blinding factor to use.
    • string $value: The value to commit. This must be a non-negative integer.

    This method returns the following values:

    • string: The commitment for the provided value using the provided blinding factor.
    • FALSE: Getting the commitment failed.
  7. Secp256k1-zkp get Bulletproof method: getBulletproof(string $blindingFactor, string $value, string $rewindNonce, string $privateNonce, string $message): string | FALSE

    This method is used to get Bulletproof for a provided value committed with a provided blinding factor using a provided rewind nonce, private nonce, and message and it accepts the following parameters:

    • string $blindingFactor: The blinding factor use to commit the value.
    • string $value: The value committed to. This must be a non-negative integer.
    • string $rewindNonce: The rewind nonce to use.
    • string $privateNonce: The private nonce to use.
    • string $message: The message to use.

    This method returns the following values:

    • string: The Bulletproof for the provided value committed with the provided blinding factor using the provided rewind nonce, private nonce, and message.
    • FALSE: Getting the Bulletproof failed.
  8. Secp256k1-zkp get private nonce method: getPrivateNonce(): string | FALSE

    This method is used to get a random private nonce that can be used when creating a partial single-signer signature and it returns the following values:

    • string: A private nonce.
    • FALSE: Getting a private nonce failed.
  9. Secp256k1-zkp combine public keys method: combinePublicKeys(array $publicKeys): string | FALSE

    This method is used to get the combined public key for provided public keys and it accepts the following parameters:

    • array $publicKeys: The public keys to combine.

    This method returns the following values:

    • string: The combined public key.
    • FALSE: Combing public keys failed.
  10. Secp256k1-zkp get partial single-signer signature method: getPartialSingleSignerSignature(string $privateKey, string $message, string $privateNonce, string $publicKey, string $publicNonce): string | FALSE

    This method is used to get the partial single-signer signature for a provided message signed with a provided private key using a provided private nonce, public key, and public nonce and it accepts the following parameters:

    • string $privateKey: The private key to use.
    • string $message: The message to sign.
    • string $privateNonce: The private nonce to use.
    • string $publicKey: The public key to use.
    • string $publicNonce: The public nonce to use.

    This method returns the following values:

    • string: The partial single-signer signature for the provided message signed with the provided private key using the provided private nonce, public key, and public nonce.
    • FALSE: Getting the partial single-signer signature failed.
  11. Secp256k1-zkp public key to commitment method: publicKeyToCommitment(string $publicKey): string | FALSE

    This method is used to convert a provided public key to a commitment and it accepts the following parameters:

    • string $publicKey: The public key to convert to a commitment.

    This method returns the following values:

    • string: The commitment.
    • FALSE: Converting the public key failed.

All versions of secp256k1-zkp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
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 nicolasflamel/secp256k1-zkp contains the following files

Loading the files please wait ....