An open API service indexing awesome lists of open source software.

https://github.com/web3p/tinysmpc

tinysmpc in php
https://github.com/web3p/tinysmpc

Last synced: 12 months ago
JSON representation

tinysmpc in php

Awesome Lists containing this project

README

          

# tinysmpc
tinysmpc in php, source: https://github.com/kennysong/tinysmpc

# usage

```
share([$vm_a, $vm_b, $vm_c]);
$shared_b = $b->share([$vm_a, $vm_b, $vm_c]);
$shared_c = $c->share([$vm_a, $vm_b, $vm_c]);

$output = $shared_a->add($shared_b)->sub($shared_c);

var_dump($shared_a->reconstruct($vm_a)->value, $shared_b->reconstruct($vm_b)->value, $shared_c->reconstruct($vm_c)->value);
var_dump($output->reconstruct($vm_a)->value, $output->reconstruct($vm_b)->value, $output->reconstruct($vm_c)->value);
```

# todo

- [ ] prime size Q
- [ ] multiplication
- [ ] comparason
- [ ] divide
- [ ] orhers...