boltlabs-inc / tss-ecdsa

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

Manually implement `Debug` for types that hold secrets #163

Closed marsella closed 1 year ago

marsella commented 1 year ago

When we log debug and error information, we sometimes want to give context about types that contain secrets. However, we don't want to log the secrets themselves. Specifically, we want to avoid logging data that could be used to reconstruct key shares if it was collected after the fact.

It's okay to be a bit aggressive about identifying sensitive fields, we'd rather be too cautious.


Tentative list of structs that need more careful debug. This includes types that don't derive debug right now, but I included them because it seems better to preemptively add a safer debug, than to leave open the possibility of deriving it insecurely later.

marsella commented 1 year ago

An example of the redacting is done in #196 -- see e.g. AuxInfoDecommit.