starkware-libs / crypto-cpp

Apache License 2.0
32 stars 32 forks source link

Fixed return type of Verify function in ffi/ecdsa.cc #21

Open bartekryba opened 1 year ago

bartekryba commented 1 year ago

In ffi/ecdsa.h the interface of Verify method is as follows:

int Verify(const char* stark_key, const char* msg_hash, const char* r_bytes, const char* w_bytes);

but in ffi/ecdsa.cc it had a bool type.

The problem it caused: I compiled crypto-cpp for Release (with -O3 flag), for ios and macos targets. On x86 macos target, calling Verify function would return very big numbers instead of 0 or 1.