Niels Möller nisse@lysator.liu.se writes:
- Have two flavors of signing functions, one with the assert, one with the return value.
Or two flavours of the signing function, one with the assert, and one with the assert deleted?
Your 3) seems fine too IMHO, almost any non-trivial C function should be able to return an error code. From the principle of least surprise, I think one ought to return an error code if public and private key doesn't match, if checking that is reliable and cheap.
/Simon