Package org.bouncycastle.crypto.signers
Class RSABlindSignatureServer
- java.lang.Object
-
- org.bouncycastle.crypto.signers.RSABlindSignatureServer
-
public class RSABlindSignatureServer extends java.lang.ObjectServer side of the RSA Blind Signature Scheme with Appendix (RSABSSA) defined in RFC 9474. Implements theBlindSignstep (sec. 4.3): given a blinded message produced byRSABlindSignatureClient.blind(byte[]), computes = m^d mod nand return it, after a self-consistency check (s^e == m mod n) that catches CRT faults before the value leaves the server.The private-key operation is driven through
RSABlindedEngineso the modular exponentiation is itself blinded against timing side-channels — orthogonal to the RFC 9474 client/server blinding, which only hides the message.The variant choice (PSS vs PSSZERO, randomised vs deterministic) is opaque to the server — only the client cares — so this class is variant-agnostic.
-
-
Constructor Summary
Constructors Constructor Description RSABlindSignatureServer(RSAKeyParameters privateKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]blindSign(byte[] blindedMsg)RFC 9474 sec. 4.3BlindSign.
-
-
-
Constructor Detail
-
RSABlindSignatureServer
public RSABlindSignatureServer(RSAKeyParameters privateKey)
- Parameters:
privateKey- the server's RSA private key. CRT-form (RSAPrivateCrtKeyParameters) is strongly recommended; the public exponent must be available for the RSAVP1 self-check (RFC 9474 sec. 4.3 step 3).
-
-
Method Detail
-
blindSign
public byte[] blindSign(byte[] blindedMsg) throws CryptoExceptionRFC 9474 sec. 4.3BlindSign. VerifiesblindedMsgas an integer in[0, n)of the modulus length, applies RSASP1, and checks that RSAVP1 round-trips back to the input before returning.- Parameters:
blindedMsg- the blinded message received from the client; must be exactlymodulus_lenbytes.- Returns:
- the blinded signature,
modulus_lenbytes. - Throws:
CryptoException- if the input is the wrong length, out of range, or the RSASP1/RSAVP1 round-trip fails (CRT fault).
-
-