-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended Idemix Signature Sig Algorithm #5
Conversation
- Additional of the EID commitment to the metadata - Ability to generate an Idemix signature against an already existing EDI commitment and its opening Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
the signature carries the same nymID Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx Angelo, a couple of Qs
@@ -841,6 +869,28 @@ func (sig *Signature) Ver( | |||
if !Nym_eid.Equals(EidNym) { | |||
return errors.Errorf("signature invalid: nym eid validation failed") | |||
} | |||
|
|||
if !meta.NymEIDAuditData.Nym.Equals(EidNym) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if meta is nil, or some of the fields you deref?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reversed the variable. This should be safe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to double-check, if you supply a Nil
argument to Equals
, will it fail gracefully?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this depends on the underlying math library. Anyhow, if a panic happens it is caught in the upper layers.
Anyhow, let me add an explicit check :)
Signed-off-by: Angelo De Caro <[email protected]>
Nym_eid := H_a_eid.Mul2(meta.NymEIDAuditData.EID, HRand, meta.NymEIDAuditData.RNymEid) | ||
if !Nym_eid.Equals(EidNym) { | ||
return errors.Errorf("signature invalid: nym eid validation failed") | ||
if len(meta.NymEID) != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole block is untested right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
go.mod
Outdated
@@ -7,13 +7,15 @@ require ( | |||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect | |||
github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922 // indirect | |||
github.com/golang/protobuf v1.3.3 | |||
github.com/google/addlicense v1.0.0 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you pls revert these changes? This package is actually not needed, we only use it for the CI run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
go.mod
Outdated
github.com/hyperledger/fabric-protos-go v0.0.0-20210911123859-041d13f0980c | ||
github.com/onsi/ginkgo v1.14.0 | ||
github.com/onsi/gomega v1.10.1 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/stretchr/testify v1.7.1-0.20210116013205-6990a05d54c2 // includes ErrorContains | ||
github.com/sykesm/zap-logfmt v0.0.2 | ||
go.uber.org/zap v1.16.0 | ||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
- additional tests - check for nil meta.NymEIDAuditData.Nym Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
This PR brings:
Signed-off-by: Angelo De Caro [email protected]