otrng_serialize_ec_point return value interpreted incorrectly
Closed this issue · 1 comments
osmk commented
Hi, I was looking through the code and happened to notice a minor issue. It doesn't actually have any impact on the function but is semantically incorrect or at least confusing...
Line 923 in c618535
otrng_serialize_ec_point() returns an int number of bytes serialised, but here it is interpreted as if it returned an otrng_result. It happens to work in practice because ED448_POINT_BYTES isn't equal to OTRNG_ERROR, but the line should probably read something as follows for correctness
if (otrng_serialize_ec_point(forg_ser, *client->forging_key) != ED448_POINT_BYTES) {
Do you want me to open a PR?
claucece commented
Hey!
Thanks. It should be fixed now ;)
Thanks!