https://github.com/rust-bitcoin/rust-bitcoin/blob/162094322fc75c92d1241f2afd4514131683856d/bitcoin/src/crypto/key.rs#L413 (for mobile and server) & https://github.com/proto-at-block/bitkey/blob/main/firmware/lib/crypto/src/ecc.c#L51 (for firmware) hope that helps!