Documentation ¶
Index ¶
- Variables
- func ConvertHashFunction(hash crypto.Hash) hash.Hash
- func DecryptAndCheck(random io.Reader, priv *keys.BigPrivateKey, c *big.Int) (m *big.Int, err error)
- func EncodeMessageEMSAPSS(message []byte, N *big.Int, hash hash.Hash, salt []byte) ([]byte, error)
- func GenerateBlindingFactor(random io.Reader, N *big.Int) (*big.Int, *big.Int, error)
- func VerifyBlindSignature(pub *keys.BigPublicKey, hashed, sig []byte) error
- func VerifyMessageSignature(message, signature []byte, saltLength int, pk *keys.BigPublicKey, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnexpectedSize is the error used if the size of a parameter does not match its expected value. ErrUnexpectedSize = errors.New("blindsign/blindrsa: unexpected input size") // ErrInvalidMessageLength is the error used if the size of a protocol message does not match its expected value. ErrInvalidMessageLength = errors.New("blindsign/blindrsa: invalid message length") // ErrInvalidBlind is the error used if the blind generated by the Verifier fails. ErrInvalidBlind = errors.New("blindsign/blindrsa: invalid blind") // ErrInvalidRandomness is the error used if caller did not provide randomness to the Blind() function. ErrInvalidRandomness = errors.New("blindsign/blindrsa: invalid random parameter") // ErrUnsupportedHashFunction is the error used if the specified hash is not supported. ErrUnsupportedHashFunction = errors.New("blindsign/blindrsa: unsupported hash function") )
Functions ¶
func ConvertHashFunction ¶
ConvertHashFunction converts a crypto.Hash function to an equivalent hash.Hash type.
func DecryptAndCheck ¶
func DecryptAndCheck(random io.Reader, priv *keys.BigPrivateKey, c *big.Int) (m *big.Int, err error)
DecryptAndCheck checks that the private key operation is consistent (fault attack detection).
func EncodeMessageEMSAPSS ¶
EncodeMessageEMSAPSS hashes the input message and then encodes it using PSS encoding.
func GenerateBlindingFactor ¶
GenerateBlindingFactor generates a blinding factor and its multiplicative inverse to use for RSA blinding.
func VerifyBlindSignature ¶
func VerifyBlindSignature(pub *keys.BigPublicKey, hashed, sig []byte) error
VerifyBlindSignature verifies the signature of the hashed and encoded message against the input public key.
func VerifyMessageSignature ¶
func VerifyMessageSignature(message, signature []byte, saltLength int, pk *keys.BigPublicKey, hash crypto.Hash) error
VerifyMessageSignature verifies the input message signature against the expected public key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.