https://github.com/web3p/tinysmpc
tinysmpc in php
https://github.com/web3p/tinysmpc
Last synced: 12 months ago
JSON representation
tinysmpc in php
- Host: GitHub
- URL: https://github.com/web3p/tinysmpc
- Owner: web3p
- Created: 2023-09-05T05:48:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-17T09:29:36.000Z (almost 3 years ago)
- Last Synced: 2025-07-06T10:02:38.279Z (12 months ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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...