Opaque
in package
Entry points into `libaxiam_opaque_ffi` (CONTRACT.md §23).
There is no cryptography in this class, or anywhere in this package. That is deliberate and is
what §23.1 requires: OPAQUE needs an oblivious PRF, hash_to_curve, expand_message_xmd, an
envelope construction and a three-message AKE, and eleven independent implementations of that
is eleven chances to be subtly and silently wrong. The SRP-6a this replaces was arithmetic
every language can express — which in PHP meant 800-odd lines across two bignum backends, and
a pbkdf2_sha256-only limitation on top.
Table of Contents
Methods
- available() : bool
- Whether this installation can perform OPAQUE (§23.2).
- lastError() : string
- The library's description of the last failure, or `$fallback`.
- startLogin() : LoginExchange
- Blinds `$password` to open a login.
- startRegistration() : RegistrationExchange
- Blinds `$password` to open an enrolment.
Methods
available()
Whether this installation can perform OPAQUE (§23.2).
public
static available() : bool
Reports rather than throwing. PHP was already the one AXIAM SDK language where the SRP
equivalent genuinely answered false; it still can, for a different and simpler reason —
ext-ffi or the shared library is absent, rather than a missing bignum.
Return values
boollastError()
The library's description of the last failure, or `$fallback`.
public
static lastError(OpaqueNativeInterface $lib, string $fallback) : string
A failure with nothing behind it is a library bug, but a caller still deserves a sentence rather than an empty one.
Parameters
- $lib : OpaqueNativeInterface
- $fallback : string
Return values
stringstartLogin()
Blinds `$password` to open a login.
public
static startLogin(string $password) : LoginExchange
Parameters
- $password : string
Tags
Return values
LoginExchangestartRegistration()
Blinds `$password` to open an enrolment.
public
static startRegistration(string $password) : RegistrationExchange
Parameters
- $password : string