From 189385e498a1f286e8209b32fa952f2000a07531 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Thu, 17 Oct 2024 15:44:43 -0700 Subject: [PATCH] remove challenge from ciphertext validity proof --- go.mod | 4 +- go.sum | 7 +- proto/confidentialtransfers/zk.proto | 4 +- x/confidentialtransfers/types/msgs_test.go | 21 ++++ x/confidentialtransfers/types/zk.go | 7 -- x/confidentialtransfers/types/zk.pb.go | 112 ++++++--------------- 6 files changed, 61 insertions(+), 94 deletions(-) diff --git a/go.mod b/go.mod index c4d37b994..f3edefbbd 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/rs/cors v1.8.2 github.com/rs/zerolog v1.30.0 github.com/sei-protocol/goutils v0.0.2 - github.com/sei-protocol/sei-cryptography v0.0.0-20241015233858-3ac0ad7e0311 + github.com/sei-protocol/sei-cryptography v0.0.0-20241017222230-693c1c3b144f github.com/sei-protocol/sei-db v0.0.27-0.20240123064153-d6dfa112e760 github.com/sirkon/goproxy v1.4.8 github.com/spf13/cast v1.5.0 @@ -128,6 +128,7 @@ require ( github.com/fzipp/gocyclo v0.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -175,6 +176,7 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect diff --git a/go.sum b/go.sum index cb35c28eb..a876c81ae 100644 --- a/go.sum +++ b/go.sum @@ -461,6 +461,7 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2Gihuqh github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -769,6 +770,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= @@ -1360,8 +1363,8 @@ github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQp github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8= github.com/sei-protocol/sei-cosmos v0.3.37-0.20240923023912-aa7a702d42cc h1:srWLbsoS0NYBIl8OjZOFuPmIeqf+fJTkfsK39MmG3+k= github.com/sei-protocol/sei-cosmos v0.3.37-0.20240923023912-aa7a702d42cc/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk= -github.com/sei-protocol/sei-cryptography v0.0.0-20241015233858-3ac0ad7e0311 h1:ftF8TbLc08AuPjKmNMgUUmhNdwbH1khOAwJtabknD5c= -github.com/sei-protocol/sei-cryptography v0.0.0-20241015233858-3ac0ad7e0311/go.mod h1:UKxRsOe0NunPs9SY0JFYqcTH5KMWwfLAZHtPEVNGqbk= +github.com/sei-protocol/sei-cryptography v0.0.0-20241017222230-693c1c3b144f h1:UPu7aAxnzCN3ENztPjDlRGuFl4JjTit+H5z3Zu1c4DA= +github.com/sei-protocol/sei-cryptography v0.0.0-20241017222230-693c1c3b144f/go.mod h1:UKxRsOe0NunPs9SY0JFYqcTH5KMWwfLAZHtPEVNGqbk= github.com/sei-protocol/sei-db v0.0.44 h1:HMgcyDTQlmXdJysHJxmIo66EKeXn1CSQT9qXDnxjJgI= github.com/sei-protocol/sei-db v0.0.44/go.mod h1:F/ZKZA8HJPcUzSZPA8yt6pfwlGriJ4RDR4eHKSGLStI= github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I= diff --git a/proto/confidentialtransfers/zk.proto b/proto/confidentialtransfers/zk.proto index 7d29a0eec..3c1e839e7 100644 --- a/proto/confidentialtransfers/zk.proto +++ b/proto/confidentialtransfers/zk.proto @@ -19,9 +19,9 @@ message CiphertextValidityProof { // Second commitment bytes commitment_2 = 2; - bytes challenge = 3; - + // First response bytes response_1 = 4; + // Second response bytes response_2 = 5; } \ No newline at end of file diff --git a/x/confidentialtransfers/types/msgs_test.go b/x/confidentialtransfers/types/msgs_test.go index cb70ba53b..576d9d5c4 100644 --- a/x/confidentialtransfers/types/msgs_test.go +++ b/x/confidentialtransfers/types/msgs_test.go @@ -94,4 +94,25 @@ func TestMsgTransfer_FromProto(t *testing.T) { assert.True(t, destinationCipherAmountHi.D.Equal(result.RecipientTransferAmountHi.D)) assert.True(t, remainingBalanceCiphertext.C.Equal(result.RemainingBalanceCommitment.C)) assert.True(t, remainingBalanceCiphertext.D.Equal(result.RemainingBalanceCommitment.D)) + + // Make sure the proofs are valid + assert.True(t, zkproofs.VerifyCiphertextValidity( + sourceCiphertextAmountLoValidityProof, + sourceKeypair.PublicKey, + sourceCiphertextAmountLo)) + + assert.True(t, zkproofs.VerifyCiphertextValidity( + sourceCiphertextAmountHiValidityProof, + sourceKeypair.PublicKey, + sourceCiphertextAmountHi)) + + assert.True(t, zkproofs.VerifyCiphertextValidity( + destinationCipherAmountLoValidityProof, + destinationKeypair.PublicKey, + destinationCipherAmountLo)) + + assert.True(t, zkproofs.VerifyCiphertextValidity( + destinationCipherAmountHiValidityProof, + destinationKeypair.PublicKey, + destinationCipherAmountHi)) } diff --git a/x/confidentialtransfers/types/zk.go b/x/confidentialtransfers/types/zk.go index 870954373..de55c5c82 100644 --- a/x/confidentialtransfers/types/zk.go +++ b/x/confidentialtransfers/types/zk.go @@ -58,7 +58,6 @@ func (c *CiphertextValidityProof) ToProto(zkp *zkproofs.CiphertextValidityProof) return &CiphertextValidityProof{ Commitment_1: zkp.Commitment1.ToAffineCompressed(), Commitment_2: zkp.Commitment2.ToAffineCompressed(), - Challenge: zkp.Challenge.Bytes(), Response_1: zkp.Response1.Bytes(), Response_2: zkp.Response2.Bytes(), } @@ -77,11 +76,6 @@ func (c *CiphertextValidityProof) FromProto() (*zkproofs.CiphertextValidityProof return nil, err } - challenge, err := ed25519Curve.Scalar.SetBytes(c.Challenge) - if err != nil { - return nil, err - } - r1, err := ed25519Curve.Scalar.SetBytes(c.Response_1) if err != nil { return nil, err @@ -94,7 +88,6 @@ func (c *CiphertextValidityProof) FromProto() (*zkproofs.CiphertextValidityProof return &zkproofs.CiphertextValidityProof{ Commitment1: c1, Commitment2: c2, - Challenge: challenge, Response1: r1, Response2: r2, }, nil diff --git a/x/confidentialtransfers/types/zk.pb.go b/x/confidentialtransfers/types/zk.pb.go index 034af7986..6de4789d0 100644 --- a/x/confidentialtransfers/types/zk.pb.go +++ b/x/confidentialtransfers/types/zk.pb.go @@ -103,9 +103,10 @@ type CiphertextValidityProof struct { Commitment_1 []byte `protobuf:"bytes,1,opt,name=commitment_1,json=commitment1,proto3" json:"commitment_1,omitempty"` // Second commitment Commitment_2 []byte `protobuf:"bytes,2,opt,name=commitment_2,json=commitment2,proto3" json:"commitment_2,omitempty"` - Challenge []byte `protobuf:"bytes,3,opt,name=challenge,proto3" json:"challenge,omitempty"` - Response_1 []byte `protobuf:"bytes,4,opt,name=response_1,json=response1,proto3" json:"response_1,omitempty"` - Response_2 []byte `protobuf:"bytes,5,opt,name=response_2,json=response2,proto3" json:"response_2,omitempty"` + // First response + Response_1 []byte `protobuf:"bytes,4,opt,name=response_1,json=response1,proto3" json:"response_1,omitempty"` + // Second response + Response_2 []byte `protobuf:"bytes,5,opt,name=response_2,json=response2,proto3" json:"response_2,omitempty"` } func (m *CiphertextValidityProof) Reset() { *m = CiphertextValidityProof{} } @@ -155,13 +156,6 @@ func (m *CiphertextValidityProof) GetCommitment_2() []byte { return nil } -func (m *CiphertextValidityProof) GetChallenge() []byte { - if m != nil { - return m.Challenge - } - return nil -} - func (m *CiphertextValidityProof) GetResponse_1() []byte { if m != nil { return m.Response_1 @@ -184,33 +178,32 @@ func init() { func init() { proto.RegisterFile("confidentialtransfers/zk.proto", fileDescriptor_71d8640cbb42ddec) } var fileDescriptor_71d8640cbb42ddec = []byte{ - // 411 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xbf, 0xae, 0xd3, 0x30, - 0x14, 0xc6, 0x6b, 0xfe, 0x5c, 0xe9, 0xfa, 0x46, 0x0c, 0x59, 0x60, 0x80, 0x08, 0x2e, 0x12, 0x54, - 0x20, 0x12, 0x25, 0x3c, 0x00, 0xa2, 0x5d, 0x18, 0x18, 0x50, 0x84, 0x90, 0x60, 0xb1, 0x5c, 0xf7, - 0xb4, 0x39, 0x22, 0xb1, 0x23, 0xdb, 0x45, 0x2d, 0x4f, 0xc1, 0xcc, 0x04, 0xef, 0xc0, 0xc6, 0x0b, - 0x30, 0x76, 0x64, 0x44, 0xed, 0x8b, 0xa0, 0xba, 0x4d, 0xdb, 0x84, 0xd2, 0xdb, 0xa1, 0xdd, 0xe2, - 0xe3, 0x73, 0xce, 0xf7, 0xd3, 0x77, 0x7c, 0x42, 0x03, 0xa1, 0xe4, 0x00, 0xfb, 0x20, 0x2d, 0xf2, - 0xdc, 0x6a, 0x2e, 0xcd, 0x00, 0xb4, 0x89, 0x3e, 0x7f, 0x0c, 0x4b, 0xad, 0xac, 0xf2, 0x9f, 0x18, - 0x40, 0xf7, 0x25, 0x54, 0x1e, 0x1a, 0x40, 0x91, 0x71, 0x94, 0xe1, 0xce, 0xa2, 0xcb, 0x1f, 0x67, - 0xf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9e, 0xe7, 0x20, 0x87, 0xe0, 0x1e, 0x89, 0x97, 0x6e, 0x02, 0xfe, - 0x3d, 0x4a, 0x35, 0x98, 0x52, 0x49, 0x03, 0x2c, 0x76, 0x33, 0xf2, 0xd2, 0xf3, 0x2a, 0x12, 0xd7, - 0xae, 0x13, 0xe7, 0xcf, 0xd6, 0x75, 0xd2, 0x79, 0xff, 0x6b, 0x16, 0x90, 0xe9, 0x2c, 0x20, 0x7f, - 0x66, 0x01, 0xf9, 0x32, 0x0f, 0x5a, 0xd3, 0x79, 0xd0, 0xfa, 0x3d, 0x0f, 0x5a, 0x1f, 0x5e, 0x0c, - 0xd1, 0x66, 0xa3, 0x5e, 0x28, 0x54, 0x11, 0x19, 0xc0, 0x67, 0x95, 0x9f, 0xee, 0xe0, 0x0c, 0x8d, - 0xc6, 0xd1, 0xee, 0xdf, 0x8f, 0x9d, 0x94, 0x60, 0x7a, 0x67, 0xae, 0xe2, 0xf9, 0xdf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x4a, 0x19, 0x74, 0xe9, 0xa4, 0x04, 0x00, 0x00, + // 395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x4d, 0x4f, 0xe2, 0x40, + 0x18, 0xc7, 0x99, 0x7d, 0x21, 0xd9, 0x81, 0xec, 0xa1, 0x97, 0xdd, 0xcb, 0x36, 0xbb, 0x6c, 0xa2, + 0x44, 0x63, 0x9b, 0xd6, 0x0f, 0x60, 0x84, 0x8b, 0x07, 0x0f, 0x86, 0x18, 0x13, 0xbd, 0x4c, 0x86, + 0x32, 0xd0, 0x27, 0xb6, 0x33, 0xcd, 0xcc, 0x60, 0xc0, 0x4f, 0xe1, 0xd9, 0xc4, 0x44, 0xbf, 0x83, + 0x1f, 0xc2, 0x23, 0x47, 0x8f, 0x06, 0xbe, 0x88, 0x61, 0xa0, 0x48, 0x2b, 0x22, 0x07, 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3, 0xdb, 0x9a, 0xe9, 0x2e, 0xf7, 0x6f, 0x39, 0xe2, 0x7b, 0x0b, 0xbf, 0x6f, + 0x1e, 0x31, 0xe7, 0x62, 0xe5, 0x0e, 0xe1, 0x5f, 0x1f, 0xf4, 0xb0, 0xfe, 0xe1, 0xf2, 0xdc, 0xb2, + 0x78, 0x66, 0x3f, 0xca, 0x8d, 0xd2, 0xdb, 0x9d, 0x97, 0x4b, 0xf1, 0xcd, 0x1f, 0x9a, 0x49, 0xf1, + 0xad, 0x3f, 0x18, 0x4b, 0xa6, 0x12, 0xc1, 0x15, 0x23, 0x9e, 0x99, 0x42, 0xb9, 0xf1, 0x23, 0xbd, + 0xf1, 0x32, 0x61, 0xdf, 0x38, 0x30, 0x17, 0xf6, 0x6b, 0xe7, 0x4f, 0x43, 0x1b, 0x0d, 0x86, 0x36, + 0x7a, 0x19, 0xda, 0xe8, 0x66, 0x64, 0x17, 0x06, 0x23, 0xbb, 0xf0, 0x3c, 0xb2, 0x0b, 0x17, 0x07, + 0x1d, 0xd0, 0x61, 0xb7, 0xe9, 0x04, 0x22, 0x76, 0x15, 0x83, 0xbd, 0xd4, 0x31, 0x73, 0x30, 0x96, + 0xb9, 0x3d, 0x77, 0xf1, 0x03, 0xa3, 0xfb, 0x09, 0x53, 0xcd, 0xa2, 0xa9, 0xd8, 0x7f, 0x0d, 0x00, + 0x00, 0xff, 0xff, 0x33, 0xda, 0x99, 0xf7, 0x86, 0x04, 0x00, 0x00, } func (m *TransferProofs) Marshal() (dAtA []byte, err error) { @@ -330,13 +323,6 @@ func (m *CiphertextValidityProof) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x22 } - if len(m.Challenge) > 0 { - i -= len(m.Challenge) - copy(dAtA[i:], m.Challenge) - i = encodeVarintZk(dAtA, i, uint64(len(m.Challenge))) - i-- - dAtA[i] = 0x1a - } if len(m.Commitment_2) > 0 { i -= len(m.Commitment_2) copy(dAtA[i:], m.Commitment_2) @@ -408,10 +394,6 @@ func (m *CiphertextValidityProof) Size() (n int) { if l > 0 { n += 1 + l + sovZk(uint64(l)) } - l = len(m.Challenge) - if l > 0 { - n += 1 + l + sovZk(uint64(l)) - } l = len(m.Response_1) if l > 0 { n += 1 + l + sovZk(uint64(l)) @@ -756,40 +738,6 @@ func (m *CiphertextValidityProof) Unmarshal(dAtA []byte) error { m.Commitment_2 = []byte{} } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Challenge", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowZk - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthZk - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthZk - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Challenge = append(m.Challenge[:0], dAtA[iNdEx:postIndex]...) - if m.Challenge == nil { - m.Challenge = []byte{} - } - iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Response_1", wireType)