Skip to content
Advertisement

Chaum blind signature with blinding in JavaScript and verifying in Java

I’m experimenting with Chaum’s blind signature, and what I’m trying to do is have the blinding and un-blinding done in JavaScript, and signing and verifying in Java (with bouncy castle). For the Java side, my source is this, and for JavaScript, I found blind-signatures. I’ve created two small codes to play with, for the Java side:

JavaScript

The above will generate a keypair, prints the public part to stdout and reads from stdin the blinded message and then the un-blinded message and signature. And for the JavaScript (Node.js) side, I have this:

JavaScript

This reads the public key, generates the blinded message, and does the un-blinding.

The verification part of the Java code fails, and don’t really know why. Does anyone have any idea?

Advertisement

Answer

The blind-signature library used in the NodeJS code for blind signing implements the process described here:

No padding takes place in this process.

In the Java code, the implementation of signing the blind message in signConcealedMessage() is functionally identical to BlindSignature.sign().
In contrast, the verification in the Java code is incompatible with the above process because the Java code uses PSS as padding during verification.
A compatible Java code would be for instance:

JavaScript

With this code verification is successful.


There seems to be an RFC in the pipeline for blinded signing, which indeed uses an extension of PSS, see draft-irtf-cfrg-rsa-blind-signatures.
BouncyCastle also provides an implementation for blind signing, see e.g. RSABlindingEngine, which is applied by the referenced Java library.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement