Reputation: 11
How set (or get after signing) random number for function openssl_sign?
$pkEcPem = "-----BEGIN EC PRIVATE KEY-----302e0201010420...a00706052b8104000a-----END EC PRIVATE KEY-----"
$pk = openssl_pkey_get_private($pkEcPem);
$signature = null;
openssl_sign($message, $signature, $pk, $algo);
openssl_free_key($pk);
Example of implementation in the PHP library https://github.com/phpecc/phpecc/blob/master/src/Crypto/Signature/Signer.php#L36
Variant names of this value
Upvotes: 0
Views: 67