|
|
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
| oqs_interop.c | ||
| skein_interop.c | ||
README.md
Contractless PHP Crypto Interoperability
This harness verifies that the native libraries packaged by
contractless-php-crypto produce data compatible with Contractless.
Results
- The C implementation wrapped by
jedisct1/PHP-Skein-Hashproduces the same 32-byte Skein-256 output as the Rustskeincrate used by Contractless. - Unmodified
Falcon-padded-512message handling is not compatible with Contractlessfn-dsa 0.3.0. Falcon-padded-512keys and fixed signatures use the same Contractless sizes: 897-byte public keys, 1,281-byte private keys, and 666-byte signatures.- Both signing implementations are compatible when liboqs receives the message framing used by Contractless:
SHAKE256(public_key, 64 bytes) || 0x00 || 0x00 || original_message
The two zero bytes represent raw-message mode and an empty domain context.
With that adapter:
- Contractless Rust signatures verify through liboqs.
- Liboqs signatures verify through Contractless Rust.
Required liboqs algorithm
Use Falcon-padded-512. Do not use variable-length Falcon-512.
Regression requirement
Run these tests whenever Contractless changes its fn-dsa, skein, or
signature-framing dependencies. Matching key and signature lengths alone
does not establish compatibility.