# crypto-condor
<img align="right" src="crypto-condor.png" width="250" alt="The logo of crypto-condor, depicting a condor holding a key.">
crypto-condor is a tool for compliance testing of cryptographic primitives, in
the form of a Python library and CLI. It is complemented by an extensive
documentation, featuring guides on the primitives supported.
**Q: What is a cryptographic primitive?**
**A**: A low-level cryptographic algorithm, generally used to build a protocol.
For example, AES is an encryption primitive that is used in the TLS protocol,
which is the protocol your browser used to securely get this page.
**Q: What is compliance testing?**
**A**: Algorithms are described in specifications, such as FIPS publications or
RFCs. When implementing these algorithms, we want to ensure that they comply
with the specification, i.e. the implementation behaves as the algorithm
described.
**Q: How to test for compliance then?**
**A**: We can use *test vectors*, which are sets of inputs and their
corresponding outputs. For example, encrypting with AES is a deterministic
operation: for a given key and message, AES will always return the same
ciphertext. So we can choose some input values, run the algorithm, and record
the value returned. All implementations of AES are then expected to return the
*same* ciphertext for this given key and message. If it does not, then it is not
compliant.
**Q: And so, what does crypto-condor do?**
**A**: crypto-condor provides both a nice Python API and a wrapper system to
test implementations with sets of test vectors that come from sources such as
the [NIST
CAVP](https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program).
The Python API exposes test functions that take an implementation as input, in
the form of a Python function or class, passes the inputs defined by the test
vectors to that implementation, and checks if the outputs are those defined by
the vectors.
The wrappers are small programs that already define the function prototype. The
user calls the implementation to test inside this function, and crypto-condor
runs it with the test vectors as with the Python API.
And it comes with a documentation, wrapper examples, and guides on supported
primitives.
## Requirements
crypto-condor requires **Python 3.10+**. For information, it is developed using
Python 3.12 on Fedora 39.
The implementations of **AES, Kyber, Dilithium, and TestU01** are written in C
and are compiled directly on the user's machine. As such, they require a C
compiler and GNU Make. These primitives are only compiled when required, and not
when installing the package:
- AES: when testing the output of an implementation using classic modes of
operation (not CCM or GCM).
- Kyber: when testing the output of an implementation **or** when using test
vectors on the `encapsulate` function.
- Dilithium: when testing the output of an implementation.
- TestU01: when used to test a file.
## Installation
It is available on PyPI:
```bash
python -m pip install crypto-condor
```
An up-to-date list of the requirements can be found in the
`[tool.poetry.dependencies]` section of the
[pyproject.toml](https://github.com/quarkslab/crypto-condor/blob/main/pyproject.toml)
file.
## Usage
> The documentation is available at
> <https://quarkslab.github.io/crypto-condor/latest/index.html>.
Once installed, the CLI is available as `crypto-condor-cli`. It is structured in
commands, similar to Git. Run it without arguments or with `--help` to display
the help message detailing the available subcommands. You can check [the
documentation](https://quarkslab.github.io/crypto-condor/latest/index.html) for
a quick rundown of all the commands.
As for the Python library, it is available as `crypto_condor` (note the
underscore). Each primitive has its own module under `primitives`, e.g.
`crypto_condor.primitives.AES`. It contains the functions used to test
implementations.
## Development
See
[CONTRIBUTING](https://github.com/quarkslab/crypto-condor/blob/main/CONTRIBUTING.md).
## Changelog and versioning
A [changelog](https://github.com/quarkslab/crypto-condor/blob/main/CHANGELOG.md)
is available. This projects adheres to [CalVer](https://calver.org/). The format
used is YYYY.MM.DD\[.MICRO\]\[-MODIFIER\]:
- YYYY: full year (2023).
- 0M: zero-padded month (01, 02, ..., 12).
- 0D: zero-padded day (01, 02, ..., 31).
- MICRO: an increasing counter, used for patches published in the same day.
- MODIFIER: usually `rc<n>` to indicate a release candidate.
## Authors
- Julio Loayza Meneses, Quarkslab.
- Angèle Bossuat, Quarkslab.
- Dahmun Goudarzi, Quarkslab.
Logo idea by Robin David, drawing by Irene Loayza.
## License
[Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0), see
[LICENSE](https://github.com/quarkslab/crypto-condor/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "crypto-condor",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "cryptography, compliance",
"author": "Julio Loayza Meneses",
"author_email": "jloayzameneses@quarkslab.com",
"download_url": "https://files.pythonhosted.org/packages/e0/21/0ffe469055cad54fbf6c58c164c4c0516c277325196d32bad969b12e777b/crypto_condor-2025.1.19.tar.gz",
"platform": null,
"description": "# crypto-condor\n\n<img align=\"right\" src=\"crypto-condor.png\" width=\"250\" alt=\"The logo of crypto-condor, depicting a condor holding a key.\">\n\ncrypto-condor is a tool for compliance testing of cryptographic primitives, in\nthe form of a Python library and CLI. It is complemented by an extensive\ndocumentation, featuring guides on the primitives supported.\n\n**Q: What is a cryptographic primitive?**\n\n**A**: A low-level cryptographic algorithm, generally used to build a protocol.\nFor example, AES is an encryption primitive that is used in the TLS protocol,\nwhich is the protocol your browser used to securely get this page.\n\n**Q: What is compliance testing?**\n\n**A**: Algorithms are described in specifications, such as FIPS publications or\nRFCs. When implementing these algorithms, we want to ensure that they comply\nwith the specification, i.e. the implementation behaves as the algorithm\ndescribed.\n\n**Q: How to test for compliance then?**\n\n**A**: We can use *test vectors*, which are sets of inputs and their\ncorresponding outputs. For example, encrypting with AES is a deterministic\noperation: for a given key and message, AES will always return the same\nciphertext. So we can choose some input values, run the algorithm, and record\nthe value returned. All implementations of AES are then expected to return the\n*same* ciphertext for this given key and message. If it does not, then it is not\ncompliant.\n\n**Q: And so, what does crypto-condor do?**\n\n**A**: crypto-condor provides both a nice Python API and a wrapper system to\ntest implementations with sets of test vectors that come from sources such as\nthe [NIST\nCAVP](https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program).\n\nThe Python API exposes test functions that take an implementation as input, in\nthe form of a Python function or class, passes the inputs defined by the test\nvectors to that implementation, and checks if the outputs are those defined by\nthe vectors.\n\nThe wrappers are small programs that already define the function prototype. The\nuser calls the implementation to test inside this function, and crypto-condor\nruns it with the test vectors as with the Python API.\n\nAnd it comes with a documentation, wrapper examples, and guides on supported\nprimitives.\n\n## Requirements\n\ncrypto-condor requires **Python 3.10+**. For information, it is developed using\nPython 3.12 on Fedora 39.\n\nThe implementations of **AES, Kyber, Dilithium, and TestU01** are written in C\nand are compiled directly on the user's machine. As such, they require a C\ncompiler and GNU Make. These primitives are only compiled when required, and not\nwhen installing the package:\n\n- AES: when testing the output of an implementation using classic modes of\noperation (not CCM or GCM).\n- Kyber: when testing the output of an implementation **or** when using test\nvectors on the `encapsulate` function.\n- Dilithium: when testing the output of an implementation.\n- TestU01: when used to test a file.\n\n## Installation\n\nIt is available on PyPI:\n\n```bash\npython -m pip install crypto-condor\n```\n\nAn up-to-date list of the requirements can be found in the\n`[tool.poetry.dependencies]` section of the\n[pyproject.toml](https://github.com/quarkslab/crypto-condor/blob/main/pyproject.toml)\nfile.\n\n## Usage\n\n> The documentation is available at\n> <https://quarkslab.github.io/crypto-condor/latest/index.html>.\n\nOnce installed, the CLI is available as `crypto-condor-cli`. It is structured in\ncommands, similar to Git. Run it without arguments or with `--help` to display\nthe help message detailing the available subcommands. You can check [the\ndocumentation](https://quarkslab.github.io/crypto-condor/latest/index.html) for\na quick rundown of all the commands.\n\nAs for the Python library, it is available as `crypto_condor` (note the\nunderscore). Each primitive has its own module under `primitives`, e.g.\n`crypto_condor.primitives.AES`. It contains the functions used to test\nimplementations.\n\n## Development\n\nSee\n[CONTRIBUTING](https://github.com/quarkslab/crypto-condor/blob/main/CONTRIBUTING.md).\n\n## Changelog and versioning\n\nA [changelog](https://github.com/quarkslab/crypto-condor/blob/main/CHANGELOG.md)\nis available. This projects adheres to [CalVer](https://calver.org/). The format\nused is YYYY.MM.DD\\[.MICRO\\]\\[-MODIFIER\\]:\n\n- YYYY: full year (2023).\n- 0M: zero-padded month (01, 02, ..., 12).\n- 0D: zero-padded day (01, 02, ..., 31).\n- MICRO: an increasing counter, used for patches published in the same day.\n- MODIFIER: usually `rc<n>` to indicate a release candidate.\n\n## Authors\n\n- Julio Loayza Meneses, Quarkslab.\n- Ang\u00e8le Bossuat, Quarkslab.\n- Dahmun Goudarzi, Quarkslab.\n\nLogo idea by Robin David, drawing by Irene Loayza.\n\n## License\n\n[Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0), see\n[LICENSE](https://github.com/quarkslab/crypto-condor/blob/main/LICENSE).\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Compliance testing for implementations of cryptographic primitives",
"version": "2025.1.19",
"project_urls": {
"Documentation": "https://quarkslab.github.io/crypto-condor/latest/index.html",
"Homepage": "https://github.com/quarkslab/crypto-condor",
"Repository": "https://github.com/quarkslab/crypto-condor"
},
"split_keywords": [
"cryptography",
" compliance"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "690a4f1b24724ebbb883277353209e580bce50afd59c67996750d4e8db5245dc",
"md5": "81d2e66c258b806f15bc288e9e4d1b38",
"sha256": "6c6eee569c09bbcfbe943e2f5b3eba263e5ad2537d15d439159c12f24c781af2"
},
"downloads": -1,
"filename": "crypto_condor-2025.1.19-py3-none-any.whl",
"has_sig": false,
"md5_digest": "81d2e66c258b806f15bc288e9e4d1b38",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 8978390,
"upload_time": "2025-01-24T14:13:22",
"upload_time_iso_8601": "2025-01-24T14:13:22.358690Z",
"url": "https://files.pythonhosted.org/packages/69/0a/4f1b24724ebbb883277353209e580bce50afd59c67996750d4e8db5245dc/crypto_condor-2025.1.19-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e0210ffe469055cad54fbf6c58c164c4c0516c277325196d32bad969b12e777b",
"md5": "0f23e1a302cfffa5b6ec748d5fd90323",
"sha256": "728f6958b1f3e027b2c02d43276a4168e48044b2209b03f3def78221d91ff0d4"
},
"downloads": -1,
"filename": "crypto_condor-2025.1.19.tar.gz",
"has_sig": false,
"md5_digest": "0f23e1a302cfffa5b6ec748d5fd90323",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 72300017,
"upload_time": "2025-01-24T14:13:30",
"upload_time_iso_8601": "2025-01-24T14:13:30.829485Z",
"url": "https://files.pythonhosted.org/packages/e0/21/0ffe469055cad54fbf6c58c164c4c0516c277325196d32bad969b12e777b/crypto_condor-2025.1.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-24 14:13:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "quarkslab",
"github_project": "crypto-condor",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "crypto-condor"
}