boltlabs-inc / tss-ecdsa

An implementation of a threshold ECDSA signature scheme
Other
11 stars 5 forks source link

Zeroize GMP #534

Closed naure closed 1 month ago

naure commented 2 months ago

We use the crates unknown_order / rug / GMP. Secrets are ultimately stored in arrays on the heap managed by malloc. GMP is a C library which frequently allocates and copies buffers, and this is not visible to the Rust code. Fortunately, GMP accepts a custom implementation of memory management (alloc / realloc / free). We override these functions to erase all buffers whenever they are released.