tno.mpc.mpyc.exponentiation
TNO PET Lab - secure Multi-Party Computation (MPC) - MPyC - Secure Exponentiation
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.7%) to scientific vocabulary
Keywords
Repository
TNO PET Lab - secure Multi-Party Computation (MPC) - MPyC - Secure Exponentiation
Basic Info
- Host: GitHub
- Owner: TNO-MPC
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://docs.pet.tno.nl/mpc/mpyc/exponentiation
- Size: 23.4 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
TNO MPC Lab - MPyC - Secure Exponentiation
The TNO MPC lab consists of generic software components, procedures, and functionalities developed and maintained on a regular basis to facilitate and aid in the development of MPC solutions. The lab is a cross-project initiative allowing us to integrate and reuse previously developed MPC functionalities to boost the development of new protocols and solutions.
The package tno.mpc.mpyc.exponentiation is part of the TNO Python Toolbox.
The package contains a generic extension to MPyC that allows you to securely compute $a^{[x]}$, where $a$ is a non-negative, plain-text base (floating point or integer) and $x$ is a secure number (SecFxp or SecInt).
Limitations in (end-)use: the content of this software package may solely be used for applications that comply with international export control laws.
This implementation of cryptographic software has not been audited. Use at your own risk.
Documentation
Documentation of the tno.mpc.mpyc.exponentiation package can be found here.
Install
Easily install the tno.mpc.mpyc.exponentiation package using pip:
console
$ python -m pip install tno.mpc.mpyc.exponentiation
Note:
A significant performance improvement can be achieved by installing the GMPY2 library.
console
$ python -m pip install 'tno.mpc.mpyc.exponentiation[gmpy]'
If you wish to run the tests you can use:
console
$ python -m pip install 'tno.mpc.mpyc.exponentiation[tests]'
Usage
Minimal example
example.py```python import mathfrom mpyc.runtime import mpc
from tno.mpc.mpyc.exponentiation import secure_pow
async def main(base=math.e, x=[-1.5, 2.3, 4.5]): async with mpc: stype = mpc.SecFxp() secx = ( [stype(xx, integral=False) for xx in x] if isinstance(x, list) else stype(x) ) result = securepow(base, secx) revealedresult = await mpc.output(result) plainresult = [base ** xx for xx in x] if isinstance(x, list) else base ** x print(f"Result of secure exponentiation is {revealedresult}") print(f"In the plain we would have gotten {plainresult}") diff = ( [abs(sec - plain) for sec, plain in zip(revealedresult, plainresult)] if isinstance(x, list) else abs(revealedresult - plain_result) ) print(f"The absolute difference is {diff}")
if name == "main": mpc.run(main()) ```
Owner
- Name: TNO - MPC Lab
- Login: TNO-MPC
- Kind: organization
- Email: mpclab@tno.nl
- Location: Anna van Buerenplein 1, 2595 DA Den Haag, The Netherlands
- Website: https://mpc.tno.nl
- Repositories: 19
- Profile: https://github.com/TNO-MPC
TNO - MPC Lab
Citation (CITATION.cff)
cff-version: 1.2.0
license: Apache-2.0
message: If you use this software, please cite it using these metadata.
authors:
- name: TNO MPC Lab
city: The Hague
country: NL
email: mpclab@tno.nl
website: https://mpc.tno.nl
type: software
url: https://mpc.tno.nl
contact:
- name: TNO MPC Lab
city: The Hague
country: NL
email: mpclab@tno.nl
website: https://mpc.tno.nl
repository-code: https://github.com/TNO-MPC/mpyc.exponentiation
repository-artifact: https://pypi.org/project/tno.mpc.mpyc.exponentiation
title: TNO MPC Lab - MPyC - Exponentiation
version: v1.6.2
date-released: 2021-12-28
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 56 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: tno.mpc.mpyc.exponentiation
A generic extension to MPyC that allows you to securely compute a^[x], where a is a non-negative, plain-text base (floating point or integer) and x is a secure number (SecFxp or SecInt)
- Homepage: https://mpc.tno.nl/
- Documentation: https://docs.mpc.tno.nl/mpyc/exponentiation/1.6.2
- License: Apache License, Version 2.0
-
Latest release: 1.6.2
published about 4 years ago