Download the PHP package brainfoolong/php-ascon without Composer

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

PHP Implementation of Ascon

Tests

This is a PHP implementation of Ascon v1.3, an authenticated cipher and hash function. It allows to encrypt and decrypt any kind of message. Includes the authenticated encryption and hash function variants as specified in NIST SP 800-232 (initial public draft). Heavily inspired by the python implementation of Ascon by https://github.com/meichlseder/pyascon

Notice: This library does contain the version 1.3 of Ascon. v1.2 was a draft version and there are already newer versions of ascon. See https://github.com/ascon/ascon-c . Version 1.2 is not compatible with 1.3

About Ascon

Ascon is a family of authenticated encryption (AEAD) and hashing algorithms designed to be lightweight and easy to implement, even with added countermeasures against side-channel attacks. It was designed by a team of cryptographers from Graz University of Technology, Infineon Technologies, and Radboud University: Christoph Dobraunig, Maria Eichlseder, Florian Mendel, and Martin Schläffer.

Ascon has been selected as the standard for lightweight cryptography in the NIST Lightweight Cryptography competition (2019–2023) and as the primary choice for lightweight authenticated encryption in the final portfolio of the CAESAR competition (2014–2019).

Find more information, including the specification and more implementations here:

https://ascon.iaik.tugraz.at/

About me

I have made library for AES PHP/JS encryption already in the past. Bit juggling is somewhat cool, in a really nerdy way. I like the Ascon implementation and it at the time of writing, a PHP implementation was missing. So i made one. Would be cool if you leave a follow or spend some virtual coffee. s

Javascript/Typescript Implementation

Chances are high that you probably need a Javascript/Typescript (For your frontend) implementation too. I've made one here -> https://github.com/brainfoolong/js-ascon

Installation

# via composer
composer require brainfoolong/php-ascon

Performance

As PHP do not support unsigned integers, there is no chance to directly work with 64bit unsigned integers. This library use 2x 32bit integers for all bit operations, which have performance penalties (almost half as fast as the typescript implementation). Without requiring specials php extensions which can handle 64bit unsigned integers, there is no way to improve the performance for now.

Usage

For more demos see in folder demo.

Development

Change code in src/Ascon.php. Test changes with php tests/tests.php.

Algorithms

This is a simple reference implementation of Ascon as specified in NIST's draft standard, NIST SP 800-232, which includes

Older Algorithm Variants

Older versions implement Ascon v1.2 as submitted to the NIST LWC competition and published in the Journal of Cryptology, as well as additional functionality for message authentication. These versions can be found in at https://github.com/brainfoolong/php-ascon/tree/412dd162b737c212829c95787e7a4801fec7629e, including


All versions of php-ascon 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 brainfoolong/php-ascon contains the following files

Loading the files please wait ....