blindsig_ps16

Pointcheval-Sanders Short Randomizable Signatures (PS16)

Authors: David Pointcheval, Olivier Sanders

Title: “Short Randomizable Signatures”
Published in: RSA Conference on Topics in Cryptology, 2016
Notes: Implements single/multi message signatures and blind signatures

Scheme Properties

  • Type: blind signature

  • Setting: bilinear groups (asymmetric)

  • Assumption: PS assumption

Implementation

Authors:

Ahmed Bakr

Date:

04/2023

class blindsig_ps16.PS_BlindMultiMessageSig(groupObj)[source]

Bases: PS_BlindSig

blind(messages, pk)[source]

This function takes a message and blinds it to return a blinded message. Inputs:

  • messages: List of messages to be blinded

  • pk: pk is needed to know some of the public parameters used in message blinding

Outputs:
  • C: A blinded message

  • t: Blind random value

keygen(num_messages)[source]

This function is used to generate the secret key and the public key of the signer Outputs:

  • sk: Secret key

  • pk: public key

sign(sk, pk, blinded_message)[source]

This function is used for the signer to sign a message Inputs:

  • sk: Secret key of the signer

  • pk: Public key of the signer

  • blinded_message: A blinded message to be signed

Outputs:
  • sigma_dash: Signature on the blinded message

unblind(blinded_sig, t)[source]

This function takes a blinded signature and returns the unblinded signature Inputs:

  • blinded_sig: Blinded signature

  • t: random number used to blind the original message

Outputs:
  • sigma: unblinded signature

verify(messages, pk, sig) bool[source]

This function is used for the user to verify a signature on a specific message using the message and the public key of the signer. Inputs:

  • messages: List of messages

  • pk: Public key

  • sig: signature

Outputs:
  • True if the signature is valid on the message by the user whose public key is pk

  • False, otherwise

class blindsig_ps16.PS_BlindSig(groupObj)[source]

Bases: PS_Sig

blind(message)[source]

This function takes a message and blinds it to return a blinded message. Inputs:

  • message: message to be blinded

Outputs:
  • blinded_message: A blinded message

keygen()[source]

This function is used to generate the secret key and the public key of the signer

proof_of_knowledge_of_commitment_secrets(t, messages, blinded_message, pk, group_obj, debug)[source]

This function runs shnorr’ interactive proof of knowledge

sign(sk, blinded_message)[source]

This function is used for the signer to sign a message Inputs:

  • sk: Secret key of the signer

  • blinded_message: A blinded message to be signed

Outputs:
  • sigma_dash: Signature on the blinded message

unblind(blinded_sig, t)[source]

This function takes a blinded signature and returns the unblinded signature Inputs:

  • blinded_sig: Blinded signature

  • t: random number used to blind the original message

Outputs:
  • sigma: unblinded signature

verify(message, pk, sig) bool[source]

This function is used for the user to verify a signature on a specific message using the message and the public key of the signer. Inputs:

  • message: The message

  • pk: Public key

  • sig: signature

Outputs:
  • True if the signature is valid on the message by the user whose public key is pk

  • False, otherwise

class blindsig_ps16.PS_BlindSingleMessageSig(groupObj)[source]

Bases: PS_BlindSig

blind(message, pk)[source]

This function takes a message and blinds it to return a blinded message. Inputs:

  • message: message to be blinded

  • pk: pk is needed to know some of the public parameters used in message blinding

Outputs:
  • C: A blinded message

  • t: Blind random value

keygen()[source]

This function is used to generate the secret key and the public key of the signer Outputs:

  • sk: Secret key

  • pk: public key

sign(sk, pk, blinded_message)[source]

This function is used for the signer to sign a message Inputs:

  • sk: Secret key of the signer

  • pk: Public key of the signer

  • blinded_message: A blinded message to be signed

Outputs:
  • sigma_dash: Signature on the blinded message

unblind(blinded_sig, t)[source]

This function takes a blinded signature and returns the unblinded signature Inputs:

  • blinded_sig: Blinded signature

  • t: random number used to blind the original message

Outputs:
  • sigma: unblinded signature

verify(message, pk, sig) bool[source]

This function is used for the user to verify a signature on a specific message using the message and the public key of the signer. Inputs:

  • message: The message

  • pk: Public key

  • sig: signature

Outputs:
  • True if the signature is valid on the message by the user whose public key is pk

  • False, otherwise

class blindsig_ps16.PS_Sig(groupObj)[source]

Bases: PKSig

keygen()[source]

This function is used to generate the secret key and the public key of the signer

sign(sk, message)[source]

This function is used for the signer to sign a message Inputs:

  • sk: Secret key of the signer

  • message: message to be signed

Outputs:
  • sigma: Signature on the message

verify(message, pk, sig) bool[source]

This function is used for the user to verify a signature on a specific message using the message and the public key of the signer. Inputs:

  • message: The message

  • pk: Public key

  • sig: signature

Outputs:
  • True if the signature is valid on the message by the user whose public key is pk

  • False, otherwise

class blindsig_ps16.PS_SigMultiMessage(groupObj)[source]

Bases: PS_Sig

keygen(num_messages)[source]

This function is used to generate the secret key and the public key of the signer Inputs:

  • num_message: Number of messages

sign(sk, messages)[source]

This function is used for the signer to sign a message Inputs:

  • sk: Secret key of the signer

  • messages: List of messages to be signed

Outputs:
  • sigma: Signature on the message

verify(messages, pk, sig) bool[source]

This function is used for the user to verify a signature on a specific message using the message and the public key of the signer. Inputs:

  • messages: The list of messages

  • pk: Public key

  • sig: signature

Outputs:
  • True if the signature is valid on the message by the user whose public key is pk

  • False, otherwise

class blindsig_ps16.PS_SigSingleMessage(groupObj)[source]

Bases: PS_Sig

keygen()[source]

This function is used to generate the secret key and the public key of the signer

sign(sk, message)[source]

This function is used for the signer to sign a message Inputs:

  • sk: Secret key of the signer

  • message: message to be signed

Outputs:
  • sigma: Signature on the message

verify(message, pk, sig) bool[source]

This function is used for the user to verify a signature on a specific message using the message and the public key of the signer. Inputs:

  • message: The message

  • pk: Public key

  • sig: signature

Outputs:
  • True if the signature is valid on the message by the user whose public key is pk

  • False, otherwise

class blindsig_ps16.ShnorrInteractiveZKP[source]

Bases: object

class Prover(secret_t, secret_messages, groupObj)[source]

Bases: object

create_proof(c)[source]
  1. This function is executed by the prover after he received the challenge value (c) from the verifier

create_prover_commitments(pk)[source]
  1. This function is executed by the prover to send a random value to the verifier

class Verifier(groupObj)[source]

Bases: object

create_verifier_challenge()[source]
  1. This function is executed by the verifier after he had received the value u from the prover to send a challenge value to the prover.

is_proof_verified(s_t, s_ms, pk, blinded_message, commitment)[source]
  1. This function is executed by the verifier to verify the authenticity of the proof sent by the prover

blindsig_ps16.blinded_multi_message_main(debug=False)[source]
blindsig_ps16.blinded_single_message_main(debug=False)[source]
blindsig_ps16.dump_to_zp_element(obj, group_obj)[source]
blindsig_ps16.multi_message_main(debug=False)[source]
blindsig_ps16.single_message_main(debug=False)[source]