dedis/cothority

[Calypso] LTSID not checked on the Write contract

nkcr opened this issue · 4 comments

nkcr commented

The write contract gets an LTSID upon creation, which should correspond to a valid InstanceID of an LTS smart contract instance. This LTSID is used for the ZKP and during the decryption process, to get the roster. This LTSID is actually never checked. One could indeed use any other value, with the following consequences:

  • The ZKP checks fails, in case the client is using the real LTSID. But it would pass if the client uses the same wrong LTSID
  • The decryption process fails, because the service can't retrieve the roster. Hopefully this case is handled and won't make the system crash (+1).
nkcr commented

Some pointers:

Thanks for the bug report. Are you actively using the Calypso module in a project?

For your two cases:

  1. That's how the system is supposed to work. The LTSID must be respected, even if it doesn't exist - it also might've been deleted in the meantime
  2. As you point out, the calypso/service.go returns an error if it cannot find the LTSID
nkcr commented

No not really, but we are porting some of it to Dela, which is how I came to discover this bug.

Cool - looking forward to it! Don't forget to ask us to run a node if you decide to have a long-time DELA network running!