Download the PHP package paragonie/ristretto without Composer
On this page you can find all versions of the php package paragonie/ristretto. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paragonie/ristretto
More information about paragonie/ristretto
Files in paragonie/ristretto
Package ristretto
Short Description Type-safe API for the Ristretto255 group
License ISC
Informations about the package ristretto
Ristretto (PHP)
Implements a type-safe API for working with the Ristretto Group in PHP projects.
Requirements
- PHP 8.1 or newer
Installing
Documentation
There are two basic types: ScalarValue and GroupElement.
The ScalarValue object wraps a big integer between 0 and the order of the Ristretto Group, L.
The GroupElement object wraps a group element of the Ristretto Group.
If an analogy helps, in the world of Ed25519 and X25519, the ScalarValue is your secret key,
and GroupElement is your public key.
For that reason, there are also a SecretKey and PublicKey class, which contains some
basic helper methods for ease-of-use.
Usage
You can convert from scalars to group elements with multBase(), and then use
scalarPointMultiply() to perform a commutative group action (e.g. Diffie-Hellman).
Otherwise, most operations are within a given type (GroupElement to GroupElement, ScalarValue to ScalarValue).
GroupElement
ScalarValue
Example
This is a PHP implementation of the libsodium example protocol.
Perform a secure two-party computation of
f(x) = p(x)^k.xis the input sent to the second party by the first party after blinding it using a random invertible scalarr, andkis a secret key only known by the second party.p(x)is a hash-to-group function.
All versions of ristretto with dependencies
paragonie/constant_time_encoding Version ^2
paragonie/hidden-string Version ^2
paragonie/sodium_compat Version ^1