Download the PHP package leigh/poly1305 without Composer

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

Poly1305 in PHP

This library contains a pure PHP implementations of the Poly1305 algorithm.

The above implementations are listed in order of performance.

For those who want a C-based extension, it lives in it's own repository: Poly1305 PHP extension.

Usage:

You can generate and verify MACs with the one-shot functions authenticate and verify available in the Poly1305 namespace.

Generate a MAC using a 256-bit unique key

Verify the authenticity using the MAC for that key / message combination

Remember that a key must not be used more than once

You can also use the Authenticator class directly. This is more useful if you are streaming messages and want to generate the MAC as you go.

Poly1305-AES

This extension can be used to compute Poly1305-AES MACs and includes optimised AES functions specifically for this purpose.

If you have the OpenSSL extension installed this will be used instead. MCrypt is around 2x slower than the bundled native implementation, as well as being unmaintained, and is not supported here.

To use Poly1305-AES you need three 128-bit strings, instead of the usual 256-bit key.

The key is now formed by calculating $r . aes($k, $n), allowing $k and $r to remain unchanged as long as a unique $n is used for each message.

The native implementation has two ways to generate aes($k, $n) optimised for different secnarios. The OpenSSL version provides the same methods, but is not optimised (it is still faster than native though).

If you're only going to perform one AES operation in the lifetime of your script (i.e. during a web request) then the optimised solution is to use the one-shot kn(k, n) method.

If you have a long running script that will perform many AES operations with incremental or random nonces, then the optimised solution is to use the separate k() and n() methods. Calling k() caches the processed key so that it can be used again.


All versions of poly1305 with dependencies

PHP Build Version
Package Version
Requires php Version >=7.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 leigh/poly1305 contains the following files

Loading the files please wait ....