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") )
func ConvertHashFunction(hash crypto.Hash) hash.Hash
ConvertHashFunction converts a crypto.Hash function to an equivalent hash.Hash type.
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(message []byte, N *big.Int, hash hash.Hash, salt []byte) ([]byte, error)
EncodeMessageEMSAPSS hashes the input message and then encodes it using PSS encoding.
func GenerateBlindingFactor(random io.Reader, N *big.Int) (*big.Int, *big.Int, error)
GenerateBlindingFactor generates a blinding factor and its multiplicative inverse to use for RSA blinding.
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(message, signature []byte, saltLength int, pk *keys.BigPublicKey, hash crypto.Hash) error
VerifyMessageSignature verifies the input message signature against the expected public key