language agnostic - Is there a standard function signature for the digital signature "verify" function? -
is 1 of these (or else) more standard alternatives?
verify(message, signature, publickey)
vs
verify(signature, message, publickey)
i go for:
verify(publickey, message, signature)
and there objective reasoning behind it. first have provide public key (e.g. in init
method in case of java, data (e.g. in update
method) , verify
actual signature. note publickey
static; prefer @ start of method.
likewise, signature generation be:
sign(privatekey, message): signature
as can see, nicely symmetric.
and since asking standard:
rsassa-pss-verify ((n, e), m, s)
where (n, e)
public key. straight out of rfc 3447 describing rsa cryptography specifications.
Comments
Post a Comment