https://github.com/crocs-muni/dissect

Distinguisher of Standard & Simulated Elliptic Curves via Traits.

https://github.com/crocs-muni/dissect

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.1%) to scientific vocabulary

Keywords

africacrypt-2022 elliptic-curve-cryptography standards
Last synced: 6 months ago · JSON representation

Repository

Distinguisher of Standard & Simulated Elliptic Curves via Traits.

Basic Info
Statistics
  • Stars: 14
  • Watchers: 6
  • Forks: 5
  • Open Issues: 0
  • Releases: 0
Topics
africacrypt-2022 elliptic-curve-cryptography standards
Created about 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

DiSSECT: Distinguisher of Standard & Simulated Elliptic Curves via Traits

License: MIT language traits Open in Colab

DiSSECT is, to the best of our knowledge, the largest publicly available database of standardized elliptic curves (taken from our sister project) and offers generation of simulated curves according to the mentioned standards. The tool contains over 20 tests (which we call traits), each computing curve properties, ranging from classical algebraic ones to unconventional ones and those connected to implementations. After obtaining their empirical distributions, the traits allow us to compare the simulated curves to the standard ones. Finally, DiSSECT provides an easy-to-use interface for implementations of custom traits and their interactive visualization via Jupyter notebook.

DiSSECT is written in Python 3 and imports the SageMath library. The database of the standardized elliptic curves as well as the simulated ones with the results of the traits, including the visualization, can be found at https://dissect.crocs.fi.muni.cz/. DiSSECT is open-source and we welcome any collaborators who have an idea for a new trait, new simulation method, or just want to contribute in another way.

Authors

  • Vladimír Sedláček
  • Vojtěch Suchánek
  • Antonín Dufka

Thanks to Ján Jančár for help with the curve database and CRoCS members for fruitful discussions. Computational resources were supplied by the project "e-Infrastruktura CZ" (e-INFRA LM2018140) provided within the program Projects of Large Research, Development and Innovations Infrastructures.

Installation

We recommend to use DiSSECT in Docker, as it avoids potential issues on the boundary of Sage and Python environments. If you still want to run DiSSECT locally, see the Local setup section.

Docker container

To run the analysis notebook in a container, use the following command and access the provided link in your web browser.

shell docker run -it -p 8888:8888 crocsmuni/dissect

To use advanced components of DiSSECT, access the container directly:

shell docker run -it crocsmuni/dissect bash

Local setup

Full (requires sage)

If you plan on computing traits, you need to perform full instalation of DiSSECT using Sage.

shell git clone --recurse-submodules https://github.com/crocs-muni/DiSSECT.git cd DiSSECT sage --python3 -m venv --system-site-packages venv source venv/bin/activate pip install . python -m ipykernel install --user --name=venv jupyter notebook dissect/analysis/playground.ipynb

Analysis-only

If you only need to access DiSSECT database, inspect the data, and perform analyses, Python-based installation will suffice.

shell git clone --recurse-submodules https://github.com/crocs-muni/DiSSECT.git cd DiSSECT python -m venv venv source venv/bin/activate pip install . python -m ipykernel install --user --name=venv jupyter notebook dissect/analysis/playground.ipynb

Commands

To run these commands, you need a working installation of DiSSECT – either in an interactive container or a local one. If you plan to share files between host and the docker container, you may want to use a bind mount (e.g., --mount type=bind,src=/tmp/dissect,dst=/data).

Computing traits

DiSSECT provides two ways of computing traits: a simple one suitable for working with just JSON files, and more complex one that supports parallelization but requires database, intended mainly for large-scale trait computation.

To compute traits on a JSON of curves, use: shell dissect-compute-json -t TRAIT_NAME -i CURVES_JSON [-o OUTPUT_JSON]

To compute traits with database, use: shell dissect-compute-db -t TRAIT_NAME --database DATABASE_URL By default, the command uses all available curves. You can filter them using optional arguments, see the help menu (-h).

Performing the analysis

To run analysis notebook, use the following command and select the venv kernel. jupyter notebook dissect/analysis/playground.ipynb Alternatively, you may try using the notebook directly in your browser using Colab.

Automated analysis

In order to run automated analysis of trait results, feature vectors need to be constructed. They can be built from results of individual traits using repeated invocations of dissect-feature_builder. For example, the following sequence of commands builds set of feature vectors of torsion_extension and small_prime_order traits for 256-bit curves from the standard and simulated X9.62 categories. shell dissect-feature_builder --trait torsion_extension --category x962 x962_sim --bits 256 --input features.csv --output features.csv dissect-feature_builder --trait small_prime_order --category x962 x962_sim --bits 256 --input features.csv --output features.csv By default, this command uses a dataset available from our database, but you may supply a different source using the --source option (url to a database).

The feature vectors output by the previous commands can be processed by the outlier detection script: shell dissect-feature_outliers features.csv outliers.csv

If the outlier detection gave an interesting output, you may inspect features of a particular curve with: shell dissect-feature_detail features.csv CURVE_NAME

Another approach to automated analysis implemented in DiSSECT is clustering. Clustering requires feature vectors curves of two distinct categories and running feature_builder with --keep-category option. Then, it can be run as: shell dissect-feature_clusters features.csv outliers.csv

Database

Command dissect-database provides a simple interface for import/export of database data. To use this command you have to provide database URL which should be a string in format "mongodb://USERNAME:PASSWORD@HOST/" (e.g., "mongodb://root:password@mongo:27017/) and select whether you want to import or export data.

Curves can be imported from a JSON file with the following command: shell dissect-database [DATABASE_URL] import -i <CURVE_JSON>

Trait results can be imported using the same command, but the file name has to start with trait_ prefix, for example, trait_cofactor.json: shell dissect-database [DATABASE_URL] import -i <TRAIT_RESULTS_JSON>

To export curves, use: shell dissect-database [DATABASE_URL] export --no-traits -o <CURVE_JSON>

To export a selected trait results, use: shell dissect-database [DATABASE_URL] export --no-curves --trait <TRAIT_NAME> -o <TRAIT_RESULTS_JSON>

All records in the database can be exported and imported using the following commands. shell dissect-database [DATABASE_URL] export [-o <DATABASE_TAR>] dissect-database [DATABASE_URL] import [-i <DATABASE_TAR>]

Owner

  • Name: CRoCS
  • Login: crocs-muni
  • Kind: organization
  • Location: Faculty of Informatics, Masaryk University, Brno

Centre for Research on Cryptography and Security

GitHub Events

Total
  • Issues event: 1
  • Watch event: 4
  • Issue comment event: 2
Last Year
  • Issues event: 1
  • Watch event: 4
  • Issue comment event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • garlonicon (1)
Pull Request Authors
  • dependabot[bot] (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2)

Dependencies

.github/workflows/docker.yml actions
  • docker/build-push-action v4 composite
  • docker/login-action v2 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
Dockerfile docker
  • sagemath/sagemath 9.8 build
pyproject.toml pypi
  • nbformat >=4.2.0
  • pandas ==2.0.3
  • pathlib ==1.0.1
  • plotly ==5.15.0
  • pymongo ==4.6.3
  • scikit-learn ==1.3.0