座標が ristretto255 曲線上にあるかを調べる
$s
ristretto255 曲線上に座標があるかを判定します。 in canonical form, on the main subgroup, and that the point doesn't have a small order. libsodium 1.0.18 以降で利用可能です。
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
s
楕円曲線の座標
s が ristretto255 曲線上にある場合に true を返します。 そうでない場合、false を返します。
true
false
例1 sodium_crypto_core_ristretto255_is_valid_point の例
<?php$foo = sodium_crypto_core_ristretto255_scalar_random();$bar = sodium_crypto_scalarmult_ristretto255_base($foo);var_dump(sodium_crypto_core_ristretto255_is_valid_point($bar));?>
上の例の出力は以下となります。
bool(true)