Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ZeroAliceDkgOutput ¶
func ZeroAliceDkgOutput(out *dkg.AliceOutput)
ZeroAliceDkgOutput zeroes sensitive fields in an AliceOutput. Call this after persisting the output to BadgerDB.
func ZeroBobDkgOutput ¶
ZeroBobDkgOutput zeroes sensitive fields in a BobOutput.
func ZeroBytes ¶
func ZeroBytes(data []byte)
ZeroBytes securely zeros out a byte slice to prevent sensitive data from remaining in memory. This uses explicit memory zeroing and garbage collection to help ensure the data is actually cleared.
func ZeroScalar ¶
ZeroScalar zeroes a kryptology Scalar by replacing its value with the field's zero element. Safe to call with nil.
func ZeroString ¶
func ZeroString(s *string)
ZeroString securely clears a string reference and encourages garbage collection. Note: Go strings are immutable, so we can only clear the reference and rely on GC. This provides best-effort security by clearing the reference and forcing GC.
Types ¶
type SecureBytes ¶
type SecureBytes struct {
// contains filtered or unexported fields
}
SecureBytes is a wrapper for sensitive byte data that automatically zeros itself when no longer needed
func NewSecureBytes ¶
func NewSecureBytes(data []byte) *SecureBytes
NewSecureBytes creates a new SecureBytes instance
func (*SecureBytes) Bytes ¶
func (sb *SecureBytes) Bytes() []byte
Bytes returns the underlying byte slice (use with caution)
func (*SecureBytes) Clear ¶
func (sb *SecureBytes) Clear()
Clear explicitly zeros the data and removes the finalizer