CandleFocus

Safegcd’s Implementation Formally Verified

Blockstream Research has completed a formal verification of libsecp256k1's modular inverse function, which is used in Bitcoin and Liquid blockchains. The verification, done using the Coq proof assistant, confirms the algorithm's termination and correctness on 256-bit inputs. The process involved implementing the mathematical description of the algorithm in the C programming language and checking implementation details using Verifiable C. While there are limitations to the proof, such as the partial correctness guarantee and the lack of formal specification for the C language itself, this work demonstrates the possibility of verifying C code and opens the door for further verification of functions in libsecp256k1. Overall, this verification provides evidence that software correctness guarantees can be obtained in the crypto industry.

Related News