Documentation ¶
Overview ¶
Package singhdas implementes "A Novel Proficient Blind Signature Scheme using ECC" by Nitu Singh and Sumanjit Das Some of the tests/verifications are not necessary but done anyways.
Index ¶
- Constants
- type BlindMessage
- type BlindMessageInt
- type BlindSignature
- func (blindSignature BlindSignature) Marshal() ([]byte, error)
- func (blindSignature BlindSignature) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
- func (blindSignature BlindSignature) UniqueID() []byte
- func (blindSignature BlindSignature) Unmarshal(b []byte) (genericblinding.BlindingData, error)
- type BlindSignatureInt
- type BlindingFactors
- func (blindingFactors BlindingFactors) Marshal() ([]byte, error)
- func (blindingFactors BlindingFactors) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
- func (blindingFactors BlindingFactors) UniqueID() []byte
- func (blindingFactors BlindingFactors) Unmarshal(b []byte) (genericblinding.BlindingData, error)
- type BlindingFactorsInt
- type BlindingParamClient
- func (blindingParamClient BlindingParamClient) Marshal() ([]byte, error)
- func (blindingParamClient BlindingParamClient) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
- func (blindingParamClient BlindingParamClient) UniqueID() []byte
- func (blindingParamClient BlindingParamClient) Unmarshal(b []byte) (genericblinding.BlindingData, error)
- type BlindingParamServer
- func (blindingParamServer BlindingParamServer) Marshal() ([]byte, error)
- func (blindingParamServer BlindingParamServer) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
- func (blindingParamServer BlindingParamServer) UniqueID() []byte
- func (blindingParamServer BlindingParamServer) Unmarshal(b []byte) (genericblinding.BlindingData, error)
- type ClearMessage
- type ClearSignature
- func (clearSignature ClearSignature) Marshal() ([]byte, error)
- func (clearSignature ClearSignature) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
- func (clearSignature ClearSignature) UniqueID() []byte
- func (clearSignature ClearSignature) Unmarshal(b []byte) (genericblinding.BlindingData, error)
- type GenericSigner
- type GenericSignerClient
- func (client GenericSignerClient) Blind(bpci genericblinding.BlindingParamClient, cmi genericblinding.ClearMessage) (genericblinding.BlindingFactors, genericblinding.BlindMessage, error)
- func (client GenericSignerClient) Unblind(bfaci genericblinding.BlindingFactors, cmi genericblinding.ClearMessage, ...) (genericblinding.ClearSignature, genericblinding.ClearMessage, error)
- func (client GenericSignerClient) Verify(sigi genericblinding.ClearSignature, cmi genericblinding.ClearMessage) (bool, error)
- type SignParamsInt
- type SignatureInt
- type Signer
- type SignerClient
- func (client SignerClient) Blind(message []byte, signerBlind *eccutil.Point) (blindMessage *BlindMessageInt, blindingFactors *BlindingFactorsInt, err error)
- func (client SignerClient) UnBlind(blindSignature *BlindSignatureInt, blindingFactors *BlindingFactorsInt) (*SignatureInt, error)
- func (client SignerClient) Verify(message []byte, signature *SignatureInt) (bool, error)
Constants ¶
const SchemeName = "SNG"
SchemeName is the name of this blinding scheme
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlindMessage ¶
type BlindMessage struct { SchemeName string DataType genericblinding.DataType PubKey eccutil.Point Message *big.Int SignerBlind eccutil.Point }
BlindMessage contains the client-produced blinding factors
func NewBlindMessage ¶
func NewBlindMessage(PubKey *eccutil.Point) BlindMessage
NewBlindMessage returns a new BlindingParamClient
func (BlindMessage) Marshal ¶
func (blindMessage BlindMessage) Marshal() ([]byte, error)
Marshal a BlindingParamClient
func (BlindMessage) SchemeData ¶
func (blindMessage BlindMessage) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
SchemeData returns general data for the scheme and BlindingData type
func (BlindMessage) UniqueID ¶
func (blindMessage BlindMessage) UniqueID() []byte
UniqueID returns a unique ID for this element. Constant in this case (zeros)
func (BlindMessage) Unmarshal ¶
func (blindMessage BlindMessage) Unmarshal(b []byte) (genericblinding.BlindingData, error)
Unmarshal []byte into BlindingParamClient
type BlindMessageInt ¶
BlindMessageInt encapsulates a blinded message
type BlindSignature ¶
type BlindSignature struct { SchemeName string DataType genericblinding.DataType PubKey eccutil.Point SignerBlind eccutil.Point S *big.Int }
BlindSignature contains the client-produced blinding factors
func NewBlindSignature ¶
func NewBlindSignature(PubKey *eccutil.Point) BlindSignature
NewBlindSignature returns a new BlindingParamClient
func (BlindSignature) Marshal ¶
func (blindSignature BlindSignature) Marshal() ([]byte, error)
Marshal a BlindingParamClient
func (BlindSignature) SchemeData ¶
func (blindSignature BlindSignature) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
SchemeData returns general data for the scheme and BlindingData type
func (BlindSignature) UniqueID ¶
func (blindSignature BlindSignature) UniqueID() []byte
UniqueID returns a unique ID for this element. Constant in this case (zeros)
func (BlindSignature) Unmarshal ¶
func (blindSignature BlindSignature) Unmarshal(b []byte) (genericblinding.BlindingData, error)
Unmarshal []byte into BlindingParamClient
type BlindSignatureInt ¶
BlindSignatureInt represents a single blind signature
type BlindingFactors ¶
type BlindingFactors struct { SchemeName string DataType genericblinding.DataType PubKey eccutil.Point R2 *big.Int R1inv *big.Int R1 *big.Int N *big.Int Hm *big.Int R eccutil.Point SignerBlind eccutil.Point IsUsed bool }
BlindingFactors contains the client-produced blinding factors
func NewBlindingFactors ¶
func NewBlindingFactors(PubKey *eccutil.Point) BlindingFactors
NewBlindingFactors returns a new BlindingParamClient
func (BlindingFactors) Marshal ¶
func (blindingFactors BlindingFactors) Marshal() ([]byte, error)
Marshal a BlindingParamClient
func (BlindingFactors) SchemeData ¶
func (blindingFactors BlindingFactors) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
SchemeData returns general data for the scheme and BlindingData type
func (BlindingFactors) UniqueID ¶
func (blindingFactors BlindingFactors) UniqueID() []byte
UniqueID returns a unique ID for this element. Constant in this case (zeros)
func (BlindingFactors) Unmarshal ¶
func (blindingFactors BlindingFactors) Unmarshal(b []byte) (genericblinding.BlindingData, error)
Unmarshal []byte into BlindingParamClient
type BlindingFactorsInt ¶
type BlindingFactorsInt struct { N *big.Int Hm *big.Int R *eccutil.Point SignerBlind *eccutil.Point // contains filtered or unexported fields }
BlindingFactorsInt holds parameters required for unblinding
type BlindingParamClient ¶
type BlindingParamClient struct { SchemeName string DataType genericblinding.DataType PubKey eccutil.Point Q eccutil.Point // Public, given to requestor }
BlindingParamClient is not needed in SNG
func NewBlindingParamClient ¶
func NewBlindingParamClient(PubKey *eccutil.Point) BlindingParamClient
NewBlindingParamClient returns a new BlindingParamClient
func (BlindingParamClient) Marshal ¶
func (blindingParamClient BlindingParamClient) Marshal() ([]byte, error)
Marshal a BlindingParamClient
func (BlindingParamClient) SchemeData ¶
func (blindingParamClient BlindingParamClient) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
SchemeData returns general data for the scheme and BlindingData type
func (BlindingParamClient) UniqueID ¶
func (blindingParamClient BlindingParamClient) UniqueID() []byte
UniqueID returns a unique ID for this element. Constant in this case (zeros)
func (BlindingParamClient) Unmarshal ¶
func (blindingParamClient BlindingParamClient) Unmarshal(b []byte) (genericblinding.BlindingData, error)
Unmarshal []byte into BlindingParamClient
type BlindingParamServer ¶
type BlindingParamServer struct { SchemeName string DataType genericblinding.DataType PubKey eccutil.Point K *big.Int // Private, never share Q eccutil.Point // Public, given to requestor R *big.Int IsUsed bool // Never use twice }
BlindingParamServer is not needed in SNG
func NewBlindingParamServer ¶
func NewBlindingParamServer(PubKey *eccutil.Point) BlindingParamServer
NewBlindingParamServer returns a new BlindingParamServer
func (BlindingParamServer) Marshal ¶
func (blindingParamServer BlindingParamServer) Marshal() ([]byte, error)
Marshal a BlindingParamServer
func (BlindingParamServer) SchemeData ¶
func (blindingParamServer BlindingParamServer) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
SchemeData returns general data for the scheme and BlindingData type
func (BlindingParamServer) UniqueID ¶
func (blindingParamServer BlindingParamServer) UniqueID() []byte
UniqueID returns a unique ID for this element. Constant in this case (zeros)
func (BlindingParamServer) Unmarshal ¶
func (blindingParamServer BlindingParamServer) Unmarshal(b []byte) (genericblinding.BlindingData, error)
Unmarshal []byte into BlindingParamServer
type ClearMessage ¶
type ClearMessage struct { SchemeName string DataType genericblinding.DataType Message []byte }
ClearMessage contains a message
func NewClearMessage ¶
func NewClearMessage(msg []byte) ClearMessage
NewClearMessage returns a new BlindingParamClient
func (ClearMessage) Marshal ¶
func (clearMessage ClearMessage) Marshal() ([]byte, error)
Marshal a BlindingParamClient
func (ClearMessage) SchemeData ¶
func (clearMessage ClearMessage) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
SchemeData returns general data for the scheme and BlindingData type
func (ClearMessage) UniqueID ¶
func (clearMessage ClearMessage) UniqueID() []byte
UniqueID returns a unique ID for this element. Constant in this case (zeros)
func (ClearMessage) Unmarshal ¶
func (clearMessage ClearMessage) Unmarshal(b []byte) (genericblinding.BlindingData, error)
Unmarshal []byte into BlindingParamClient
type ClearSignature ¶
type ClearSignature struct { SchemeName string DataType genericblinding.DataType PubKey eccutil.Point S *big.Int R2 *big.Int R eccutil.Point Hm *big.Int }
ClearSignature contains the client-produced blinding factors
func NewClearSignature ¶
func NewClearSignature(PubKey *eccutil.Point) ClearSignature
NewClearSignature returns a new BlindingParamClient
func (ClearSignature) Marshal ¶
func (clearSignature ClearSignature) Marshal() ([]byte, error)
Marshal a BlindingParamClient
func (ClearSignature) SchemeData ¶
func (clearSignature ClearSignature) SchemeData() (string, genericblinding.DataType, *eccutil.Point)
SchemeData returns general data for the scheme and BlindingData type
func (ClearSignature) UniqueID ¶
func (clearSignature ClearSignature) UniqueID() []byte
UniqueID returns a unique ID for this element. Constant in this case (zeros)
func (ClearSignature) Unmarshal ¶
func (clearSignature ClearSignature) Unmarshal(b []byte) (genericblinding.BlindingData, error)
Unmarshal []byte into BlindingParamClient
type GenericSigner ¶
type GenericSigner struct {
Signer
}
GenericSigner is a generic interface signer instance
func NewGenericBlindingServer ¶
func NewGenericBlindingServer(privkey []byte, pubkey *eccutil.Point, curve *eccutil.Curve) *GenericSigner
NewGenericBlindingServer returns a new signer
func (GenericSigner) GetParams ¶
func (server GenericSigner) GetParams() (genericblinding.BlindingParamClient, genericblinding.BlindingParamServer, error)
GetParams generates one-time BlindingParam
func (GenericSigner) Sign ¶
func (server GenericSigner) Sign(bpsi genericblinding.BlindingParamServer, bmi genericblinding.BlindMessage) (genericblinding.BlindSignature, error)
Sign a BlindMessage usign BlindingParam
type GenericSignerClient ¶
type GenericSignerClient struct {
SignerClient
}
GenericSignerClient encapsulates a client to a signer using generic interface
func NewGenericBlindingClient ¶
func NewGenericBlindingClient(pubkey *eccutil.Point, curve *eccutil.Curve) *GenericSignerClient
NewGenericBlindingClient returns a new client to a signer over curve with publickey
func (GenericSignerClient) Blind ¶
func (client GenericSignerClient) Blind(bpci genericblinding.BlindingParamClient, cmi genericblinding.ClearMessage) (genericblinding.BlindingFactors, genericblinding.BlindMessage, error)
Blind a ClearMessage with server-supplied BlindingParamClient
func (GenericSignerClient) Unblind ¶
func (client GenericSignerClient) Unblind(bfaci genericblinding.BlindingFactors, cmi genericblinding.ClearMessage, bsigi genericblinding.BlindSignature) (genericblinding.ClearSignature, genericblinding.ClearMessage, error)
Unblind a BlindSignature of ClearMessage using BlindingFactors
func (GenericSignerClient) Verify ¶
func (client GenericSignerClient) Verify(sigi genericblinding.ClearSignature, cmi genericblinding.ClearMessage) (bool, error)
Verify that ClearSignature is a signature of ClearMessage
type SignParamsInt ¶
type SignParamsInt struct { Q *eccutil.Point // Public, given to requestor // contains filtered or unexported fields }
SignParamsInt encapsulates a single signature temporary key
type SignatureInt ¶
type SignatureInt struct { S *big.Int R *eccutil.Point Hm *big.Int // contains filtered or unexported fields }
SignatureInt is a plain signature
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer is a signer instance
func (Signer) NewRequest ¶
func (signer Signer) NewRequest() (signparams *SignParamsInt, err error)
NewRequest issues a new request keypair
func (Signer) Sign ¶
func (signer Signer) Sign(blindMessage *BlindMessageInt, signParams *SignParamsInt) (S *BlindSignatureInt, err error)
Sign signs a blinded message
type SignerClient ¶
type SignerClient struct {
// contains filtered or unexported fields
}
SignerClient encapsulates a client to a signer
func NewSignerClient ¶
func NewSignerClient(pubkey *eccutil.Point, curve *eccutil.Curve) *SignerClient
NewSignerClient returns a new client to a signer over curve with publickey
func (SignerClient) Blind ¶
func (client SignerClient) Blind(message []byte, signerBlind *eccutil.Point) (blindMessage *BlindMessageInt, blindingFactors *BlindingFactorsInt, err error)
Blind blinds a message msg for signerBlind and returns the blinded message and the blinding factors
func (SignerClient) UnBlind ¶
func (client SignerClient) UnBlind(blindSignature *BlindSignatureInt, blindingFactors *BlindingFactorsInt) (*SignatureInt, error)
UnBlind a signature using blinding factor
func (SignerClient) Verify ¶
func (client SignerClient) Verify(message []byte, signature *SignatureInt) (bool, error)
Verify verifies that a signature signs message by the signer defined in SignerClient