Parts of curve25519-dalek split across multiple instructions for usage on-chain before crypto syscall primitives are implemented.
The only currently supported operations are decompression and multi-scalar multiplication. These are also implemented in a way that is fairly specific to the original intended use case of checking ciphertext-ciphertext equality under elgamal encryption.
Roughly speaking, usage steps are
- Write a 'DSL' list of
N
instructions in bufferA
- Write inputs into buffer
B
- Initialize compute buffer
C
that points toA
andB
- Calling the
CrankCompute
operation withA
,B
,C
as inputs