From e62783efd933ec39a2bfda5833dd11008bcf704a Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Fri, 11 Feb 2022 14:26:53 +0100 Subject: [PATCH 1/3] Add the TSM identity to Darc The Trusted Secure Module is used by DuoKey to sign messages using a threshold signature scheme. This PR adds support for Darcs to verify those messages. It is used for the Master Thesis protject of Pilar Marxer. --- darc/darc.go | 138 +- darc/darc_test.go | 39 +- darc/expression/expression.go | 4 +- darc/proto.go | 11 + .../ch/epfl/dedis/lib/proto/DarcProto.java | 1256 ++++++++++++++--- .../js/cothority/src/protobuf/models.json | 2 +- external/proto/darc.proto | 7 + 7 files changed, 1228 insertions(+), 229 deletions(-) diff --git a/darc/darc.go b/darc/darc.go index 3a8506a79a..30c6814157 100644 --- a/darc/darc.go +++ b/darc/darc.go @@ -33,6 +33,8 @@ package darc import ( "bytes" "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" "crypto/sha256" "crypto/sha512" "crypto/x509" @@ -773,6 +775,10 @@ func (s Signer) Type() int { return 3 case s.EvmContract != nil: return 4 + case s.DID != nil: + return 5 + case s.tsm != nil: + return 6 default: return -1 } @@ -790,6 +796,8 @@ func (s Signer) Identity() Identity { return NewIdentityProxy(s.Proxy) case 4: return NewIdentityEvmContract(s.EvmContract) + case 6: + return NewIdentityTSM(s.tsm.PrivateKey.PublicKey) default: return Identity{} } @@ -811,6 +819,8 @@ func (s Signer) Sign(msg []byte) ([]byte, error) { return s.Proxy.Sign(msg) case 4: return s.EvmContract.Sign(msg) + case 6: + return s.tsm.Sign(msg) default: return nil, errors.New("unknown signer type") } @@ -821,7 +831,7 @@ func (s Signer) GetPrivate() (kyber.Scalar, error) { switch s.Type() { case 1: return s.Ed25519.Secret, nil - case 0, 2, 3: + case 0, 2, 3, 4, 5, 6: return nil, errors.New("signer lacks a private key") default: return nil, errors.New("signer is of unknown type") @@ -845,6 +855,8 @@ func (id Identity) Equal(id2 *Identity) bool { return id.Proxy.Equal(id2.Proxy) case 4: return id.EvmContract.Equal(id2.EvmContract) + case 6: + return bytes.Equal(id.TSM.PublicKey, id2.TSM.PublicKey) } return false } @@ -863,6 +875,10 @@ func (id Identity) Type() int { return 3 case id.EvmContract != nil: return 4 + case id.DID != nil: + return 5 + case id.TSM != nil: + return 6 } return -1 } @@ -870,19 +886,7 @@ func (id Identity) Type() int { // PrimaryIdentity returns true if the identity is a primary identity, which is // an identity that is associated with a concrete public/private key. func (id Identity) PrimaryIdentity() bool { - switch { - case id.Darc != nil: - return false - case id.Ed25519 != nil: - return true - case id.X509EC != nil: - return true - case id.Proxy != nil: - return true - case id.EvmContract != nil: - return true - } - return false + return id.Type() != 0 } // TypeString returns the string of the type of the identity. @@ -898,6 +902,10 @@ func (id Identity) TypeString() string { return "proxy" case 4: return "evm_contract" + case 5: + return "did" + case 6: + return "tsm" default: return "No identity" } @@ -918,6 +926,14 @@ func (id Identity) String() string { bevmString := hex.EncodeToString(id.EvmContract.BEvmID) addrString := id.EvmContract.Address.Hex() return fmt.Sprintf("%s:%s:%s", id.TypeString(), bevmString, addrString) + case 5: + return fmt.Sprintf("%s:%s", id.TypeString(), id.DID.DID) + case 6: + buf, err := id.TSM.MarshalBinary() + if err != nil { + panic("couldn't marshal TSM key: " + err.Error()) + } + return fmt.Sprintf("%s:%x", id.TypeString(), buf) default: return "No identity" } @@ -937,6 +953,8 @@ func (id Identity) Verify(msg, sig []byte) error { return id.Proxy.Verify(msg, sig) case 4: return id.EvmContract.Verify(msg, sig) + case 6: + return id.TSM.Verify(msg, sig) default: return errors.New("unknown identity") } @@ -964,6 +982,9 @@ func (id Identity) GetPublicBytes() []byte { return buf case 4: return id.EvmContract.Address[:] + case 6: + buf := id.TSM.PublicKey + return buf default: return nil } @@ -1012,6 +1033,52 @@ func NewIdentityX509EC(public []byte) Identity { } } +// NewIdentityTSM creates a new TSM identity struct given a public key +func NewIdentityTSM(ecKey ecdsa.PublicKey) Identity { + return Identity{ + TSM: &IdentityTSM{ + PublicKey: elliptic.MarshalCompressed(ecKey.Curve, ecKey.X, + ecKey.Y), + ecKey: &ecKey, + }, + } +} + +// GetPublic returns the public key of the Identity. +// As it is stored in binary format, it might have to be converted. +func (ide *IdentityTSM) GetPublic() ecdsa.PublicKey { + if ide.ecKey == nil { + ecKey := ecdsa.PublicKey{} + x, y := elliptic.UnmarshalCompressed(elliptic.P256(), ide.PublicKey) + ecKey.X = x + ecKey.Y = y + ecKey.Curve = elliptic.P256() + ide.ecKey = &ecKey + } + return *ide.ecKey +} + +// Verify the signature of the identity. +func (ide *IdentityTSM) Verify(msg []byte, sig []byte) error { + ecKey := ide.GetPublic() + valid := ecdsa.VerifyASN1(&ecKey, msg, sig) + if !valid { + return errors.New("Signature failed to verify") + } + return nil +} + +// MarshalBinary returns the compressed public key +func (ide IdentityTSM) MarshalBinary() ([]byte, error) { + return ide.PublicKey, nil +} + +// UnmarshalBinary stores the compressed public key +func (ide *IdentityTSM) UnmarshalBinary(data []byte) error { + ide.PublicKey = data + return nil +} + // NewIdentityProxy creates a new OpenID Connect identity struct. func NewIdentityProxy(s *SignerProxy) Identity { return Identity{ @@ -1120,6 +1187,8 @@ func ParseIdentity(in string) (Identity, error) { return parseIDProxy(fields[1]) case "evm_contract": return parseIDEvmContract(fields[1]) + case "tsm": + return parseIDTSM(fields[1]) default: return Identity{}, fmt.Errorf("unknown identity type %v", fields[0]) } @@ -1142,6 +1211,16 @@ func parseIDX509ec(in string) (Identity, error) { return Identity{X509EC: &IdentityX509EC{Public: id}}, nil } +func parseIDTSM(in string) (Identity, error) { + idTSM := IdentityTSM{} + _, err := hex.Decode(idTSM.PublicKey, []byte(in)) + if err != nil { + return Identity{}, err + } + + return Identity{TSM: &idTSM}, nil +} + func parseIDDarc(in string) (Identity, error) { id := make([]byte, hex.DecodedLen(len(in))) _, err := hex.Decode(id, []byte(in)) @@ -1447,6 +1526,37 @@ func (kcs SignerX509EC) Sign(msg []byte) ([]byte, error) { return nil, errors.New("not yet implemented") } +// SignerTSM holds the private key necessary to sign Darcs. +// As this is only used in testing, it is not in proto.go and thus +// not exported. +type SignerTSM struct { + PrivateKey ecdsa.PrivateKey +} + +// NewSignerTSM creates a tsm signer with a SECP256K1 key. +// If a nil key is given, then a random key is generated. +// This is mostly used for testing, as the real TSM is a hardware device +// and not supported in tests. +func NewSignerTSM(private ecdsa.PrivateKey) Signer { + if private.D == nil { + priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + panic("couldn't generate key: " + err.Error()) + } + private = *priv + } + return Signer{tsm: &SignerTSM{ + PrivateKey: private, + }} +} + +// Sign the message with the private key. +// This is not really possible with the TSM signer, +// so this is mostly useful for testing. +func (kcs SignerTSM) Sign(msg []byte) ([]byte, error) { + return ecdsa.SignASN1(rand.Reader, &kcs.PrivateKey, msg) +} + // NewSignerProxy creates a new SignerProxy. When Sign is called, the getSignature // callback will be called, so that the caller can use the appropriate mechanism // to retrieve and/or construct the signature. diff --git a/darc/darc_test.go b/darc/darc_test.go index 9f0cf289db..c907ab9450 100644 --- a/darc/darc_test.go +++ b/darc/darc_test.go @@ -1,8 +1,13 @@ package darc import ( + "crypto/ecdsa" + "crypto/elliptic" + "crypto/sha256" + "encoding/hex" "errors" "fmt" + "math/big" "net/url" "strings" "testing" @@ -754,7 +759,6 @@ func testIdentity(t *testing.T, sig Signer) { msg := []byte("something secret") signed, err := sig.Sign(msg) require.NoError(t, err) - id := sig.Identity() require.NoError(t, id.Verify(msg, signed)) require.Error(t, id.Verify([]byte("wrong message"), signed)) @@ -763,4 +767,37 @@ func testIdentity(t *testing.T, sig Signer) { // Test the different identities available - currently only Ed25519. func TestIdentities(t *testing.T) { testIdentity(t, NewSignerEd25519(nil, nil)) + testIdentity(t, NewSignerTSM(ecdsa.PrivateKey{})) +} + +// Test a signature from the TSM +func TestTSMSignature(t *testing.T) { + var x, _ = new(big.Int).SetString("25613385885653880697990944418179706546134037329992108968315147853972798913688", 10) + var y, _ = new(big.Int).SetString("74946767262888349555270609195205284686604880870734462312238891495596941025713", 10) + pk := ecdsa.PublicKey{ + Curve: elliptic.P256(), + X: x, + Y: y, + } + id := NewIdentityTSM(pk) + + msg := []byte(`Hello World`) + digest := sha256.Sum256(msg) + + // Signature from code example go-tsm-sdk corresponding to tsm public + // key example + signed, _ := hex.DecodeString("304402204f0b20a44efacec7b0514683233a79552026fe80e468078f6fed6cfe3f3e8a0402201eb12db7f6fe0828cafe8b0a032a37ff377b342799cfe77cfbac40c8ec1fa9e8") + + require.NoError(t, id.Verify(digest[:], signed)) + require.Error(t, id.Verify([]byte("wrong message"), signed)) +} + +// Make sure Marshalling and Unmarshalling work +func TestTSMMarshalling(t *testing.T) { + id := NewSignerTSM(ecdsa.PrivateKey{}).Identity() + buf, err := id.TSM.MarshalBinary() + require.NoError(t, err) + var id2 IdentityTSM + require.NoError(t, id2.UnmarshalBinary(buf)) + require.True(t, id.Equal(&Identity{TSM: &id2})) } diff --git a/darc/expression/expression.go b/darc/expression/expression.go index 7dd5bff7da..cb99140b04 100644 --- a/darc/expression/expression.go +++ b/darc/expression/expression.go @@ -6,7 +6,7 @@ the syntax we use is from: https://en.wikipedia.org/wiki/Extended_Backus%E2%80%9 expr = term, [ '&', term ]* term = factor, [ '|', factor ]* factor = '(', expr, ')' | id | openid - identity = (darc|ed25519|x509ec):[0-9a-fA-F]+ + identity = (darc|ed25519|x509ec|tsm):[0-9a-fA-F]+ proxy = proxy:[0-9a-fA-F]+:[^ \n\t]* evm_identity = evm_contract:[0-9a-fA-F]+:0x[0-9a-fA-F]+ attr = attr:[0-9a-zA-Z\-\_]+:[^ \n\t]* @@ -154,7 +154,7 @@ func (e Expr) AddAndElement(id string) Expr { func identity() parsec.Parser { return func(s parsec.Scanner) (parsec.ParsecNode, parsec.Scanner) { _, s = s.SkipAny(`^[ \n\t]+`) - p := parsec.Token(`(darc|ed25519|x509ec):[0-9a-fA-F]+`, "HEX") + p := parsec.Token(`(darc|ed25519|x509ec|tsm):[0-9a-fA-F]+`, "HEX") return p(s) } } diff --git a/darc/proto.go b/darc/proto.go index 2367065a22..db193764af 100644 --- a/darc/proto.go +++ b/darc/proto.go @@ -1,6 +1,8 @@ package darc import ( + "crypto/ecdsa" + "go.dedis.ch/cothority/v3/darc/expression" "go.dedis.ch/kyber/v3" "go.dedis.ch/onet/v3/network" @@ -71,6 +73,8 @@ type Identity struct { EvmContract *IdentityEvmContract // A claim signed by one of the keys in a DID Doc DID *IdentityDID + // Public-key identity from an ECDSA key + TSM *IdentityTSM } // IdentityEd25519 holds a Ed25519 public key (Point) @@ -78,6 +82,12 @@ type IdentityEd25519 struct { Point kyber.Point } +// IdentityTSM holds a secp256k1 key (array of bytes) +type IdentityTSM struct { + PublicKey []byte + ecKey *ecdsa.PublicKey +} + // IdentityX509EC holds a public key from a X509EC type IdentityX509EC struct { Public []byte @@ -159,6 +169,7 @@ type Signer struct { Proxy *SignerProxy EvmContract *SignerEvmContract DID *SignerDID + tsm *SignerTSM } // SignerEd25519 holds a public and private keys necessary to sign Darcs diff --git a/external/java/src/main/java/ch/epfl/dedis/lib/proto/DarcProto.java b/external/java/src/main/java/ch/epfl/dedis/lib/proto/DarcProto.java index a5382a32d8..61709bb029 100644 --- a/external/java/src/main/java/ch/epfl/dedis/lib/proto/DarcProto.java +++ b/external/java/src/main/java/ch/epfl/dedis/lib/proto/DarcProto.java @@ -2589,6 +2589,33 @@ public interface IdentityOrBuilder extends * optional .darc.IdentityDID did = 6; */ ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder getDidOrBuilder(); + + /** + *
+     * Public-key identity from an ECDSA key
+     * 
+ * + * optional .darc.IdentityTSM tsm = 7; + * @return Whether the tsm field is set. + */ + boolean hasTsm(); + /** + *
+     * Public-key identity from an ECDSA key
+     * 
+ * + * optional .darc.IdentityTSM tsm = 7; + * @return The tsm. + */ + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM getTsm(); + /** + *
+     * Public-key identity from an ECDSA key
+     * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSMOrBuilder getTsmOrBuilder(); } /** *
@@ -2719,6 +2746,19 @@ private Identity(
               bitField0_ |= 0x00000020;
               break;
             }
+            case 58: {
+              ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000040) != 0)) {
+                subBuilder = tsm_.toBuilder();
+              }
+              tsm_ = input.readMessage(ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(tsm_);
+                tsm_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000040;
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -2980,6 +3020,44 @@ public ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder getDidOrBuilder()
       return did_ == null ? ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.getDefaultInstance() : did_;
     }
 
+    public static final int TSM_FIELD_NUMBER = 7;
+    private ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM tsm_;
+    /**
+     * 
+     * Public-key identity from an ECDSA key
+     * 
+ * + * optional .darc.IdentityTSM tsm = 7; + * @return Whether the tsm field is set. + */ + @java.lang.Override + public boolean hasTsm() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+     * Public-key identity from an ECDSA key
+     * 
+ * + * optional .darc.IdentityTSM tsm = 7; + * @return The tsm. + */ + @java.lang.Override + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM getTsm() { + return tsm_ == null ? ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.getDefaultInstance() : tsm_; + } + /** + *
+     * Public-key identity from an ECDSA key
+     * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + @java.lang.Override + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSMOrBuilder getTsmOrBuilder() { + return tsm_ == null ? ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.getDefaultInstance() : tsm_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -3023,6 +3101,12 @@ public final boolean isInitialized() { return false; } } + if (hasTsm()) { + if (!getTsm().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -3048,6 +3132,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(6, getDid()); } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(7, getTsm()); + } unknownFields.writeTo(output); } @@ -3081,6 +3168,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getDid()); } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getTsm()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3126,6 +3217,11 @@ public boolean equals(final java.lang.Object obj) { if (!getDid() .equals(other.getDid())) return false; } + if (hasTsm() != other.hasTsm()) return false; + if (hasTsm()) { + if (!getTsm() + .equals(other.getTsm())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3161,6 +3257,10 @@ public int hashCode() { hash = (37 * hash) + DID_FIELD_NUMBER; hash = (53 * hash) + getDid().hashCode(); } + if (hasTsm()) { + hash = (37 * hash) + TSM_FIELD_NUMBER; + hash = (53 * hash) + getTsm().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -3300,6 +3400,7 @@ private void maybeForceBuilderInitialization() { getProxyFieldBuilder(); getEvmcontractFieldBuilder(); getDidFieldBuilder(); + getTsmFieldBuilder(); } } @java.lang.Override @@ -3341,6 +3442,12 @@ public Builder clear() { didBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); + if (tsmBuilder_ == null) { + tsm_ = null; + } else { + tsmBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -3417,6 +3524,14 @@ public ch.epfl.dedis.lib.proto.DarcProto.Identity buildPartial() { } to_bitField0_ |= 0x00000020; } + if (((from_bitField0_ & 0x00000040) != 0)) { + if (tsmBuilder_ == null) { + result.tsm_ = tsm_; + } else { + result.tsm_ = tsmBuilder_.build(); + } + to_bitField0_ |= 0x00000040; + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3484,6 +3599,9 @@ public Builder mergeFrom(ch.epfl.dedis.lib.proto.DarcProto.Identity other) { if (other.hasDid()) { mergeDid(other.getDid()); } + if (other.hasTsm()) { + mergeTsm(other.getTsm()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3521,6 +3639,11 @@ public final boolean isInitialized() { return false; } } + if (hasTsm()) { + if (!getTsm().isInitialized()) { + return false; + } + } return true; } @@ -4439,45 +4562,743 @@ public Builder clearDid() { * * optional .darc.IdentityDID did = 6; */ - public ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.Builder getDidBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getDidFieldBuilder().getBuilder(); + public ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.Builder getDidBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getDidFieldBuilder().getBuilder(); + } + /** + *
+       * A claim signed by one of the keys in a DID Doc
+       * 
+ * + * optional .darc.IdentityDID did = 6; + */ + public ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder getDidOrBuilder() { + if (didBuilder_ != null) { + return didBuilder_.getMessageOrBuilder(); + } else { + return did_ == null ? + ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.getDefaultInstance() : did_; + } + } + /** + *
+       * A claim signed by one of the keys in a DID Doc
+       * 
+ * + * optional .darc.IdentityDID did = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + ch.epfl.dedis.lib.proto.DarcProto.IdentityDID, ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.Builder, ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder> + getDidFieldBuilder() { + if (didBuilder_ == null) { + didBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + ch.epfl.dedis.lib.proto.DarcProto.IdentityDID, ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.Builder, ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder>( + getDid(), + getParentForChildren(), + isClean()); + did_ = null; + } + return didBuilder_; + } + + private ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM tsm_; + private com.google.protobuf.SingleFieldBuilderV3< + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSMOrBuilder> tsmBuilder_; + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + * @return Whether the tsm field is set. + */ + public boolean hasTsm() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + * @return The tsm. + */ + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM getTsm() { + if (tsmBuilder_ == null) { + return tsm_ == null ? ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.getDefaultInstance() : tsm_; + } else { + return tsmBuilder_.getMessage(); + } + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + public Builder setTsm(ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM value) { + if (tsmBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tsm_ = value; + onChanged(); + } else { + tsmBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + return this; + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + public Builder setTsm( + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder builderForValue) { + if (tsmBuilder_ == null) { + tsm_ = builderForValue.build(); + onChanged(); + } else { + tsmBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + return this; + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + public Builder mergeTsm(ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM value) { + if (tsmBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + tsm_ != null && + tsm_ != ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.getDefaultInstance()) { + tsm_ = + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.newBuilder(tsm_).mergeFrom(value).buildPartial(); + } else { + tsm_ = value; + } + onChanged(); + } else { + tsmBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + return this; + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + public Builder clearTsm() { + if (tsmBuilder_ == null) { + tsm_ = null; + onChanged(); + } else { + tsmBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder getTsmBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getTsmFieldBuilder().getBuilder(); + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSMOrBuilder getTsmOrBuilder() { + if (tsmBuilder_ != null) { + return tsmBuilder_.getMessageOrBuilder(); + } else { + return tsm_ == null ? + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.getDefaultInstance() : tsm_; + } + } + /** + *
+       * Public-key identity from an ECDSA key
+       * 
+ * + * optional .darc.IdentityTSM tsm = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSMOrBuilder> + getTsmFieldBuilder() { + if (tsmBuilder_ == null) { + tsmBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSMOrBuilder>( + getTsm(), + getParentForChildren(), + isClean()); + tsm_ = null; + } + return tsmBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:darc.Identity) + } + + // @@protoc_insertion_point(class_scope:darc.Identity) + private static final ch.epfl.dedis.lib.proto.DarcProto.Identity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new ch.epfl.dedis.lib.proto.DarcProto.Identity(); + } + + public static ch.epfl.dedis.lib.proto.DarcProto.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Identity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public ch.epfl.dedis.lib.proto.DarcProto.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IdentityEd25519OrBuilder extends + // @@protoc_insertion_point(interface_extends:darc.IdentityEd25519) + com.google.protobuf.MessageOrBuilder { + + /** + * required bytes point = 1; + * @return Whether the point field is set. + */ + boolean hasPoint(); + /** + * required bytes point = 1; + * @return The point. + */ + com.google.protobuf.ByteString getPoint(); + } + /** + *
+   * IdentityEd25519 holds a Ed25519 public key (Point)
+   * 
+ * + * Protobuf type {@code darc.IdentityEd25519} + */ + public static final class IdentityEd25519 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:darc.IdentityEd25519) + IdentityEd25519OrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentityEd25519.newBuilder() to construct. + private IdentityEd25519(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IdentityEd25519() { + point_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IdentityEd25519(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IdentityEd25519( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + bitField0_ |= 0x00000001; + point_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.class, ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.Builder.class); + } + + private int bitField0_; + public static final int POINT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString point_; + /** + * required bytes point = 1; + * @return Whether the point field is set. + */ + @java.lang.Override + public boolean hasPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * required bytes point = 1; + * @return The point. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPoint() { + return point_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasPoint()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBytes(1, point_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, point_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519)) { + return super.equals(obj); + } + ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 other = (ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519) obj; + + if (hasPoint() != other.hasPoint()) return false; + if (hasPoint()) { + if (!getPoint() + .equals(other.getPoint())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPoint()) { + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + getPoint().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * IdentityEd25519 holds a Ed25519 public key (Point)
+     * 
+ * + * Protobuf type {@code darc.IdentityEd25519} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:darc.IdentityEd25519) + ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_fieldAccessorTable + .ensureFieldAccessorsInitialized( + ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.class, ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.Builder.class); + } + + // Construct using ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + point_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_descriptor; + } + + @java.lang.Override + public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 getDefaultInstanceForType() { + return ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.getDefaultInstance(); + } + + @java.lang.Override + public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 build() { + ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 buildPartial() { + ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 result = new ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + to_bitField0_ |= 0x00000001; + } + result.point_ = point_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519) { + return mergeFrom((ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 other) { + if (other == ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.getDefaultInstance()) return this; + if (other.hasPoint()) { + setPoint(other.getPoint()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + if (!hasPoint()) { + return false; + } + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.ByteString point_ = com.google.protobuf.ByteString.EMPTY; + /** + * required bytes point = 1; + * @return Whether the point field is set. + */ + @java.lang.Override + public boolean hasPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * required bytes point = 1; + * @return The point. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPoint() { + return point_; } /** - *
-       * A claim signed by one of the keys in a DID Doc
-       * 
- * - * optional .darc.IdentityDID did = 6; + * required bytes point = 1; + * @param value The point to set. + * @return This builder for chaining. */ - public ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder getDidOrBuilder() { - if (didBuilder_ != null) { - return didBuilder_.getMessageOrBuilder(); - } else { - return did_ == null ? - ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.getDefaultInstance() : did_; - } + public Builder setPoint(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + point_ = value; + onChanged(); + return this; } /** - *
-       * A claim signed by one of the keys in a DID Doc
-       * 
- * - * optional .darc.IdentityDID did = 6; + * required bytes point = 1; + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - ch.epfl.dedis.lib.proto.DarcProto.IdentityDID, ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.Builder, ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder> - getDidFieldBuilder() { - if (didBuilder_ == null) { - didBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - ch.epfl.dedis.lib.proto.DarcProto.IdentityDID, ch.epfl.dedis.lib.proto.DarcProto.IdentityDID.Builder, ch.epfl.dedis.lib.proto.DarcProto.IdentityDIDOrBuilder>( - getDid(), - getParentForChildren(), - isClean()); - did_ = null; - } - return didBuilder_; + public Builder clearPoint() { + bitField0_ = (bitField0_ & ~0x00000001); + point_ = getDefaultInstance().getPoint(); + onChanged(); + return this; } @java.lang.Override public final Builder setUnknownFields( @@ -4492,86 +5313,86 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:darc.Identity) + // @@protoc_insertion_point(builder_scope:darc.IdentityEd25519) } - // @@protoc_insertion_point(class_scope:darc.Identity) - private static final ch.epfl.dedis.lib.proto.DarcProto.Identity DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:darc.IdentityEd25519) + private static final ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new ch.epfl.dedis.lib.proto.DarcProto.Identity(); + DEFAULT_INSTANCE = new ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519(); } - public static ch.epfl.dedis.lib.proto.DarcProto.Identity getDefaultInstance() { + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 getDefaultInstance() { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Identity parsePartialFrom( + public IdentityEd25519 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Identity(input, extensionRegistry); + return new IdentityEd25519(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public ch.epfl.dedis.lib.proto.DarcProto.Identity getDefaultInstanceForType() { + public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface IdentityEd25519OrBuilder extends - // @@protoc_insertion_point(interface_extends:darc.IdentityEd25519) + public interface IdentityTSMOrBuilder extends + // @@protoc_insertion_point(interface_extends:darc.IdentityTSM) com.google.protobuf.MessageOrBuilder { /** - * required bytes point = 1; - * @return Whether the point field is set. + * required bytes publickey = 1; + * @return Whether the publickey field is set. */ - boolean hasPoint(); + boolean hasPublickey(); /** - * required bytes point = 1; - * @return The point. + * required bytes publickey = 1; + * @return The publickey. */ - com.google.protobuf.ByteString getPoint(); + com.google.protobuf.ByteString getPublickey(); } /** *
-   * IdentityEd25519 holds a Ed25519 public key (Point)
+   * IdentityTSM holds a secp256k1 key (array of bytes)
    * 
* - * Protobuf type {@code darc.IdentityEd25519} + * Protobuf type {@code darc.IdentityTSM} */ - public static final class IdentityEd25519 extends + public static final class IdentityTSM extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:darc.IdentityEd25519) - IdentityEd25519OrBuilder { + // @@protoc_insertion_point(message_implements:darc.IdentityTSM) + IdentityTSMOrBuilder { private static final long serialVersionUID = 0L; - // Use IdentityEd25519.newBuilder() to construct. - private IdentityEd25519(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use IdentityTSM.newBuilder() to construct. + private IdentityTSM(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private IdentityEd25519() { - point_ = com.google.protobuf.ByteString.EMPTY; + private IdentityTSM() { + publickey_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new IdentityEd25519(); + return new IdentityTSM(); } @java.lang.Override @@ -4579,7 +5400,7 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private IdentityEd25519( + private IdentityTSM( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4600,7 +5421,7 @@ private IdentityEd25519( break; case 10: { bitField0_ |= 0x00000001; - point_ = input.readBytes(); + publickey_ = input.readBytes(); break; } default: { @@ -4624,35 +5445,35 @@ private IdentityEd25519( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_descriptor; + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityTSM_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_fieldAccessorTable + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityTSM_fieldAccessorTable .ensureFieldAccessorsInitialized( - ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.class, ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.Builder.class); + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.class, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder.class); } private int bitField0_; - public static final int POINT_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString point_; + public static final int PUBLICKEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString publickey_; /** - * required bytes point = 1; - * @return Whether the point field is set. + * required bytes publickey = 1; + * @return Whether the publickey field is set. */ @java.lang.Override - public boolean hasPoint() { + public boolean hasPublickey() { return ((bitField0_ & 0x00000001) != 0); } /** - * required bytes point = 1; - * @return The point. + * required bytes publickey = 1; + * @return The publickey. */ @java.lang.Override - public com.google.protobuf.ByteString getPoint() { - return point_; + public com.google.protobuf.ByteString getPublickey() { + return publickey_; } private byte memoizedIsInitialized = -1; @@ -4662,7 +5483,7 @@ public final boolean isInitialized() { if (isInitialized == 1) return true; if (isInitialized == 0) return false; - if (!hasPoint()) { + if (!hasPublickey()) { memoizedIsInitialized = 0; return false; } @@ -4674,7 +5495,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeBytes(1, point_); + output.writeBytes(1, publickey_); } unknownFields.writeTo(output); } @@ -4687,7 +5508,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, point_); + .computeBytesSize(1, publickey_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -4699,15 +5520,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519)) { + if (!(obj instanceof ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM)) { return super.equals(obj); } - ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 other = (ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519) obj; + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM other = (ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM) obj; - if (hasPoint() != other.hasPoint()) return false; - if (hasPoint()) { - if (!getPoint() - .equals(other.getPoint())) return false; + if (hasPublickey() != other.hasPublickey()) return false; + if (hasPublickey()) { + if (!getPublickey() + .equals(other.getPublickey())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -4720,78 +5541,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPoint()) { - hash = (37 * hash) + POINT_FIELD_NUMBER; - hash = (53 * hash) + getPoint().hashCode(); + if (hasPublickey()) { + hash = (37 * hash) + PUBLICKEY_FIELD_NUMBER; + hash = (53 * hash) + getPublickey().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom(byte[] data) + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom(java.io.InputStream input) + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseDelimitedFrom(java.io.InputStream input) + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseDelimitedFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4804,7 +5625,7 @@ public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 prototype) { + public static Builder newBuilder(ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -4821,29 +5642,29 @@ protected Builder newBuilderForType( } /** *
-     * IdentityEd25519 holds a Ed25519 public key (Point)
+     * IdentityTSM holds a secp256k1 key (array of bytes)
      * 
* - * Protobuf type {@code darc.IdentityEd25519} + * Protobuf type {@code darc.IdentityTSM} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:darc.IdentityEd25519) - ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519OrBuilder { + // @@protoc_insertion_point(builder_implements:darc.IdentityTSM) + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSMOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_descriptor; + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityTSM_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_fieldAccessorTable + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityTSM_fieldAccessorTable .ensureFieldAccessorsInitialized( - ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.class, ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.Builder.class); + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.class, ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.Builder.class); } - // Construct using ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.newBuilder() + // Construct using ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4861,7 +5682,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - point_ = com.google.protobuf.ByteString.EMPTY; + publickey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -4869,17 +5690,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityEd25519_descriptor; + return ch.epfl.dedis.lib.proto.DarcProto.internal_static_darc_IdentityTSM_descriptor; } @java.lang.Override - public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 getDefaultInstanceForType() { - return ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.getDefaultInstance(); + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM getDefaultInstanceForType() { + return ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.getDefaultInstance(); } @java.lang.Override - public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 build() { - ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 result = buildPartial(); + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM build() { + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -4887,14 +5708,14 @@ public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 build() { } @java.lang.Override - public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 buildPartial() { - ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 result = new ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519(this); + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM buildPartial() { + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM result = new ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } - result.point_ = point_; + result.publickey_ = publickey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4934,18 +5755,18 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519) { - return mergeFrom((ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519)other); + if (other instanceof ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM) { + return mergeFrom((ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 other) { - if (other == ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519.getDefaultInstance()) return this; - if (other.hasPoint()) { - setPoint(other.getPoint()); + public Builder mergeFrom(ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM other) { + if (other == ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM.getDefaultInstance()) return this; + if (other.hasPublickey()) { + setPublickey(other.getPublickey()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -4954,7 +5775,7 @@ public Builder mergeFrom(ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 other @java.lang.Override public final boolean isInitialized() { - if (!hasPoint()) { + if (!hasPublickey()) { return false; } return true; @@ -4965,11 +5786,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 parsedMessage = null; + ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519) e.getUnfinishedMessage(); + parsedMessage = (ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -4980,44 +5801,44 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.ByteString point_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString publickey_ = com.google.protobuf.ByteString.EMPTY; /** - * required bytes point = 1; - * @return Whether the point field is set. + * required bytes publickey = 1; + * @return Whether the publickey field is set. */ @java.lang.Override - public boolean hasPoint() { + public boolean hasPublickey() { return ((bitField0_ & 0x00000001) != 0); } /** - * required bytes point = 1; - * @return The point. + * required bytes publickey = 1; + * @return The publickey. */ @java.lang.Override - public com.google.protobuf.ByteString getPoint() { - return point_; + public com.google.protobuf.ByteString getPublickey() { + return publickey_; } /** - * required bytes point = 1; - * @param value The point to set. + * required bytes publickey = 1; + * @param value The publickey to set. * @return This builder for chaining. */ - public Builder setPoint(com.google.protobuf.ByteString value) { + public Builder setPublickey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - point_ = value; + publickey_ = value; onChanged(); return this; } /** - * required bytes point = 1; + * required bytes publickey = 1; * @return This builder for chaining. */ - public Builder clearPoint() { + public Builder clearPublickey() { bitField0_ = (bitField0_ & ~0x00000001); - point_ = getDefaultInstance().getPoint(); + publickey_ = getDefaultInstance().getPublickey(); onChanged(); return this; } @@ -5034,41 +5855,41 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:darc.IdentityEd25519) + // @@protoc_insertion_point(builder_scope:darc.IdentityTSM) } - // @@protoc_insertion_point(class_scope:darc.IdentityEd25519) - private static final ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:darc.IdentityTSM) + private static final ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519(); + DEFAULT_INSTANCE = new ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM(); } - public static ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 getDefaultInstance() { + public static ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM getDefaultInstance() { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public IdentityEd25519 parsePartialFrom( + public IdentityTSM parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IdentityEd25519(input, extensionRegistry); + return new IdentityTSM(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public ch.epfl.dedis.lib.proto.DarcProto.IdentityEd25519 getDefaultInstanceForType() { + public ch.epfl.dedis.lib.proto.DarcProto.IdentityTSM getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -22505,6 +23326,11 @@ public ch.epfl.dedis.lib.proto.DarcProto.Rule getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_darc_IdentityEd25519_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_darc_IdentityTSM_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_darc_IdentityTSM_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_darc_IdentityX509EC_descriptor; private static final @@ -22614,47 +23440,49 @@ public ch.epfl.dedis.lib.proto.DarcProto.Rule getDefaultInstanceForType() { "\014\022\016\n\006previd\030\004 \002(\014\022\032\n\005rules\030\005 \002(\0132\013.darc." + "Rules\022#\n\nsignatures\030\006 \003(\0132\017.darc.Signatu" + "re\022%\n\021verificationdarcs\030\007 \003(\0132\n.darc.Dar" + - "c\"\356\001\n\010Identity\022 \n\004darc\030\001 \001(\0132\022.darc.Iden" + + "c\"\216\002\n\010Identity\022 \n\004darc\030\001 \001(\0132\022.darc.Iden" + "tityDarc\022&\n\007ed25519\030\002 \001(\0132\025.darc.Identit" + "yEd25519\022$\n\006x509ec\030\003 \001(\0132\024.darc.Identity" + "X509EC\022\"\n\005proxy\030\004 \001(\0132\023.darc.IdentityPro" + "xy\022.\n\013evmcontract\030\005 \001(\0132\031.darc.IdentityE" + "vmContract\022\036\n\003did\030\006 \001(\0132\021.darc.IdentityD" + - "ID\" \n\017IdentityEd25519\022\r\n\005point\030\001 \002(\014\" \n\016" + - "IdentityX509EC\022\016\n\006public\030\001 \002(\014\"-\n\rIdenti" + - "tyProxy\022\014\n\004data\030\001 \002(\t\022\016\n\006public\030\002 \002(\014\"\032\n" + - "\014IdentityDarc\022\n\n\002id\030\001 \002(\014\"&\n\023IdentityEvm" + - "Contract\022\017\n\007address\030\001 \002(\014\"H\n\013IdentityDID" + - "\022\013\n\003did\030\001 \002(\t\022\034\n\006diddoc\030\002 \001(\0132\014.darc.DID" + - "Doc\022\016\n\006method\030\003 \002(\t\"\236\001\n\006DIDDoc\022\017\n\007contex" + - "t\030\001 \003(\t\022\n\n\002id\030\002 \002(\t\022\"\n\tpublickey\030\003 \003(\0132\017" + - ".darc.PublicKey\022!\n\007service\030\004 \003(\0132\020.darc." + - "DIDService\0220\n\016authentication\030\005 \003(\0132\030.dar" + - "c.VerificationMethod\"H\n\tPublicKey\022\n\n\002id\030" + - "\001 \002(\t\022\014\n\004type\030\002 \002(\t\022\022\n\ncontroller\030\003 \002(\t\022" + - "\r\n\005value\030\004 \002(\014\"}\n\nDIDService\022\n\n\002id\030\001 \002(\t" + - "\022\014\n\004type\030\002 \002(\t\022\020\n\010priority\030\003 \002(\021\022\025\n\rreci" + - "pientkeys\030\004 \003(\t\022\023\n\013routingkeys\030\005 \003(\t\022\027\n\017" + - "serviceendpoint\030\006 \002(\t\"8\n\022VerificationMet" + - "hod\022\"\n\tpublickey\030\001 \002(\0132\017.darc.PublicKey\"" + - ">\n\tSignature\022\021\n\tsignature\030\001 \002(\014\022\036\n\006signe" + - "r\030\002 \002(\0132\016.darc.Identity\"\300\001\n\006Signer\022$\n\007ed" + - "25519\030\001 \001(\0132\023.darc.SignerEd25519\022\"\n\006x509" + - "ec\030\002 \001(\0132\022.darc.SignerX509EC\022 \n\005proxy\030\003 " + - "\001(\0132\021.darc.SignerProxy\022,\n\013evmcontract\030\004 " + - "\001(\0132\027.darc.SignerEvmContract\022\034\n\003did\030\005 \001(" + - "\0132\017.darc.SignerDID\".\n\rSignerEd25519\022\r\n\005p" + - "oint\030\001 \002(\014\022\016\n\006secret\030\002 \002(\014\"\035\n\014SignerX509" + - "EC\022\r\n\005point\030\001 \002(\014\"+\n\013SignerProxy\022\014\n\004data" + - "\030\001 \002(\t\022\016\n\006public\030\002 \002(\014\"$\n\021SignerEvmContr" + - "act\022\017\n\007address\030\001 \002(\014\"8\n\tSignerDID\022\016\n\006pub" + - "lic\030\001 \002(\014\022\016\n\006secret\030\002 \002(\014\022\013\n\003did\030\003 \002(\t\"n" + - "\n\007Request\022\016\n\006baseid\030\001 \002(\014\022\016\n\006action\030\002 \002(" + - "\t\022\013\n\003msg\030\003 \002(\014\022\"\n\nidentities\030\004 \003(\0132\016.dar" + - "c.Identity\022\022\n\nsignatures\030\005 \003(\014\"!\n\005Rules\022" + - "\030\n\004list\030\001 \003(\0132\n.darc.Rule\"$\n\004Rule\022\016\n\006act" + - "ion\030\001 \002(\t\022\014\n\004expr\030\002 \002(\014B$\n\027ch.epfl.dedis" + - ".lib.protoB\tDarcProto" + "ID\022\036\n\003tsm\030\007 \001(\0132\021.darc.IdentityTSM\" \n\017Id" + + "entityEd25519\022\r\n\005point\030\001 \002(\014\" \n\013Identity" + + "TSM\022\021\n\tpublickey\030\001 \002(\014\" \n\016IdentityX509EC" + + "\022\016\n\006public\030\001 \002(\014\"-\n\rIdentityProxy\022\014\n\004dat" + + "a\030\001 \002(\t\022\016\n\006public\030\002 \002(\014\"\032\n\014IdentityDarc\022" + + "\n\n\002id\030\001 \002(\014\"&\n\023IdentityEvmContract\022\017\n\007ad" + + "dress\030\001 \002(\014\"H\n\013IdentityDID\022\013\n\003did\030\001 \002(\t\022" + + "\034\n\006diddoc\030\002 \001(\0132\014.darc.DIDDoc\022\016\n\006method\030" + + "\003 \002(\t\"\236\001\n\006DIDDoc\022\017\n\007context\030\001 \003(\t\022\n\n\002id\030" + + "\002 \002(\t\022\"\n\tpublickey\030\003 \003(\0132\017.darc.PublicKe" + + "y\022!\n\007service\030\004 \003(\0132\020.darc.DIDService\0220\n\016" + + "authentication\030\005 \003(\0132\030.darc.Verification" + + "Method\"H\n\tPublicKey\022\n\n\002id\030\001 \002(\t\022\014\n\004type\030" + + "\002 \002(\t\022\022\n\ncontroller\030\003 \002(\t\022\r\n\005value\030\004 \002(\014" + + "\"}\n\nDIDService\022\n\n\002id\030\001 \002(\t\022\014\n\004type\030\002 \002(\t" + + "\022\020\n\010priority\030\003 \002(\021\022\025\n\rrecipientkeys\030\004 \003(" + + "\t\022\023\n\013routingkeys\030\005 \003(\t\022\027\n\017serviceendpoin" + + "t\030\006 \002(\t\"8\n\022VerificationMethod\022\"\n\tpublick" + + "ey\030\001 \002(\0132\017.darc.PublicKey\">\n\tSignature\022\021" + + "\n\tsignature\030\001 \002(\014\022\036\n\006signer\030\002 \002(\0132\016.darc" + + ".Identity\"\300\001\n\006Signer\022$\n\007ed25519\030\001 \001(\0132\023." + + "darc.SignerEd25519\022\"\n\006x509ec\030\002 \001(\0132\022.dar" + + "c.SignerX509EC\022 \n\005proxy\030\003 \001(\0132\021.darc.Sig" + + "nerProxy\022,\n\013evmcontract\030\004 \001(\0132\027.darc.Sig" + + "nerEvmContract\022\034\n\003did\030\005 \001(\0132\017.darc.Signe" + + "rDID\".\n\rSignerEd25519\022\r\n\005point\030\001 \002(\014\022\016\n\006" + + "secret\030\002 \002(\014\"\035\n\014SignerX509EC\022\r\n\005point\030\001 " + + "\002(\014\"+\n\013SignerProxy\022\014\n\004data\030\001 \002(\t\022\016\n\006publ" + + "ic\030\002 \002(\014\"$\n\021SignerEvmContract\022\017\n\007address" + + "\030\001 \002(\014\"8\n\tSignerDID\022\016\n\006public\030\001 \002(\014\022\016\n\006s" + + "ecret\030\002 \002(\014\022\013\n\003did\030\003 \002(\t\"n\n\007Request\022\016\n\006b" + + "aseid\030\001 \002(\014\022\016\n\006action\030\002 \002(\t\022\013\n\003msg\030\003 \002(\014" + + "\022\"\n\nidentities\030\004 \003(\0132\016.darc.Identity\022\022\n\n" + + "signatures\030\005 \003(\014\"!\n\005Rules\022\030\n\004list\030\001 \003(\0132" + + "\n.darc.Rule\"$\n\004Rule\022\016\n\006action\030\001 \002(\t\022\014\n\004e" + + "xpr\030\002 \002(\014B$\n\027ch.epfl.dedis.lib.protoB\tDa" + + "rcProto" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -22671,123 +23499,129 @@ public ch.epfl.dedis.lib.proto.DarcProto.Rule getDefaultInstanceForType() { internal_static_darc_Identity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_Identity_descriptor, - new java.lang.String[] { "Darc", "Ed25519", "X509Ec", "Proxy", "Evmcontract", "Did", }); + new java.lang.String[] { "Darc", "Ed25519", "X509Ec", "Proxy", "Evmcontract", "Did", "Tsm", }); internal_static_darc_IdentityEd25519_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_darc_IdentityEd25519_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_IdentityEd25519_descriptor, new java.lang.String[] { "Point", }); - internal_static_darc_IdentityX509EC_descriptor = + internal_static_darc_IdentityTSM_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_darc_IdentityTSM_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_darc_IdentityTSM_descriptor, + new java.lang.String[] { "Publickey", }); + internal_static_darc_IdentityX509EC_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_darc_IdentityX509EC_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_IdentityX509EC_descriptor, new java.lang.String[] { "Public", }); internal_static_darc_IdentityProxy_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_darc_IdentityProxy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_IdentityProxy_descriptor, new java.lang.String[] { "Data", "Public", }); internal_static_darc_IdentityDarc_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_darc_IdentityDarc_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_IdentityDarc_descriptor, new java.lang.String[] { "Id", }); internal_static_darc_IdentityEvmContract_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_darc_IdentityEvmContract_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_IdentityEvmContract_descriptor, new java.lang.String[] { "Address", }); internal_static_darc_IdentityDID_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_darc_IdentityDID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_IdentityDID_descriptor, new java.lang.String[] { "Did", "Diddoc", "Method", }); internal_static_darc_DIDDoc_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_darc_DIDDoc_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_DIDDoc_descriptor, new java.lang.String[] { "Context", "Id", "Publickey", "Service", "Authentication", }); internal_static_darc_PublicKey_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_darc_PublicKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_PublicKey_descriptor, new java.lang.String[] { "Id", "Type", "Controller", "Value", }); internal_static_darc_DIDService_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_darc_DIDService_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_DIDService_descriptor, new java.lang.String[] { "Id", "Type", "Priority", "Recipientkeys", "Routingkeys", "Serviceendpoint", }); internal_static_darc_VerificationMethod_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_darc_VerificationMethod_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_VerificationMethod_descriptor, new java.lang.String[] { "Publickey", }); internal_static_darc_Signature_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_darc_Signature_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_Signature_descriptor, new java.lang.String[] { "Signature", "Signer", }); internal_static_darc_Signer_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_darc_Signer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_Signer_descriptor, new java.lang.String[] { "Ed25519", "X509Ec", "Proxy", "Evmcontract", "Did", }); internal_static_darc_SignerEd25519_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_darc_SignerEd25519_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_SignerEd25519_descriptor, new java.lang.String[] { "Point", "Secret", }); internal_static_darc_SignerX509EC_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_darc_SignerX509EC_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_SignerX509EC_descriptor, new java.lang.String[] { "Point", }); internal_static_darc_SignerProxy_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_darc_SignerProxy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_SignerProxy_descriptor, new java.lang.String[] { "Data", "Public", }); internal_static_darc_SignerEvmContract_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_darc_SignerEvmContract_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_SignerEvmContract_descriptor, new java.lang.String[] { "Address", }); internal_static_darc_SignerDID_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_darc_SignerDID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_SignerDID_descriptor, new java.lang.String[] { "Public", "Secret", "Did", }); internal_static_darc_Request_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_darc_Request_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_Request_descriptor, new java.lang.String[] { "Baseid", "Action", "Msg", "Identities", "Signatures", }); internal_static_darc_Rules_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_darc_Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_Rules_descriptor, new java.lang.String[] { "List", }); internal_static_darc_Rule_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_darc_Rule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_darc_Rule_descriptor, diff --git a/external/js/cothority/src/protobuf/models.json b/external/js/cothority/src/protobuf/models.json index 8048d0f5d1..8ded5cc2f2 100644 --- a/external/js/cothority/src/protobuf/models.json +++ b/external/js/cothority/src/protobuf/models.json @@ -1 +1 @@ -{"nested":{"cothority":{},"authprox":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"AuthProxProto"},"nested":{"EnrollRequest":{"fields":{"type":{"rule":"required","type":"string","id":1},"issuer":{"rule":"required","type":"string","id":2},"participants":{"rule":"repeated","type":"bytes","id":3},"longpri":{"rule":"required","type":"PriShare","id":4},"longpubs":{"rule":"repeated","type":"bytes","id":5}}},"EnrollResponse":{"fields":{}},"SignatureRequest":{"fields":{"type":{"rule":"required","type":"string","id":1},"issuer":{"rule":"required","type":"string","id":2},"authinfo":{"rule":"required","type":"bytes","id":3},"randpri":{"rule":"required","type":"PriShare","id":4},"randpubs":{"rule":"repeated","type":"bytes","id":5},"message":{"rule":"required","type":"bytes","id":6}}},"PriShare":{"fields":{}},"PartialSig":{"fields":{"partial":{"rule":"required","type":"PriShare","id":1},"sessionid":{"rule":"required","type":"bytes","id":2},"signature":{"rule":"required","type":"bytes","id":3}}},"SignatureResponse":{"fields":{"partialsignature":{"rule":"required","type":"PartialSig","id":1}}},"EnrollmentsRequest":{"fields":{"types":{"rule":"repeated","type":"string","id":1},"issuers":{"rule":"repeated","type":"string","id":2}}},"EnrollmentsResponse":{"fields":{"enrollments":{"rule":"repeated","type":"EnrollmentInfo","id":1,"options":{"packed":false}}}},"EnrollmentInfo":{"fields":{"type":{"rule":"required","type":"string","id":1},"issuer":{"rule":"required","type":"string","id":2},"public":{"rule":"required","type":"bytes","id":3}}}}},"bevm":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"BEvmProto"},"nested":{"ViewCallRequest":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"bevminstanceid":{"rule":"required","type":"bytes","id":2},"accountaddress":{"rule":"required","type":"bytes","id":3},"contractaddress":{"rule":"required","type":"bytes","id":4},"calldata":{"rule":"required","type":"bytes","id":5},"minblockindex":{"rule":"required","type":"sint32","id":6}}},"ViewCallResponse":{"fields":{"result":{"rule":"required","type":"bytes","id":1}}}}},"byzcoin":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"ByzCoinProto"},"nested":{"GetAllByzCoinIDsRequest":{"fields":{}},"GetAllByzCoinIDsResponse":{"fields":{"ids":{"rule":"repeated","type":"bytes","id":1}}},"DataHeader":{"fields":{"trieroot":{"rule":"required","type":"bytes","id":1},"clienttransactionhash":{"rule":"required","type":"bytes","id":2},"statechangeshash":{"rule":"required","type":"bytes","id":3},"timestamp":{"rule":"required","type":"sint64","id":4},"version":{"type":"sint32","id":5}}},"DataBody":{"fields":{"txresults":{"rule":"repeated","type":"TxResult","id":1,"options":{"packed":false}}}},"CreateGenesisBlock":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"roster":{"rule":"required","type":"onet.Roster","id":2},"genesisdarc":{"rule":"required","type":"darc.Darc","id":3},"blockinterval":{"rule":"required","type":"sint64","id":4},"maxblocksize":{"type":"sint32","id":5},"darccontractids":{"rule":"repeated","type":"string","id":6}}},"CreateGenesisBlockResponse":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"skipblock":{"type":"skipchain.SkipBlock","id":2}}},"AddTxRequest":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"skipchainid":{"rule":"required","type":"bytes","id":2},"transaction":{"rule":"required","type":"ClientTransaction","id":3},"inclusionwait":{"type":"sint32","id":4},"prooffrom":{"type":"bytes","id":5},"flags":{"type":"sint32","id":6}}},"AddTxResponse":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"error":{"type":"string","id":2},"proof":{"type":"Proof","id":3}}},"GetProof":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"key":{"rule":"required","type":"bytes","id":2},"id":{"rule":"required","type":"bytes","id":3},"mustcontainblock":{"type":"bytes","id":4}}},"GetProofResponse":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"proof":{"rule":"required","type":"Proof","id":2}}},"CheckAuthorization":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"byzcoinid":{"rule":"required","type":"bytes","id":2},"darcid":{"rule":"required","type":"bytes","id":3},"identities":{"rule":"repeated","type":"darc.Identity","id":4,"options":{"packed":false}}}},"CheckAuthorizationResponse":{"fields":{"actions":{"rule":"repeated","type":"string","id":1}}},"ChainConfig":{"fields":{"blockinterval":{"rule":"required","type":"sint64","id":1},"roster":{"rule":"required","type":"onet.Roster","id":2},"maxblocksize":{"rule":"required","type":"sint32","id":3},"darccontractids":{"rule":"repeated","type":"string","id":4}}},"Proof":{"fields":{"inclusionproof":{"rule":"required","type":"trie.Proof","id":1},"latest":{"rule":"required","type":"skipchain.SkipBlock","id":2},"links":{"rule":"repeated","type":"skipchain.ForwardLink","id":3,"options":{"packed":false}}}},"Instruction":{"fields":{"instanceid":{"rule":"required","type":"bytes","id":1},"spawn":{"type":"Spawn","id":2},"invoke":{"type":"Invoke","id":3},"delete":{"type":"Delete","id":4},"signercounter":{"rule":"repeated","type":"uint64","id":5,"options":{"packed":true}},"signeridentities":{"rule":"repeated","type":"darc.Identity","id":6,"options":{"packed":false}},"signatures":{"rule":"repeated","type":"bytes","id":7}}},"Spawn":{"fields":{"contractid":{"rule":"required","type":"string","id":1},"args":{"rule":"repeated","type":"Argument","id":2,"options":{"packed":false}}}},"Invoke":{"fields":{"contractid":{"rule":"required","type":"string","id":1},"command":{"rule":"required","type":"string","id":2},"args":{"rule":"repeated","type":"Argument","id":3,"options":{"packed":false}}}},"Delete":{"fields":{"contractid":{"rule":"required","type":"string","id":1},"args":{"rule":"repeated","type":"Argument","id":2,"options":{"packed":false}}}},"Argument":{"fields":{"name":{"rule":"required","type":"string","id":1},"value":{"rule":"required","type":"bytes","id":2}}},"ClientTransaction":{"fields":{"instructions":{"rule":"repeated","type":"Instruction","id":1,"options":{"packed":false}}}},"TxResult":{"fields":{"clienttransaction":{"rule":"required","type":"ClientTransaction","id":1},"accepted":{"rule":"required","type":"bool","id":2}}},"StateChange":{"fields":{"stateaction":{"rule":"required","type":"sint32","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"contractid":{"rule":"required","type":"string","id":3},"value":{"rule":"required","type":"bytes","id":4},"darcid":{"rule":"required","type":"bytes","id":5},"version":{"rule":"required","type":"uint64","id":6}}},"Coin":{"fields":{"name":{"rule":"required","type":"bytes","id":1},"value":{"rule":"required","type":"uint64","id":2}}},"StreamingRequest":{"fields":{"id":{"rule":"required","type":"bytes","id":1}}},"StreamingResponse":{"fields":{"block":{"type":"skipchain.SkipBlock","id":1}}},"PaginateRequest":{"fields":{"startid":{"rule":"required","type":"bytes","id":1},"pagesize":{"rule":"required","type":"uint64","id":2},"numpages":{"rule":"required","type":"uint64","id":3},"backward":{"rule":"required","type":"bool","id":4}}},"PaginateResponse":{"fields":{"blocks":{"rule":"repeated","type":"skipchain.SkipBlock","id":1,"options":{"packed":false}},"pagenumber":{"rule":"required","type":"uint64","id":2},"backward":{"rule":"required","type":"bool","id":3},"errorcode":{"rule":"required","type":"uint64","id":4},"errortext":{"rule":"repeated","type":"string","id":5}}},"DownloadState":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"nonce":{"rule":"required","type":"uint64","id":2},"length":{"rule":"required","type":"sint32","id":3}}},"DownloadStateResponse":{"fields":{"keyvalues":{"rule":"repeated","type":"DBKeyValue","id":1,"options":{"packed":false}},"nonce":{"rule":"required","type":"uint64","id":2},"total":{"type":"sint32","id":3}}},"DBKeyValue":{"fields":{"key":{"rule":"required","type":"bytes","id":1},"value":{"rule":"required","type":"bytes","id":2}}},"StateChangeBody":{"fields":{"stateaction":{"rule":"required","type":"sint32","id":1},"contractid":{"rule":"required","type":"string","id":2},"value":{"rule":"required","type":"bytes","id":3},"version":{"rule":"required","type":"uint64","id":4},"darcid":{"rule":"required","type":"bytes","id":5}}},"GetSignerCounters":{"fields":{"signerids":{"rule":"repeated","type":"string","id":1},"skipchainid":{"rule":"required","type":"bytes","id":2}}},"GetSignerCountersResponse":{"fields":{"counters":{"rule":"repeated","type":"uint64","id":1,"options":{"packed":true}},"index":{"type":"uint64","id":2}}},"GetInstanceVersion":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"version":{"rule":"required","type":"uint64","id":3}}},"GetLastInstanceVersion":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2}}},"GetInstanceVersionResponse":{"fields":{"statechange":{"rule":"required","type":"StateChange","id":1},"blockindex":{"rule":"required","type":"sint32","id":2}}},"GetAllInstanceVersion":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2}}},"GetAllInstanceVersionResponse":{"fields":{"statechanges":{"rule":"repeated","type":"GetInstanceVersionResponse","id":1,"options":{"packed":false}}}},"CheckStateChangeValidity":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"version":{"rule":"required","type":"uint64","id":3}}},"CheckStateChangeValidityResponse":{"fields":{"statechanges":{"rule":"repeated","type":"StateChange","id":1,"options":{"packed":false}},"blockid":{"rule":"required","type":"bytes","id":2}}},"ResolveInstanceID":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"darcid":{"rule":"required","type":"bytes","id":2},"name":{"rule":"required","type":"string","id":3}}},"ResolvedInstanceID":{"fields":{"instanceid":{"rule":"required","type":"bytes","id":1}}},"DebugRequest":{"fields":{"byzcoinid":{"type":"bytes","id":1}}},"DebugResponse":{"fields":{"byzcoins":{"rule":"repeated","type":"DebugResponseByzcoin","id":1,"options":{"packed":false}},"dump":{"rule":"repeated","type":"DebugResponseState","id":2,"options":{"packed":false}}}},"DebugResponseByzcoin":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"genesis":{"type":"skipchain.SkipBlock","id":2},"latest":{"type":"skipchain.SkipBlock","id":3}}},"DebugResponseState":{"fields":{"key":{"rule":"required","type":"bytes","id":1},"state":{"rule":"required","type":"StateChangeBody","id":2}}},"DebugRemoveRequest":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"signature":{"rule":"required","type":"bytes","id":2}}},"IDVersion":{"fields":{"id":{"rule":"required","type":"bytes","id":1},"version":{"rule":"required","type":"uint64","id":2}}},"GetUpdatesRequest":{"fields":{"instances":{"rule":"repeated","type":"IDVersion","id":1,"options":{"packed":false}},"flags":{"rule":"required","type":"uint64","id":2},"latestblockid":{"type":"bytes","id":3},"skipchainid":{"type":"bytes","id":4}}},"GetUpdatesReply":{"fields":{"proofs":{"rule":"repeated","type":"trie.Proof","id":1,"options":{"packed":false}},"links":{"rule":"repeated","type":"skipchain.ForwardLink","id":2,"options":{"packed":false}},"latest":{"type":"skipchain.SkipBlock","id":3}}}}},"skipchain":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"SkipchainProto"},"nested":{"StoreSkipBlock":{"fields":{"targetSkipChainID":{"rule":"required","type":"bytes","id":1},"newBlock":{"rule":"required","type":"SkipBlock","id":2},"signature":{"type":"bytes","id":3}}},"StoreSkipBlockReply":{"fields":{"previous":{"type":"SkipBlock","id":1},"latest":{"rule":"required","type":"SkipBlock","id":2}}},"GetAllSkipChainIDs":{"fields":{}},"GetAllSkipChainIDsReply":{"fields":{"skipChainIDs":{"rule":"repeated","type":"bytes","id":1}}},"GetSingleBlock":{"fields":{"id":{"rule":"required","type":"bytes","id":1}}},"GetSingleBlockByIndex":{"fields":{"genesis":{"rule":"required","type":"bytes","id":1},"index":{"rule":"required","type":"sint32","id":2}}},"GetSingleBlockByIndexReply":{"fields":{"skipblock":{"rule":"required","type":"SkipBlock","id":1},"links":{"rule":"repeated","type":"ForwardLink","id":2,"options":{"packed":false}}}},"GetUpdateChain":{"fields":{"latestID":{"rule":"required","type":"bytes","id":1}}},"GetUpdateChainReply":{"fields":{"update":{"rule":"repeated","type":"SkipBlock","id":1,"options":{"packed":false}}}},"SkipBlock":{"fields":{"index":{"rule":"required","type":"sint32","id":1},"height":{"rule":"required","type":"sint32","id":2},"maxHeight":{"rule":"required","type":"sint32","id":3},"baseHeight":{"rule":"required","type":"sint32","id":4},"backlinks":{"rule":"repeated","type":"bytes","id":5},"verifiers":{"rule":"repeated","type":"bytes","id":6},"genesis":{"rule":"required","type":"bytes","id":7},"data":{"rule":"required","type":"bytes","id":8},"roster":{"rule":"required","type":"onet.Roster","id":9},"hash":{"rule":"required","type":"bytes","id":10},"forward":{"rule":"repeated","type":"ForwardLink","id":11,"options":{"packed":false}},"payload":{"type":"bytes","id":12},"signatureScheme":{"type":"uint32","id":13}}},"ForwardLink":{"fields":{"from":{"rule":"required","type":"bytes","id":1},"to":{"rule":"required","type":"bytes","id":2},"newRoster":{"type":"onet.Roster","id":3},"signature":{"rule":"required","type":"ByzcoinSig","id":4}}},"ByzcoinSig":{"fields":{"msg":{"rule":"required","type":"bytes","id":1},"sig":{"rule":"required","type":"bytes","id":2}}},"SchnorrSig":{"fields":{"challenge":{"rule":"required","type":"bytes","id":1},"response":{"rule":"required","type":"bytes","id":2}}},"Exception":{"fields":{"index":{"rule":"required","type":"sint32","id":1},"commitment":{"rule":"required","type":"bytes","id":2}}}}},"onet":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"OnetProto"},"nested":{"Roster":{"fields":{"id":{"type":"bytes","id":1},"list":{"rule":"repeated","type":"network.ServerIdentity","id":2,"options":{"packed":false}},"aggregate":{"rule":"required","type":"bytes","id":3}}},"Status":{"fields":{"field":{"keyType":"string","type":"string","id":1}}}}},"network":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"NetworkProto"},"nested":{"ServerIdentity":{"fields":{"public":{"rule":"required","type":"bytes","id":1},"serviceIdentities":{"rule":"repeated","type":"ServiceIdentity","id":2,"options":{"packed":false}},"id":{"rule":"required","type":"bytes","id":3},"address":{"rule":"required","type":"string","id":4},"description":{"rule":"required","type":"string","id":5},"url":{"type":"string","id":7}}},"ServiceIdentity":{"fields":{"name":{"rule":"required","type":"string","id":1},"suite":{"rule":"required","type":"string","id":2},"public":{"rule":"required","type":"bytes","id":3}}}}},"darc":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"DarcProto"},"nested":{"Darc":{"fields":{"version":{"rule":"required","type":"uint64","id":1},"description":{"rule":"required","type":"bytes","id":2},"baseid":{"type":"bytes","id":3},"previd":{"rule":"required","type":"bytes","id":4},"rules":{"rule":"required","type":"Rules","id":5},"signatures":{"rule":"repeated","type":"Signature","id":6,"options":{"packed":false}},"verificationdarcs":{"rule":"repeated","type":"Darc","id":7,"options":{"packed":false}}}},"Identity":{"fields":{"darc":{"type":"IdentityDarc","id":1},"ed25519":{"type":"IdentityEd25519","id":2},"x509ec":{"type":"IdentityX509EC","id":3},"proxy":{"type":"IdentityProxy","id":4},"evmcontract":{"type":"IdentityEvmContract","id":5},"did":{"type":"IdentityDID","id":6}}},"IdentityEd25519":{"fields":{"point":{"rule":"required","type":"bytes","id":1}}},"IdentityX509EC":{"fields":{"public":{"rule":"required","type":"bytes","id":1}}},"IdentityProxy":{"fields":{"data":{"rule":"required","type":"string","id":1},"public":{"rule":"required","type":"bytes","id":2}}},"IdentityDarc":{"fields":{"id":{"rule":"required","type":"bytes","id":1}}},"IdentityEvmContract":{"fields":{"address":{"rule":"required","type":"bytes","id":1}}},"IdentityDID":{"fields":{"did":{"rule":"required","type":"string","id":1},"diddoc":{"type":"DIDDoc","id":2},"method":{"rule":"required","type":"string","id":3}}},"DIDDoc":{"fields":{"context":{"rule":"repeated","type":"string","id":1},"id":{"rule":"required","type":"string","id":2},"publickey":{"rule":"repeated","type":"PublicKey","id":3,"options":{"packed":false}},"service":{"rule":"repeated","type":"DIDService","id":4,"options":{"packed":false}},"authentication":{"rule":"repeated","type":"VerificationMethod","id":5,"options":{"packed":false}}}},"PublicKey":{"fields":{"id":{"rule":"required","type":"string","id":1},"type":{"rule":"required","type":"string","id":2},"controller":{"rule":"required","type":"string","id":3},"value":{"rule":"required","type":"bytes","id":4}}},"DIDService":{"fields":{"id":{"rule":"required","type":"string","id":1},"type":{"rule":"required","type":"string","id":2},"priority":{"rule":"required","type":"sint32","id":3},"recipientkeys":{"rule":"repeated","type":"string","id":4},"routingkeys":{"rule":"repeated","type":"string","id":5},"serviceendpoint":{"rule":"required","type":"string","id":6}}},"VerificationMethod":{"fields":{"publickey":{"rule":"required","type":"PublicKey","id":1}}},"Signature":{"fields":{"signature":{"rule":"required","type":"bytes","id":1},"signer":{"rule":"required","type":"Identity","id":2}}},"Signer":{"fields":{"ed25519":{"type":"SignerEd25519","id":1},"x509ec":{"type":"SignerX509EC","id":2},"proxy":{"type":"SignerProxy","id":3},"evmcontract":{"type":"SignerEvmContract","id":4},"did":{"type":"SignerDID","id":5}}},"SignerEd25519":{"fields":{"point":{"rule":"required","type":"bytes","id":1},"secret":{"rule":"required","type":"bytes","id":2}}},"SignerX509EC":{"fields":{"point":{"rule":"required","type":"bytes","id":1}}},"SignerProxy":{"fields":{"data":{"rule":"required","type":"string","id":1},"public":{"rule":"required","type":"bytes","id":2}}},"SignerEvmContract":{"fields":{"address":{"rule":"required","type":"bytes","id":1}}},"SignerDID":{"fields":{"public":{"rule":"required","type":"bytes","id":1},"secret":{"rule":"required","type":"bytes","id":2},"did":{"rule":"required","type":"string","id":3}}},"Request":{"fields":{"baseid":{"rule":"required","type":"bytes","id":1},"action":{"rule":"required","type":"string","id":2},"msg":{"rule":"required","type":"bytes","id":3},"identities":{"rule":"repeated","type":"Identity","id":4,"options":{"packed":false}},"signatures":{"rule":"repeated","type":"bytes","id":5}}},"Rules":{"fields":{"list":{"rule":"repeated","type":"Rule","id":1,"options":{"packed":false}}}},"Rule":{"fields":{"action":{"rule":"required","type":"string","id":1},"expr":{"rule":"required","type":"bytes","id":2}}}}},"trie":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"TrieProto"},"nested":{"InteriorNode":{"fields":{"left":{"rule":"required","type":"bytes","id":1},"right":{"rule":"required","type":"bytes","id":2}}},"EmptyNode":{"fields":{"prefix":{"rule":"repeated","type":"bool","id":1,"options":{"packed":true}}}},"LeafNode":{"fields":{"prefix":{"rule":"repeated","type":"bool","id":1,"options":{"packed":true}},"key":{"rule":"required","type":"bytes","id":2},"value":{"rule":"required","type":"bytes","id":3}}},"Proof":{"fields":{"interiors":{"rule":"repeated","type":"InteriorNode","id":1,"options":{"packed":false}},"leaf":{"rule":"required","type":"LeafNode","id":2},"empty":{"rule":"required","type":"EmptyNode","id":3},"nonce":{"rule":"required","type":"bytes","id":4}}}}},"calypso":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"Calypso"},"nested":{"Write":{"fields":{"data":{"rule":"required","type":"bytes","id":1},"u":{"rule":"required","type":"bytes","id":2},"ubar":{"rule":"required","type":"bytes","id":3},"e":{"rule":"required","type":"bytes","id":4},"f":{"rule":"required","type":"bytes","id":5},"c":{"rule":"required","type":"bytes","id":6},"extradata":{"type":"bytes","id":7},"ltsid":{"rule":"required","type":"bytes","id":8},"cost":{"type":"byzcoin.Coin","id":9}}},"Read":{"fields":{"write":{"rule":"required","type":"bytes","id":1},"xc":{"rule":"required","type":"bytes","id":2}}},"Authorise":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1}}},"AuthoriseReply":{"fields":{}},"Authorize":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"timestamp":{"type":"sint64","id":2},"signature":{"type":"bytes","id":3}}},"AuthorizeReply":{"fields":{}},"CreateLTS":{"fields":{"proof":{"rule":"required","type":"byzcoin.Proof","id":1}}},"CreateLTSReply":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"x":{"rule":"required","type":"bytes","id":3}}},"ReshareLTS":{"fields":{"proof":{"rule":"required","type":"byzcoin.Proof","id":1}}},"ReshareLTSReply":{"fields":{}},"UpdateValidPeers":{"fields":{"proof":{"rule":"required","type":"byzcoin.Proof","id":1}}},"UpdateValidPeersReply":{"fields":{}},"DecryptKey":{"fields":{"read":{"rule":"required","type":"byzcoin.Proof","id":1},"write":{"rule":"required","type":"byzcoin.Proof","id":2}}},"DecryptKeyReply":{"fields":{"c":{"rule":"required","type":"bytes","id":1},"xhatenc":{"rule":"required","type":"bytes","id":2},"x":{"rule":"required","type":"bytes","id":3}}},"GetLTSReply":{"fields":{"ltsid":{"rule":"required","type":"bytes","id":1}}},"LtsInstanceInfo":{"fields":{"roster":{"rule":"required","type":"onet.Roster","id":1}}}}},"eventlog":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"EventLogProto"},"nested":{"SearchRequest":{"fields":{"instance":{"rule":"required","type":"bytes","id":1},"id":{"rule":"required","type":"bytes","id":2},"topic":{"rule":"required","type":"string","id":3},"from":{"rule":"required","type":"sint64","id":4},"to":{"rule":"required","type":"sint64","id":5}}},"SearchResponse":{"fields":{"events":{"rule":"repeated","type":"Event","id":1,"options":{"packed":false}},"truncated":{"rule":"required","type":"bool","id":2}}},"Event":{"fields":{"when":{"rule":"required","type":"sint64","id":1},"topic":{"rule":"required","type":"string","id":2},"content":{"rule":"required","type":"string","id":3}}}}},"personhood":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"Personhood"},"nested":{"RoPaSci":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"ropasciid":{"rule":"required","type":"bytes","id":2},"locked":{"type":"sint64","id":3}}},"RoPaSciStruct":{"fields":{"description":{"rule":"required","type":"string","id":1},"stake":{"rule":"required","type":"byzcoin.Coin","id":2},"firstplayerhash":{"rule":"required","type":"bytes","id":3},"firstplayer":{"type":"sint32","id":4},"secondplayer":{"type":"sint32","id":5},"secondplayeraccount":{"type":"bytes","id":6},"firstplayeraccount":{"type":"bytes","id":7},"calypsowrite":{"type":"bytes","id":8},"calypsoread":{"type":"bytes","id":9}}},"CredentialStruct":{"fields":{"credentials":{"rule":"repeated","type":"Credential","id":1,"options":{"packed":false}}}},"Credential":{"fields":{"name":{"rule":"required","type":"string","id":1},"attributes":{"rule":"repeated","type":"Attribute","id":2,"options":{"packed":false}}}},"Attribute":{"fields":{"name":{"rule":"required","type":"string","id":1},"value":{"rule":"required","type":"bytes","id":2}}},"SpawnerStruct":{"fields":{"costdarc":{"rule":"required","type":"byzcoin.Coin","id":1},"costcoin":{"rule":"required","type":"byzcoin.Coin","id":2},"costcredential":{"rule":"required","type":"byzcoin.Coin","id":3},"costparty":{"rule":"required","type":"byzcoin.Coin","id":4},"beneficiary":{"rule":"required","type":"bytes","id":5},"costropasci":{"type":"byzcoin.Coin","id":6},"costcwrite":{"type":"byzcoin.Coin","id":7},"costcread":{"type":"byzcoin.Coin","id":8},"costvalue":{"type":"byzcoin.Coin","id":9}}},"PopPartyStruct":{"fields":{"state":{"rule":"required","type":"sint32","id":1},"organizers":{"rule":"required","type":"sint32","id":2},"finalizations":{"rule":"repeated","type":"string","id":3},"description":{"rule":"required","type":"PopDesc","id":4},"attendees":{"rule":"required","type":"Attendees","id":5},"miners":{"rule":"repeated","type":"LRSTag","id":6,"options":{"packed":false}},"miningreward":{"rule":"required","type":"uint64","id":7},"previous":{"type":"bytes","id":8},"next":{"type":"bytes","id":9}}},"PopDesc":{"fields":{"name":{"rule":"required","type":"string","id":1},"purpose":{"rule":"required","type":"string","id":2},"datetime":{"rule":"required","type":"uint64","id":3},"location":{"rule":"required","type":"string","id":4}}},"FinalStatement":{"fields":{"desc":{"type":"PopDesc","id":1},"attendees":{"rule":"required","type":"Attendees","id":2}}},"Attendees":{"fields":{"keys":{"rule":"repeated","type":"bytes","id":1}}},"LRSTag":{"fields":{"tag":{"rule":"required","type":"bytes","id":1}}}}},"personhood_service":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"PersonhoodService"},"nested":{"PartyList":{"fields":{"newparty":{"type":"Party","id":1},"wipeparties":{"type":"bool","id":2},"partydelete":{"type":"PartyDelete","id":3}}},"PartyDelete":{"fields":{"partyid":{"rule":"required","type":"bytes","id":1},"identity":{"rule":"required","type":"darc.Identity","id":2},"signature":{"rule":"required","type":"bytes","id":3}}},"PartyListResponse":{"fields":{"parties":{"rule":"repeated","type":"Party","id":1,"options":{"packed":false}}}},"Party":{"fields":{"roster":{"rule":"required","type":"onet.Roster","id":1},"byzcoinid":{"rule":"required","type":"bytes","id":2},"instanceid":{"rule":"required","type":"bytes","id":3}}},"RoPaSciList":{"fields":{"newropasci":{"type":"personhood.RoPaSci","id":1},"wipe":{"type":"bool","id":2},"lock":{"type":"personhood.RoPaSci","id":3}}},"RoPaSciListResponse":{"fields":{"ropascis":{"rule":"repeated","type":"personhood.RoPaSci","id":1,"options":{"packed":false}}}},"StringReply":{"fields":{"reply":{"rule":"required","type":"string","id":1}}},"Poll":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"newpoll":{"type":"PollStruct","id":2},"list":{"type":"PollList","id":3},"answer":{"type":"PollAnswer","id":4},"delete":{"type":"PollDelete","id":5}}},"PollDelete":{"fields":{"identity":{"rule":"required","type":"darc.Identity","id":1},"pollid":{"rule":"required","type":"bytes","id":2},"signature":{"rule":"required","type":"bytes","id":3}}},"PollList":{"fields":{"partyids":{"rule":"repeated","type":"bytes","id":1}}},"PollAnswer":{"fields":{"pollid":{"rule":"required","type":"bytes","id":1},"choice":{"rule":"required","type":"sint32","id":2},"lrs":{"rule":"required","type":"bytes","id":3},"partyid":{"type":"bytes","id":4}}},"PollStruct":{"fields":{"personhood":{"rule":"required","type":"bytes","id":1},"pollid":{"type":"bytes","id":2},"title":{"rule":"required","type":"string","id":3},"description":{"rule":"required","type":"string","id":4},"choices":{"rule":"repeated","type":"string","id":5},"chosen":{"rule":"repeated","type":"PollChoice","id":6,"options":{"packed":false}}}},"PollChoice":{"fields":{"choice":{"rule":"required","type":"sint32","id":1},"lrstag":{"rule":"required","type":"bytes","id":2}}},"PollResponse":{"fields":{"polls":{"rule":"repeated","type":"PollStruct","id":1,"options":{"packed":false}}}},"Capabilities":{"fields":{}},"CapabilitiesResponse":{"fields":{"capabilities":{"rule":"repeated","type":"Capability","id":1,"options":{"packed":false}}}},"Capability":{"fields":{"endpoint":{"rule":"required","type":"string","id":1},"version":{"rule":"required","type":"bytes","id":2}}},"UserLocation":{"fields":{"publickey":{"rule":"required","type":"bytes","id":1},"credentialiid":{"type":"bytes","id":2},"credential":{"type":"personhood.CredentialStruct","id":3},"location":{"type":"string","id":4},"time":{"rule":"required","type":"sint64","id":5}}},"Meetup":{"fields":{"userlocation":{"type":"UserLocation","id":1},"wipe":{"type":"bool","id":2}}},"MeetupResponse":{"fields":{"users":{"rule":"repeated","type":"UserLocation","id":1,"options":{"packed":false}}}},"Challenge":{"fields":{"update":{"type":"ChallengeCandidate","id":1}}},"ChallengeCandidate":{"fields":{"credential":{"rule":"required","type":"bytes","id":1},"score":{"rule":"required","type":"sint32","id":2},"signup":{"rule":"required","type":"sint64","id":3}}},"ChallengeReply":{"fields":{"list":{"rule":"repeated","type":"ChallengeCandidate","id":1,"options":{"packed":false}}}},"GetAdminDarcIDs":{"fields":{}},"GetAdminDarcIDsReply":{"fields":{"admindarcids":{"rule":"repeated","type":"bytes","id":1}}},"SetAdminDarcIDs":{"fields":{"newadmindarcids":{"rule":"repeated","type":"bytes","id":1},"signature":{"rule":"required","type":"bytes","id":2}}},"SetAdminDarcIDsReply":{"fields":{}},"EmailSetup":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"roster":{"rule":"required","type":"onet.Roster","id":2},"deviceurl":{"rule":"required","type":"string","id":3},"emaildarcid":{"rule":"required","type":"bytes","id":4},"smtphost":{"rule":"required","type":"string","id":5},"smtpfrom":{"rule":"required","type":"string","id":6},"smtpreplyto":{"rule":"required","type":"string","id":7},"baseurl":{"rule":"required","type":"string","id":8},"signature":{"rule":"required","type":"bytes","id":9}}},"EmailSetupReply":{"fields":{}},"EmailSignup":{"fields":{"email":{"rule":"required","type":"string","id":1},"alias":{"rule":"required","type":"string","id":2}}},"EmailSignupReply":{"fields":{"status":{"rule":"required","type":"sint32","id":1}}},"EmailRecover":{"fields":{"email":{"rule":"required","type":"string","id":1}}},"EmailRecoverReply":{"fields":{"status":{"rule":"required","type":"sint32","id":1}}}}},"status":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"StatusProto"},"nested":{"Request":{"fields":{}},"Response":{"fields":{"status":{"keyType":"string","type":"onet.Status","id":1},"serveridentity":{"type":"network.ServerIdentity","id":2}}},"CheckConnectivity":{"fields":{"time":{"rule":"required","type":"sint64","id":1},"timeout":{"rule":"required","type":"sint64","id":2},"findfaulty":{"rule":"required","type":"bool","id":3},"list":{"rule":"repeated","type":"network.ServerIdentity","id":4,"options":{"packed":false}},"signature":{"rule":"required","type":"bytes","id":5}}},"CheckConnectivityReply":{"fields":{"nodes":{"rule":"repeated","type":"network.ServerIdentity","id":1,"options":{"packed":false}}}}}}}} +{"nested":{"cothority":{},"authprox":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"AuthProxProto"},"nested":{"EnrollRequest":{"fields":{"type":{"rule":"required","type":"string","id":1},"issuer":{"rule":"required","type":"string","id":2},"participants":{"rule":"repeated","type":"bytes","id":3},"longpri":{"rule":"required","type":"PriShare","id":4},"longpubs":{"rule":"repeated","type":"bytes","id":5}}},"EnrollResponse":{"fields":{}},"SignatureRequest":{"fields":{"type":{"rule":"required","type":"string","id":1},"issuer":{"rule":"required","type":"string","id":2},"authinfo":{"rule":"required","type":"bytes","id":3},"randpri":{"rule":"required","type":"PriShare","id":4},"randpubs":{"rule":"repeated","type":"bytes","id":5},"message":{"rule":"required","type":"bytes","id":6}}},"PriShare":{"fields":{}},"PartialSig":{"fields":{"partial":{"rule":"required","type":"PriShare","id":1},"sessionid":{"rule":"required","type":"bytes","id":2},"signature":{"rule":"required","type":"bytes","id":3}}},"SignatureResponse":{"fields":{"partialsignature":{"rule":"required","type":"PartialSig","id":1}}},"EnrollmentsRequest":{"fields":{"types":{"rule":"repeated","type":"string","id":1},"issuers":{"rule":"repeated","type":"string","id":2}}},"EnrollmentsResponse":{"fields":{"enrollments":{"rule":"repeated","type":"EnrollmentInfo","id":1,"options":{"packed":false}}}},"EnrollmentInfo":{"fields":{"type":{"rule":"required","type":"string","id":1},"issuer":{"rule":"required","type":"string","id":2},"public":{"rule":"required","type":"bytes","id":3}}}}},"bevm":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"BEvmProto"},"nested":{"ViewCallRequest":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"bevminstanceid":{"rule":"required","type":"bytes","id":2},"accountaddress":{"rule":"required","type":"bytes","id":3},"contractaddress":{"rule":"required","type":"bytes","id":4},"calldata":{"rule":"required","type":"bytes","id":5},"minblockindex":{"rule":"required","type":"sint32","id":6}}},"ViewCallResponse":{"fields":{"result":{"rule":"required","type":"bytes","id":1}}}}},"byzcoin":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"ByzCoinProto"},"nested":{"GetAllByzCoinIDsRequest":{"fields":{}},"GetAllByzCoinIDsResponse":{"fields":{"ids":{"rule":"repeated","type":"bytes","id":1}}},"DataHeader":{"fields":{"trieroot":{"rule":"required","type":"bytes","id":1},"clienttransactionhash":{"rule":"required","type":"bytes","id":2},"statechangeshash":{"rule":"required","type":"bytes","id":3},"timestamp":{"rule":"required","type":"sint64","id":4},"version":{"type":"sint32","id":5}}},"DataBody":{"fields":{"txresults":{"rule":"repeated","type":"TxResult","id":1,"options":{"packed":false}}}},"CreateGenesisBlock":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"roster":{"rule":"required","type":"onet.Roster","id":2},"genesisdarc":{"rule":"required","type":"darc.Darc","id":3},"blockinterval":{"rule":"required","type":"sint64","id":4},"maxblocksize":{"type":"sint32","id":5},"darccontractids":{"rule":"repeated","type":"string","id":6}}},"CreateGenesisBlockResponse":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"skipblock":{"type":"skipchain.SkipBlock","id":2}}},"AddTxRequest":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"skipchainid":{"rule":"required","type":"bytes","id":2},"transaction":{"rule":"required","type":"ClientTransaction","id":3},"inclusionwait":{"type":"sint32","id":4},"prooffrom":{"type":"bytes","id":5},"flags":{"type":"sint32","id":6}}},"AddTxResponse":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"error":{"type":"string","id":2},"proof":{"type":"Proof","id":3}}},"GetProof":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"key":{"rule":"required","type":"bytes","id":2},"id":{"rule":"required","type":"bytes","id":3},"mustcontainblock":{"type":"bytes","id":4}}},"GetProofResponse":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"proof":{"rule":"required","type":"Proof","id":2}}},"CheckAuthorization":{"fields":{"version":{"rule":"required","type":"sint32","id":1},"byzcoinid":{"rule":"required","type":"bytes","id":2},"darcid":{"rule":"required","type":"bytes","id":3},"identities":{"rule":"repeated","type":"darc.Identity","id":4,"options":{"packed":false}}}},"CheckAuthorizationResponse":{"fields":{"actions":{"rule":"repeated","type":"string","id":1}}},"ChainConfig":{"fields":{"blockinterval":{"rule":"required","type":"sint64","id":1},"roster":{"rule":"required","type":"onet.Roster","id":2},"maxblocksize":{"rule":"required","type":"sint32","id":3},"darccontractids":{"rule":"repeated","type":"string","id":4}}},"Proof":{"fields":{"inclusionproof":{"rule":"required","type":"trie.Proof","id":1},"latest":{"rule":"required","type":"skipchain.SkipBlock","id":2},"links":{"rule":"repeated","type":"skipchain.ForwardLink","id":3,"options":{"packed":false}}}},"Instruction":{"fields":{"instanceid":{"rule":"required","type":"bytes","id":1},"spawn":{"type":"Spawn","id":2},"invoke":{"type":"Invoke","id":3},"delete":{"type":"Delete","id":4},"signercounter":{"rule":"repeated","type":"uint64","id":5,"options":{"packed":true}},"signeridentities":{"rule":"repeated","type":"darc.Identity","id":6,"options":{"packed":false}},"signatures":{"rule":"repeated","type":"bytes","id":7}}},"Spawn":{"fields":{"contractid":{"rule":"required","type":"string","id":1},"args":{"rule":"repeated","type":"Argument","id":2,"options":{"packed":false}}}},"Invoke":{"fields":{"contractid":{"rule":"required","type":"string","id":1},"command":{"rule":"required","type":"string","id":2},"args":{"rule":"repeated","type":"Argument","id":3,"options":{"packed":false}}}},"Delete":{"fields":{"contractid":{"rule":"required","type":"string","id":1},"args":{"rule":"repeated","type":"Argument","id":2,"options":{"packed":false}}}},"Argument":{"fields":{"name":{"rule":"required","type":"string","id":1},"value":{"rule":"required","type":"bytes","id":2}}},"ClientTransaction":{"fields":{"instructions":{"rule":"repeated","type":"Instruction","id":1,"options":{"packed":false}}}},"TxResult":{"fields":{"clienttransaction":{"rule":"required","type":"ClientTransaction","id":1},"accepted":{"rule":"required","type":"bool","id":2}}},"StateChange":{"fields":{"stateaction":{"rule":"required","type":"sint32","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"contractid":{"rule":"required","type":"string","id":3},"value":{"rule":"required","type":"bytes","id":4},"darcid":{"rule":"required","type":"bytes","id":5},"version":{"rule":"required","type":"uint64","id":6}}},"Coin":{"fields":{"name":{"rule":"required","type":"bytes","id":1},"value":{"rule":"required","type":"uint64","id":2}}},"StreamingRequest":{"fields":{"id":{"rule":"required","type":"bytes","id":1}}},"StreamingResponse":{"fields":{"block":{"type":"skipchain.SkipBlock","id":1}}},"PaginateRequest":{"fields":{"startid":{"rule":"required","type":"bytes","id":1},"pagesize":{"rule":"required","type":"uint64","id":2},"numpages":{"rule":"required","type":"uint64","id":3},"backward":{"rule":"required","type":"bool","id":4}}},"PaginateResponse":{"fields":{"blocks":{"rule":"repeated","type":"skipchain.SkipBlock","id":1,"options":{"packed":false}},"pagenumber":{"rule":"required","type":"uint64","id":2},"backward":{"rule":"required","type":"bool","id":3},"errorcode":{"rule":"required","type":"uint64","id":4},"errortext":{"rule":"repeated","type":"string","id":5}}},"DownloadState":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"nonce":{"rule":"required","type":"uint64","id":2},"length":{"rule":"required","type":"sint32","id":3}}},"DownloadStateResponse":{"fields":{"keyvalues":{"rule":"repeated","type":"DBKeyValue","id":1,"options":{"packed":false}},"nonce":{"rule":"required","type":"uint64","id":2},"total":{"type":"sint32","id":3}}},"DBKeyValue":{"fields":{"key":{"rule":"required","type":"bytes","id":1},"value":{"rule":"required","type":"bytes","id":2}}},"StateChangeBody":{"fields":{"stateaction":{"rule":"required","type":"sint32","id":1},"contractid":{"rule":"required","type":"string","id":2},"value":{"rule":"required","type":"bytes","id":3},"version":{"rule":"required","type":"uint64","id":4},"darcid":{"rule":"required","type":"bytes","id":5}}},"GetSignerCounters":{"fields":{"signerids":{"rule":"repeated","type":"string","id":1},"skipchainid":{"rule":"required","type":"bytes","id":2}}},"GetSignerCountersResponse":{"fields":{"counters":{"rule":"repeated","type":"uint64","id":1,"options":{"packed":true}},"index":{"type":"uint64","id":2}}},"GetInstanceVersion":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"version":{"rule":"required","type":"uint64","id":3}}},"GetLastInstanceVersion":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2}}},"GetInstanceVersionResponse":{"fields":{"statechange":{"rule":"required","type":"StateChange","id":1},"blockindex":{"rule":"required","type":"sint32","id":2}}},"GetAllInstanceVersion":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2}}},"GetAllInstanceVersionResponse":{"fields":{"statechanges":{"rule":"repeated","type":"GetInstanceVersionResponse","id":1,"options":{"packed":false}}}},"CheckStateChangeValidity":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"version":{"rule":"required","type":"uint64","id":3}}},"CheckStateChangeValidityResponse":{"fields":{"statechanges":{"rule":"repeated","type":"StateChange","id":1,"options":{"packed":false}},"blockid":{"rule":"required","type":"bytes","id":2}}},"ResolveInstanceID":{"fields":{"skipchainid":{"rule":"required","type":"bytes","id":1},"darcid":{"rule":"required","type":"bytes","id":2},"name":{"rule":"required","type":"string","id":3}}},"ResolvedInstanceID":{"fields":{"instanceid":{"rule":"required","type":"bytes","id":1}}},"DebugRequest":{"fields":{"byzcoinid":{"type":"bytes","id":1}}},"DebugResponse":{"fields":{"byzcoins":{"rule":"repeated","type":"DebugResponseByzcoin","id":1,"options":{"packed":false}},"dump":{"rule":"repeated","type":"DebugResponseState","id":2,"options":{"packed":false}}}},"DebugResponseByzcoin":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"genesis":{"type":"skipchain.SkipBlock","id":2},"latest":{"type":"skipchain.SkipBlock","id":3}}},"DebugResponseState":{"fields":{"key":{"rule":"required","type":"bytes","id":1},"state":{"rule":"required","type":"StateChangeBody","id":2}}},"DebugRemoveRequest":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"signature":{"rule":"required","type":"bytes","id":2}}},"IDVersion":{"fields":{"id":{"rule":"required","type":"bytes","id":1},"version":{"rule":"required","type":"uint64","id":2}}},"GetUpdatesRequest":{"fields":{"instances":{"rule":"repeated","type":"IDVersion","id":1,"options":{"packed":false}},"flags":{"rule":"required","type":"uint64","id":2},"latestblockid":{"type":"bytes","id":3},"skipchainid":{"type":"bytes","id":4}}},"GetUpdatesReply":{"fields":{"proofs":{"rule":"repeated","type":"trie.Proof","id":1,"options":{"packed":false}},"links":{"rule":"repeated","type":"skipchain.ForwardLink","id":2,"options":{"packed":false}},"latest":{"type":"skipchain.SkipBlock","id":3}}}}},"skipchain":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"SkipchainProto"},"nested":{"StoreSkipBlock":{"fields":{"targetSkipChainID":{"rule":"required","type":"bytes","id":1},"newBlock":{"rule":"required","type":"SkipBlock","id":2},"signature":{"type":"bytes","id":3}}},"StoreSkipBlockReply":{"fields":{"previous":{"type":"SkipBlock","id":1},"latest":{"rule":"required","type":"SkipBlock","id":2}}},"GetAllSkipChainIDs":{"fields":{}},"GetAllSkipChainIDsReply":{"fields":{"skipChainIDs":{"rule":"repeated","type":"bytes","id":1}}},"GetSingleBlock":{"fields":{"id":{"rule":"required","type":"bytes","id":1}}},"GetSingleBlockByIndex":{"fields":{"genesis":{"rule":"required","type":"bytes","id":1},"index":{"rule":"required","type":"sint32","id":2}}},"GetSingleBlockByIndexReply":{"fields":{"skipblock":{"rule":"required","type":"SkipBlock","id":1},"links":{"rule":"repeated","type":"ForwardLink","id":2,"options":{"packed":false}}}},"GetUpdateChain":{"fields":{"latestID":{"rule":"required","type":"bytes","id":1}}},"GetUpdateChainReply":{"fields":{"update":{"rule":"repeated","type":"SkipBlock","id":1,"options":{"packed":false}}}},"SkipBlock":{"fields":{"index":{"rule":"required","type":"sint32","id":1},"height":{"rule":"required","type":"sint32","id":2},"maxHeight":{"rule":"required","type":"sint32","id":3},"baseHeight":{"rule":"required","type":"sint32","id":4},"backlinks":{"rule":"repeated","type":"bytes","id":5},"verifiers":{"rule":"repeated","type":"bytes","id":6},"genesis":{"rule":"required","type":"bytes","id":7},"data":{"rule":"required","type":"bytes","id":8},"roster":{"rule":"required","type":"onet.Roster","id":9},"hash":{"rule":"required","type":"bytes","id":10},"forward":{"rule":"repeated","type":"ForwardLink","id":11,"options":{"packed":false}},"payload":{"type":"bytes","id":12},"signatureScheme":{"type":"uint32","id":13}}},"ForwardLink":{"fields":{"from":{"rule":"required","type":"bytes","id":1},"to":{"rule":"required","type":"bytes","id":2},"newRoster":{"type":"onet.Roster","id":3},"signature":{"rule":"required","type":"ByzcoinSig","id":4}}},"ByzcoinSig":{"fields":{"msg":{"rule":"required","type":"bytes","id":1},"sig":{"rule":"required","type":"bytes","id":2}}},"SchnorrSig":{"fields":{"challenge":{"rule":"required","type":"bytes","id":1},"response":{"rule":"required","type":"bytes","id":2}}},"Exception":{"fields":{"index":{"rule":"required","type":"sint32","id":1},"commitment":{"rule":"required","type":"bytes","id":2}}}}},"onet":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"OnetProto"},"nested":{"Roster":{"fields":{"id":{"type":"bytes","id":1},"list":{"rule":"repeated","type":"network.ServerIdentity","id":2,"options":{"packed":false}},"aggregate":{"rule":"required","type":"bytes","id":3}}},"Status":{"fields":{"field":{"keyType":"string","type":"string","id":1}}}}},"network":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"NetworkProto"},"nested":{"ServerIdentity":{"fields":{"public":{"rule":"required","type":"bytes","id":1},"serviceIdentities":{"rule":"repeated","type":"ServiceIdentity","id":2,"options":{"packed":false}},"id":{"rule":"required","type":"bytes","id":3},"address":{"rule":"required","type":"string","id":4},"description":{"rule":"required","type":"string","id":5},"url":{"type":"string","id":7}}},"ServiceIdentity":{"fields":{"name":{"rule":"required","type":"string","id":1},"suite":{"rule":"required","type":"string","id":2},"public":{"rule":"required","type":"bytes","id":3}}}}},"darc":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"DarcProto"},"nested":{"Darc":{"fields":{"version":{"rule":"required","type":"uint64","id":1},"description":{"rule":"required","type":"bytes","id":2},"baseid":{"type":"bytes","id":3},"previd":{"rule":"required","type":"bytes","id":4},"rules":{"rule":"required","type":"Rules","id":5},"signatures":{"rule":"repeated","type":"Signature","id":6,"options":{"packed":false}},"verificationdarcs":{"rule":"repeated","type":"Darc","id":7,"options":{"packed":false}}}},"Identity":{"fields":{"darc":{"type":"IdentityDarc","id":1},"ed25519":{"type":"IdentityEd25519","id":2},"x509ec":{"type":"IdentityX509EC","id":3},"proxy":{"type":"IdentityProxy","id":4},"evmcontract":{"type":"IdentityEvmContract","id":5},"did":{"type":"IdentityDID","id":6},"tsm":{"type":"IdentityTSM","id":7}}},"IdentityEd25519":{"fields":{"point":{"rule":"required","type":"bytes","id":1}}},"IdentityTSM":{"fields":{"publickey":{"rule":"required","type":"bytes","id":1}}},"IdentityX509EC":{"fields":{"public":{"rule":"required","type":"bytes","id":1}}},"IdentityProxy":{"fields":{"data":{"rule":"required","type":"string","id":1},"public":{"rule":"required","type":"bytes","id":2}}},"IdentityDarc":{"fields":{"id":{"rule":"required","type":"bytes","id":1}}},"IdentityEvmContract":{"fields":{"address":{"rule":"required","type":"bytes","id":1}}},"IdentityDID":{"fields":{"did":{"rule":"required","type":"string","id":1},"diddoc":{"type":"DIDDoc","id":2},"method":{"rule":"required","type":"string","id":3}}},"DIDDoc":{"fields":{"context":{"rule":"repeated","type":"string","id":1},"id":{"rule":"required","type":"string","id":2},"publickey":{"rule":"repeated","type":"PublicKey","id":3,"options":{"packed":false}},"service":{"rule":"repeated","type":"DIDService","id":4,"options":{"packed":false}},"authentication":{"rule":"repeated","type":"VerificationMethod","id":5,"options":{"packed":false}}}},"PublicKey":{"fields":{"id":{"rule":"required","type":"string","id":1},"type":{"rule":"required","type":"string","id":2},"controller":{"rule":"required","type":"string","id":3},"value":{"rule":"required","type":"bytes","id":4}}},"DIDService":{"fields":{"id":{"rule":"required","type":"string","id":1},"type":{"rule":"required","type":"string","id":2},"priority":{"rule":"required","type":"sint32","id":3},"recipientkeys":{"rule":"repeated","type":"string","id":4},"routingkeys":{"rule":"repeated","type":"string","id":5},"serviceendpoint":{"rule":"required","type":"string","id":6}}},"VerificationMethod":{"fields":{"publickey":{"rule":"required","type":"PublicKey","id":1}}},"Signature":{"fields":{"signature":{"rule":"required","type":"bytes","id":1},"signer":{"rule":"required","type":"Identity","id":2}}},"Signer":{"fields":{"ed25519":{"type":"SignerEd25519","id":1},"x509ec":{"type":"SignerX509EC","id":2},"proxy":{"type":"SignerProxy","id":3},"evmcontract":{"type":"SignerEvmContract","id":4},"did":{"type":"SignerDID","id":5}}},"SignerEd25519":{"fields":{"point":{"rule":"required","type":"bytes","id":1},"secret":{"rule":"required","type":"bytes","id":2}}},"SignerX509EC":{"fields":{"point":{"rule":"required","type":"bytes","id":1}}},"SignerProxy":{"fields":{"data":{"rule":"required","type":"string","id":1},"public":{"rule":"required","type":"bytes","id":2}}},"SignerEvmContract":{"fields":{"address":{"rule":"required","type":"bytes","id":1}}},"SignerDID":{"fields":{"public":{"rule":"required","type":"bytes","id":1},"secret":{"rule":"required","type":"bytes","id":2},"did":{"rule":"required","type":"string","id":3}}},"Request":{"fields":{"baseid":{"rule":"required","type":"bytes","id":1},"action":{"rule":"required","type":"string","id":2},"msg":{"rule":"required","type":"bytes","id":3},"identities":{"rule":"repeated","type":"Identity","id":4,"options":{"packed":false}},"signatures":{"rule":"repeated","type":"bytes","id":5}}},"Rules":{"fields":{"list":{"rule":"repeated","type":"Rule","id":1,"options":{"packed":false}}}},"Rule":{"fields":{"action":{"rule":"required","type":"string","id":1},"expr":{"rule":"required","type":"bytes","id":2}}}}},"trie":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"TrieProto"},"nested":{"InteriorNode":{"fields":{"left":{"rule":"required","type":"bytes","id":1},"right":{"rule":"required","type":"bytes","id":2}}},"EmptyNode":{"fields":{"prefix":{"rule":"repeated","type":"bool","id":1,"options":{"packed":true}}}},"LeafNode":{"fields":{"prefix":{"rule":"repeated","type":"bool","id":1,"options":{"packed":true}},"key":{"rule":"required","type":"bytes","id":2},"value":{"rule":"required","type":"bytes","id":3}}},"Proof":{"fields":{"interiors":{"rule":"repeated","type":"InteriorNode","id":1,"options":{"packed":false}},"leaf":{"rule":"required","type":"LeafNode","id":2},"empty":{"rule":"required","type":"EmptyNode","id":3},"nonce":{"rule":"required","type":"bytes","id":4}}}}},"calypso":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"Calypso"},"nested":{"Write":{"fields":{"data":{"rule":"required","type":"bytes","id":1},"u":{"rule":"required","type":"bytes","id":2},"ubar":{"rule":"required","type":"bytes","id":3},"e":{"rule":"required","type":"bytes","id":4},"f":{"rule":"required","type":"bytes","id":5},"c":{"rule":"required","type":"bytes","id":6},"extradata":{"type":"bytes","id":7},"ltsid":{"rule":"required","type":"bytes","id":8},"cost":{"type":"byzcoin.Coin","id":9}}},"Read":{"fields":{"write":{"rule":"required","type":"bytes","id":1},"xc":{"rule":"required","type":"bytes","id":2}}},"Authorise":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1}}},"AuthoriseReply":{"fields":{}},"Authorize":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"timestamp":{"type":"sint64","id":2},"signature":{"type":"bytes","id":3}}},"AuthorizeReply":{"fields":{}},"CreateLTS":{"fields":{"proof":{"rule":"required","type":"byzcoin.Proof","id":1}}},"CreateLTSReply":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"instanceid":{"rule":"required","type":"bytes","id":2},"x":{"rule":"required","type":"bytes","id":3}}},"ReshareLTS":{"fields":{"proof":{"rule":"required","type":"byzcoin.Proof","id":1}}},"ReshareLTSReply":{"fields":{}},"UpdateValidPeers":{"fields":{"proof":{"rule":"required","type":"byzcoin.Proof","id":1}}},"UpdateValidPeersReply":{"fields":{}},"DecryptKey":{"fields":{"read":{"rule":"required","type":"byzcoin.Proof","id":1},"write":{"rule":"required","type":"byzcoin.Proof","id":2}}},"DecryptKeyReply":{"fields":{"c":{"rule":"required","type":"bytes","id":1},"xhatenc":{"rule":"required","type":"bytes","id":2},"x":{"rule":"required","type":"bytes","id":3}}},"GetLTSReply":{"fields":{"ltsid":{"rule":"required","type":"bytes","id":1}}},"LtsInstanceInfo":{"fields":{"roster":{"rule":"required","type":"onet.Roster","id":1}}}}},"eventlog":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"EventLogProto"},"nested":{"SearchRequest":{"fields":{"instance":{"rule":"required","type":"bytes","id":1},"id":{"rule":"required","type":"bytes","id":2},"topic":{"rule":"required","type":"string","id":3},"from":{"rule":"required","type":"sint64","id":4},"to":{"rule":"required","type":"sint64","id":5}}},"SearchResponse":{"fields":{"events":{"rule":"repeated","type":"Event","id":1,"options":{"packed":false}},"truncated":{"rule":"required","type":"bool","id":2}}},"Event":{"fields":{"when":{"rule":"required","type":"sint64","id":1},"topic":{"rule":"required","type":"string","id":2},"content":{"rule":"required","type":"string","id":3}}}}},"personhood":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"Personhood"},"nested":{"RoPaSci":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"ropasciid":{"rule":"required","type":"bytes","id":2},"locked":{"type":"sint64","id":3}}},"RoPaSciStruct":{"fields":{"description":{"rule":"required","type":"string","id":1},"stake":{"rule":"required","type":"byzcoin.Coin","id":2},"firstplayerhash":{"rule":"required","type":"bytes","id":3},"firstplayer":{"type":"sint32","id":4},"secondplayer":{"type":"sint32","id":5},"secondplayeraccount":{"type":"bytes","id":6},"firstplayeraccount":{"type":"bytes","id":7},"calypsowrite":{"type":"bytes","id":8},"calypsoread":{"type":"bytes","id":9}}},"CredentialStruct":{"fields":{"credentials":{"rule":"repeated","type":"Credential","id":1,"options":{"packed":false}}}},"Credential":{"fields":{"name":{"rule":"required","type":"string","id":1},"attributes":{"rule":"repeated","type":"Attribute","id":2,"options":{"packed":false}}}},"Attribute":{"fields":{"name":{"rule":"required","type":"string","id":1},"value":{"rule":"required","type":"bytes","id":2}}},"SpawnerStruct":{"fields":{"costdarc":{"rule":"required","type":"byzcoin.Coin","id":1},"costcoin":{"rule":"required","type":"byzcoin.Coin","id":2},"costcredential":{"rule":"required","type":"byzcoin.Coin","id":3},"costparty":{"rule":"required","type":"byzcoin.Coin","id":4},"beneficiary":{"rule":"required","type":"bytes","id":5},"costropasci":{"type":"byzcoin.Coin","id":6},"costcwrite":{"type":"byzcoin.Coin","id":7},"costcread":{"type":"byzcoin.Coin","id":8},"costvalue":{"type":"byzcoin.Coin","id":9}}},"PopPartyStruct":{"fields":{"state":{"rule":"required","type":"sint32","id":1},"organizers":{"rule":"required","type":"sint32","id":2},"finalizations":{"rule":"repeated","type":"string","id":3},"description":{"rule":"required","type":"PopDesc","id":4},"attendees":{"rule":"required","type":"Attendees","id":5},"miners":{"rule":"repeated","type":"LRSTag","id":6,"options":{"packed":false}},"miningreward":{"rule":"required","type":"uint64","id":7},"previous":{"type":"bytes","id":8},"next":{"type":"bytes","id":9}}},"PopDesc":{"fields":{"name":{"rule":"required","type":"string","id":1},"purpose":{"rule":"required","type":"string","id":2},"datetime":{"rule":"required","type":"uint64","id":3},"location":{"rule":"required","type":"string","id":4}}},"FinalStatement":{"fields":{"desc":{"type":"PopDesc","id":1},"attendees":{"rule":"required","type":"Attendees","id":2}}},"Attendees":{"fields":{"keys":{"rule":"repeated","type":"bytes","id":1}}},"LRSTag":{"fields":{"tag":{"rule":"required","type":"bytes","id":1}}}}},"personhood_service":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"PersonhoodService"},"nested":{"PartyList":{"fields":{"newparty":{"type":"Party","id":1},"wipeparties":{"type":"bool","id":2},"partydelete":{"type":"PartyDelete","id":3}}},"PartyDelete":{"fields":{"partyid":{"rule":"required","type":"bytes","id":1},"identity":{"rule":"required","type":"darc.Identity","id":2},"signature":{"rule":"required","type":"bytes","id":3}}},"PartyListResponse":{"fields":{"parties":{"rule":"repeated","type":"Party","id":1,"options":{"packed":false}}}},"Party":{"fields":{"roster":{"rule":"required","type":"onet.Roster","id":1},"byzcoinid":{"rule":"required","type":"bytes","id":2},"instanceid":{"rule":"required","type":"bytes","id":3}}},"RoPaSciList":{"fields":{"newropasci":{"type":"personhood.RoPaSci","id":1},"wipe":{"type":"bool","id":2},"lock":{"type":"personhood.RoPaSci","id":3}}},"RoPaSciListResponse":{"fields":{"ropascis":{"rule":"repeated","type":"personhood.RoPaSci","id":1,"options":{"packed":false}}}},"StringReply":{"fields":{"reply":{"rule":"required","type":"string","id":1}}},"Poll":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"newpoll":{"type":"PollStruct","id":2},"list":{"type":"PollList","id":3},"answer":{"type":"PollAnswer","id":4},"delete":{"type":"PollDelete","id":5}}},"PollDelete":{"fields":{"identity":{"rule":"required","type":"darc.Identity","id":1},"pollid":{"rule":"required","type":"bytes","id":2},"signature":{"rule":"required","type":"bytes","id":3}}},"PollList":{"fields":{"partyids":{"rule":"repeated","type":"bytes","id":1}}},"PollAnswer":{"fields":{"pollid":{"rule":"required","type":"bytes","id":1},"choice":{"rule":"required","type":"sint32","id":2},"lrs":{"rule":"required","type":"bytes","id":3},"partyid":{"type":"bytes","id":4}}},"PollStruct":{"fields":{"personhood":{"rule":"required","type":"bytes","id":1},"pollid":{"type":"bytes","id":2},"title":{"rule":"required","type":"string","id":3},"description":{"rule":"required","type":"string","id":4},"choices":{"rule":"repeated","type":"string","id":5},"chosen":{"rule":"repeated","type":"PollChoice","id":6,"options":{"packed":false}}}},"PollChoice":{"fields":{"choice":{"rule":"required","type":"sint32","id":1},"lrstag":{"rule":"required","type":"bytes","id":2}}},"PollResponse":{"fields":{"polls":{"rule":"repeated","type":"PollStruct","id":1,"options":{"packed":false}}}},"Capabilities":{"fields":{}},"CapabilitiesResponse":{"fields":{"capabilities":{"rule":"repeated","type":"Capability","id":1,"options":{"packed":false}}}},"Capability":{"fields":{"endpoint":{"rule":"required","type":"string","id":1},"version":{"rule":"required","type":"bytes","id":2}}},"UserLocation":{"fields":{"publickey":{"rule":"required","type":"bytes","id":1},"credentialiid":{"type":"bytes","id":2},"credential":{"type":"personhood.CredentialStruct","id":3},"location":{"type":"string","id":4},"time":{"rule":"required","type":"sint64","id":5}}},"Meetup":{"fields":{"userlocation":{"type":"UserLocation","id":1},"wipe":{"type":"bool","id":2}}},"MeetupResponse":{"fields":{"users":{"rule":"repeated","type":"UserLocation","id":1,"options":{"packed":false}}}},"Challenge":{"fields":{"update":{"type":"ChallengeCandidate","id":1}}},"ChallengeCandidate":{"fields":{"credential":{"rule":"required","type":"bytes","id":1},"score":{"rule":"required","type":"sint32","id":2},"signup":{"rule":"required","type":"sint64","id":3}}},"ChallengeReply":{"fields":{"list":{"rule":"repeated","type":"ChallengeCandidate","id":1,"options":{"packed":false}}}},"GetAdminDarcIDs":{"fields":{}},"GetAdminDarcIDsReply":{"fields":{"admindarcids":{"rule":"repeated","type":"bytes","id":1}}},"SetAdminDarcIDs":{"fields":{"newadmindarcids":{"rule":"repeated","type":"bytes","id":1},"signature":{"rule":"required","type":"bytes","id":2}}},"SetAdminDarcIDsReply":{"fields":{}},"EmailSetup":{"fields":{"byzcoinid":{"rule":"required","type":"bytes","id":1},"roster":{"rule":"required","type":"onet.Roster","id":2},"deviceurl":{"rule":"required","type":"string","id":3},"emaildarcid":{"rule":"required","type":"bytes","id":4},"smtphost":{"rule":"required","type":"string","id":5},"smtpfrom":{"rule":"required","type":"string","id":6},"smtpreplyto":{"rule":"required","type":"string","id":7},"baseurl":{"rule":"required","type":"string","id":8},"signature":{"rule":"required","type":"bytes","id":9}}},"EmailSetupReply":{"fields":{}},"EmailSignup":{"fields":{"email":{"rule":"required","type":"string","id":1},"alias":{"rule":"required","type":"string","id":2}}},"EmailSignupReply":{"fields":{"status":{"rule":"required","type":"sint32","id":1}}},"EmailRecover":{"fields":{"email":{"rule":"required","type":"string","id":1}}},"EmailRecoverReply":{"fields":{"status":{"rule":"required","type":"sint32","id":1}}}}},"status":{"options":{"java_package":"ch.epfl.dedis.lib.proto","java_outer_classname":"StatusProto"},"nested":{"Request":{"fields":{}},"Response":{"fields":{"status":{"keyType":"string","type":"onet.Status","id":1},"serveridentity":{"type":"network.ServerIdentity","id":2}}},"CheckConnectivity":{"fields":{"time":{"rule":"required","type":"sint64","id":1},"timeout":{"rule":"required","type":"sint64","id":2},"findfaulty":{"rule":"required","type":"bool","id":3},"list":{"rule":"repeated","type":"network.ServerIdentity","id":4,"options":{"packed":false}},"signature":{"rule":"required","type":"bytes","id":5}}},"CheckConnectivityReply":{"fields":{"nodes":{"rule":"repeated","type":"network.ServerIdentity","id":1,"options":{"packed":false}}}}}}}} diff --git a/external/proto/darc.proto b/external/proto/darc.proto index b07c98801d..149fd2b093 100644 --- a/external/proto/darc.proto +++ b/external/proto/darc.proto @@ -50,6 +50,8 @@ message Identity { optional IdentityEvmContract evmcontract = 5; // A claim signed by one of the keys in a DID Doc optional IdentityDID did = 6; + // Public-key identity from an ECDSA key + optional IdentityTSM tsm = 7; } // IdentityEd25519 holds a Ed25519 public key (Point) @@ -57,6 +59,11 @@ message IdentityEd25519 { required bytes point = 1; } +// IdentityTSM holds a secp256k1 key (array of bytes) +message IdentityTSM { + required bytes publickey = 1; +} + // IdentityX509EC holds a public key from a X509EC message IdentityX509EC { required bytes public = 1; From b5e6d1b5c39a3fa65206bcf18e1764f5d8aed2e6 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Fri, 11 Feb 2022 14:47:01 +0100 Subject: [PATCH 2/3] Updating go-version to use in tests and deploy --- .github/workflows/full_test.yaml | 2 +- .github/workflows/lint_build_test.yaml | 4 ++-- .github/workflows/release.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/full_test.yaml b/.github/workflows/full_test.yaml index 2f1780dc99..7d3dc07ad8 100644 --- a/.github/workflows/full_test.yaml +++ b/.github/workflows/full_test.yaml @@ -5,7 +5,7 @@ on: - cron: "12 6 * * 1-5" env: - GO_VERSION: 1.15 + GO_VERSION: 1.17 jobs: go: diff --git a/.github/workflows/lint_build_test.yaml b/.github/workflows/lint_build_test.yaml index 36320cf5c9..601f2f1b85 100644 --- a/.github/workflows/lint_build_test.yaml +++ b/.github/workflows/lint_build_test.yaml @@ -5,7 +5,7 @@ on: env: NODE_VERSION: 10 - GO_VERSION: 1.15 + GO_VERSION: 1.16 JAVA_VERSION: 9 jobs: @@ -39,7 +39,7 @@ jobs: strategy: matrix: - golang-version: [1.14, 1.15] # Cannot use env. here :( + golang-version: [1.16, 1.17] # Cannot use env. here :( steps: - uses: actions/checkout@main diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 50e64448e8..890dbd0775 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,7 +6,7 @@ on: - 'v*' env: - GO_VERSION: 1.15 + GO_VERSION: 1.17 jobs: go: From 581c742b28d74682a0278723f442288102cc95e5 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Sun, 13 Feb 2022 16:35:17 +0100 Subject: [PATCH 3/3] @tharvik's comments --- darc/darc.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/darc/darc.go b/darc/darc.go index 30c6814157..2b53038b34 100644 --- a/darc/darc.go +++ b/darc/darc.go @@ -929,10 +929,7 @@ func (id Identity) String() string { case 5: return fmt.Sprintf("%s:%s", id.TypeString(), id.DID.DID) case 6: - buf, err := id.TSM.MarshalBinary() - if err != nil { - panic("couldn't marshal TSM key: " + err.Error()) - } + buf, _ := id.TSM.MarshalBinary() return fmt.Sprintf("%s:%x", id.TypeString(), buf) default: return "No identity" @@ -983,8 +980,7 @@ func (id Identity) GetPublicBytes() []byte { case 4: return id.EvmContract.Address[:] case 6: - buf := id.TSM.PublicKey - return buf + return id.TSM.PublicKey default: return nil }