Documentation ¶
Index ¶
- func DecryptOAEP(priv *rsa.PrivateKey, msg []byte) ([]byte, error)
- func EncryptOAEP(pub *rsa.PublicKey, msg []byte) ([]byte, error)
- func SignPKCS1(priv *rsa.PrivateKey, msg []byte) ([]byte, error)
- func SignPSS(priv *rsa.PrivateKey, msg []byte) ([]byte, error)
- func VerifyPKCS1(pub *rsa.PublicKey, sig, msg []byte) error
- func VerifyPSS(pub *rsa.PublicKey, sig, msg []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptOAEP ¶
func DecryptOAEP(priv *rsa.PrivateKey, msg []byte) ([]byte, error)
DecryptOAEP decrypts a msg using RSA-OAEP.
func EncryptOAEP ¶
EncryptOAEP encrypts a msg using RSA-OAEP.
func SignPKCS1 ¶
func SignPKCS1(priv *rsa.PrivateKey, msg []byte) ([]byte, error)
SignPKCS1 calculates the signature of msg using RSASSA-PKCS1-v1_5. The opts argument may be nil, in which case sensible defaults are used. Warning, msg will be hashed with SHA-256.
func SignPSS ¶
func SignPSS(priv *rsa.PrivateKey, msg []byte) ([]byte, error)
SignPSS calculates the signature of msg using RSA-PSS. The opts argument may be nil, in which case sensible defaults are used. Warning, msg will be hashed with SHA-256. Salt length is 128.
func VerifyPKCS1 ¶
VerifyPKCS1 verifies the signature sig of msg using the public key pub. A valid signature is indicated by returning a nil error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.