Skip to content

1.0.0

Choose a tag to compare

@dhruvit-r dhruvit-r released this 06 Mar 00:28
· 4 commits to main since this release
3aded5f

This is a Java library that implements RSA Blind Signatures as described in RFC 9474.

Internally, it uses Bouncy Castle for the cryptographic operations.

It exposes a simple API to perform the four operations required for RSA Blind Signatures as described in the RFC:

package it.dhruv;

public class BlindRsa {
  /**
   * Constructor for the BlindRsa class. It takes the parameters for the RSA
   * Blind Signature, the public key and/or the private key.
   */
  public BlindRsa(BlindRsaParams blindRsaParams, RSAKeyParameters publicKey, RSAKeyParameters privateKey);

  /**
   * Prepare the message for blinding.
   */
  public byte[] prepare(byte[] message);

  /**
   * Blind the message.
   */
  public BlindedOutput blind(byte[] message) throws DataLengthException, CryptoException;

  /**
   * Sign the blinded message.
   */
  public byte[] sign(byte[] blindedMessage) throws DataLengthException, CryptoException;

  /**
   * Finalize the signature.
   */
  public byte[] finalize(byte[] preparedMessage, BlindedOutput blindedOutput, byte[] blindSignature);
}