Browse Source

Minor cleanup on the comments

pull/1/head
Jør∂¡ 3 years ago
parent
commit
4828b17685
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/index.ts

+ 4
- 3
src/index.ts

@ -57,9 +57,9 @@ export function newRequestParameters() {
/** /**
* Blinds the message for the signer R. * Blinds the message for the signer R.
* @param {BigNumber} m
* @param {Point} signerR
* @returns {struct} {mBlinded: BigNumber, userSecretData: {a: BigNumber, b: BigNumber, f: Point}}
* @param m The message to blind
* @param signerR
* @returns The blinded signature and the user secret data
*/ */
export function blind(m: BigNumber, signerR: Point): { mBlinded: BigNumber, userSecretData: UserSecretData } { export function blind(m: BigNumber, signerR: Point): { mBlinded: BigNumber, userSecretData: UserSecretData } {
const u: UserSecretData = { a: new BigNumber(0), b: new BigNumber(0), f: G } const u: UserSecretData = { a: new BigNumber(0), b: new BigNumber(0), f: G }
@ -84,6 +84,7 @@ export function blind(m: BigNumber, signerR: Point): { mBlinded: BigNumber, user
return { mBlinded: mBlinded.mod(n), userSecretData: u } return { mBlinded: mBlinded.mod(n), userSecretData: u }
} }
/** Performs a signature on a blinded message */
export function blindSign(sk: BigNumber, mBlinded: BigNumber, k: BigNumber): BigNumber { export function blindSign(sk: BigNumber, mBlinded: BigNumber, k: BigNumber): BigNumber {
let sBlind = sk.mul(mBlinded) let sBlind = sk.mul(mBlinded)
sBlind = sBlind.add(k) sBlind = sBlind.add(k)

Loading…
Cancel
Save