Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable Length Instructions vs Fixed length Instructions for Stoffel VM #46

Open
Mikerah opened this issue Jul 10, 2022 · 1 comment
Open

Comments

@Mikerah
Copy link
Contributor

Mikerah commented Jul 10, 2022

Currently, a mixture of design decisions from both MP-SPDZ and SCALE-MAMBA are being used to design the StoffelMPC VM implementation. However, it is clear that this results in a bit of a clunky design due to the use of variable length instructions. The issues that can be resolved with using fixed length instructions as opposed to variable length instructions are the following:

  • More readable bytecode. If an instruction takes a lot of parameters, then in the readable assembly format, it would result in this instruction taking up lot of space
  • Easier to implement. The instruction struct no longer needs an equivalent start (see here and here) variable to keep track of all of these variable length parameters
  • Constant time lookups and corresponding constant time answers for finding the ith instruction. This would be linear with variable length instructions
    The main con that comes from fixed length instructions is that now we may need to increase the instruction set a bit to better handle certain needs (e.g. handling triples). However, I suspect that this could easily be rectified with vectorization
@Mikerah
Copy link
Contributor Author

Mikerah commented Jul 17, 2022

After some more thought, another advantage of variable length instructions is that we can minimize the number of rounds needed for communication (see https://eprint.iacr.org/2013/143.pdf). Perhaps, a better design strategy would be to have fixed length instructions for all the instructions that can be performed locally and then have variable length instructions for those that require communication.

@Mikerah Mikerah changed the title Turn all variable length instructions into fixed length instructions Variable Length Instructions vs Fixed length Instructions for Stoffel VM Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant