tno.mpc.encryption-schemes.shamir

TNO PET Lab - secure Multi-Party Computation (MPC) - Encryption Schemes - Shamir

https://github.com/tno-mpc/encryption_schemes.shamir

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
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

mpc mpc-lab multi-party-computation pet-lab shamir shamir-secret-sharing tno
Last synced: 6 months ago · JSON representation ·

Repository

TNO PET Lab - secure Multi-Party Computation (MPC) - Encryption Schemes - Shamir

Basic Info
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
mpc mpc-lab multi-party-computation pet-lab shamir shamir-secret-sharing tno
Created about 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

TNO PET Lab - secure Multi-Party Computation (MPC) - Encryption Schemes - Shamir

Implementation of the Shamir Secret Sharing scheme.

PET Lab

The TNO PET Lab consists of generic software components, procedures, and functionalities developed and maintained on a regular basis to facilitate and aid in the development of PET solutions. The lab is a cross-project initiative allowing us to integrate and reuse previously developed PET functionalities to boost the development of new protocols and solutions.

The package tno.mpc.encryption_schemes.shamir is part of the TNO Python Toolbox.

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.encryption_schemes.shamir package can be found here.

Install

Easily install the tno.mpc.encryption_schemes.shamir package using pip:

console $ python -m pip install tno.mpc.encryption_schemes.shamir

Note: If you are cloning the repository and wish to edit the source code, be sure to install the package in editable mode:

console $ python -m pip install -e 'tno.mpc.encryption_schemes.shamir'

If you wish to run the tests you can use:

console $ python -m pip install 'tno.mpc.encryption_schemes.shamir[tests]' Note: A significant performance improvement can be achieved by installing the GMPY2 library.

console $ python -m pip install 'tno.mpc.encryption_schemes.shamir[gmpy]'

Usage

The shamir secret sharing module can be used as follows:

```python from tno.mpc.encryption_schemes.shamir import ShamirSecretSharingScheme, ShamirShares

Initialize a three-out-of-five secrect sharing scheme with prime 10657

Note: the polynomial degree is one less than the number of parties needed for reconstruction

shamir_scheme = ShamirSecretSharingScheme(10657, 5, 2)

Share a secret integer

sharing = shamirscheme.sharesecret(42)

When receiving shares a reconstructor can be created as follows

reconstructor = ShamirShares( shamir_scheme, {1: sharing.shares[1], 2: sharing.shares[2], 3: sharing.shares[3]} )

Reconstruct the secret and check if it is the expected result

assert 42 == sharing.reconstructsecret() == reconstructor.reconstructsecret() For the performance it is important to bear in mind the following information: Both `ShamirSecretSharingScheme` and `ShamirSecretSharingIntegers` make use of a VanderMonde matrix when sharing a secret. The size of this matrix grows exponentially with the number of parties. This matrix is constructed on-the-fly, which means that the first time the property `van_der_monde` is called, this matrix is constructed. This generally happens during the `secret_share` operation. If you would like to initialize this in an earlier stage, you can put the following piece of code wherever you want the initialization to take place: `python

scheme is initialized

scheme = ShamirSecretSharingScheme(...)

VanderMonde matrix is initialized

_ = scheme.vandermonde ````

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

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 PET Lab
    city: The Hague
    country: NL
    email: petlab@tno.nl
    website: https://pet.tno.nl
type: software
url: https://pet.tno.nl
contact:
  - name: TNO PET Lab
    city: The Hague
    country: NL
    email: petlab@tno.nl
    website: https://pet.tno.nl
repository-code: https://github.com/TNO-MPC/encryption_schemes.shamir
repository-artifact: https://pypi.org/project/tno.mpc.encryption_schemes.shamir
title: TNO PET Lab - secure Multi-Party Computation (MPC) - Encryption Schemes - Shamir
version: 1.3.2
date-released: 2024-11-29

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 2
  • Total Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Thomas Rooijakkers t****s@t****l 2
Committer Domains (Top 20 + Academic)
tno.nl: 1

Issues and Pull Requests

Last synced: 9 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: 1
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: tno.mpc.encryption-schemes.shamir

Implementation of Shamir secret sharing

  • Versions: 3
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 56 Last month
Rankings
Dependent packages count: 2.9%
Forks count: 30.5%
Average: 30.6%
Dependent repos count: 30.6%
Stargazers count: 39.1%
Downloads: 49.8%
Maintainers (1)
Last synced: 7 months ago

Dependencies

pyproject.toml pypi
  • sympy *
  • tno.mpc.communication ~=4.0
  • tno.mpc.encryption_schemes.utils >=0.8.0