You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
To reduce the attack options, returning generic error messages is prefered. The method signature in crypto/cipher/cipher.go of Decrypter.Decrypt(EncryptedContent) (PlainContent, error) should return ErrDecrypt for any error. This is confusing, the signature suggests a descriptive error message will be returned on failure.
I don't think it's a good idea to mask all errors with the same error. It's okay to return the same error type, but it should not be the same error message for different types of errors, the actual error is getting masked here. It'll be harder to debug the reason just by seeing "error in decryption".
@robdefeo We can make a definition of error only of the Mailchain, error xXXX, linking the code to a Debug manual. However, it is only available in the developer slack.
@developerfred logging the output is an option the bridges both the options. This gives the information to a potential attacked easily though.
I am aware an attacker could download the codebase make changes to the code to log or provide information. I think we should be making efforts to make this difficult.
Is your feature request related to a problem? Please describe.
To reduce the attack options, returning generic error messages is prefered. The method signature in
crypto/cipher/cipher.go
ofDecrypter.Decrypt(EncryptedContent) (PlainContent, error)
should returnErrDecrypt
for any error. This is confusing, the signature suggests a descriptive error message will be returned on failure.Describe the solution you'd like
There appears to be 3 approaches:
crypto/cipher/errors.go
Decrypt(EncryptedContent) (PlainContent, error)
as in https://godoc.org/golang.org/x/crypto/nacl/secretbox#OpenThe text was updated successfully, but these errors were encountered: