package crypto // PrivateKey represents a private key that can be used to // generate a public key and sign data type PrivateKey interface { // Sign signs digest using key k. Sign(digest []byte) ([]byte, error) // Return a public key paired with this private key PublicKey() PublicKey } // PublicKey is a public key that can be used to verify data // signed with the corresponding private key type PublicKey interface { // Verify that 'sig' is the signed hash of 'data' Verify(digest []byte, sig []byte) (bool, error) }