Skip to main content
This is `opencce`, a small application that replicates part of the functionality
provided by the [CCE (Citizen Card Encrypted)](https://joinup.ec.europa.eu/software/cce/description) software by [A-SIT](https://www.a-sit.at/).

## How `opencce` differs…
* `opencce` is written in Python and uses only widely available libraries including `openssl`.
* `opencce` is Open Source. Please feel free to look at the code.
* `opencce` **cannot** currently use your Citizen Card (_ecard_) to perform cryptographic operations.
* `opencce` **can** be used as a library or through its command-line interface.

However, as far as I can tell, `opencce` is able to decrypt containers produced by the original software. It also produces files that are fully compatible with the original. **If you encounter a case where this is not true, please file an issue!**

### Dependencies
* [python](http://python.org) (>= 2.7)
* [python-m2crypto](https://github.com/martinpaljak/M2Crypto)
* [lxml](http://lxml.de)
* [python-magic](https://github.com/ahupp/python-magic) (optional)

### About python3
The main blocker for getting python3 compatibility is `m2crypto`.

### Installation
Get the latest version with `pip install opencce`.

### Future Plans
* Smart Card support.
* Compressed archive variant (SMIME is horrible for space efficiency).
* Install scripts, package for distributions.

### Usage
#### Encryption using `opencce`
$ opencce encrypt -c certificate.pem another_certificate.cer -- file1.txt file.pdf
Adding certificate: certificate.pem ... [OK]
Adding certificate: another_certificate.cer ... [OK]
Adding file: file1.txt ... [OK]
Adding file: file.pdf ... [OK]
Encrypting to Container.cce ... [OK]

#### Encryption using the Library
>>> from opencce.containers.CCEContainer import CCEContainer
>>> c = CCEContainer()
>>> c.add("file1.txt")
>>> c.add("file.pdf")
>>> c.add_recipient_certificate("certificate.pem")
>>> c.add_recipient_certificate("another_certificate.cer")
>>> with open("Container.cce", "wb") as fh: fh.write(c.encrypt())

#### Decryption using `opencce`
$ opencce decrypt -k key.pem -d Container Container.cce
Decrypting container: Container.cce ... [OK]
Making sure that the extraction directory is clean: . ... [OK]
Extracting file: Container/file1.txt ... [OK]
Extracting file: Container/file.pdf ... [OK]

#### Decryption using the Library
>>> from opencce.containers.CCEContainer import CCEContainer
>>> with open("Container.cce", "rb") as fh: c = CCEContainer.load(fh, "key.pem")
>>> for path, filename, handle in c.export(): # do something with those files

Metadata

Release files for opencce 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for opencce 0.2
File Interpreter ABI Platform
opencce-0.2-py2-none-any.whl Python 2 none any Details

Release files / opencce-0.2-py2-none-any.whl

Download URL opencce-0.2-py2-none-any.whl
Size 16.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
6c34fe29c5a41167889fd14b87ca7713f9d2462985fe795ac5c76556af6c70f7
BLAKE2b-256 checksum
How to use checksums
ba0014abfeb729e8510521ef40a74fcd313042e326e56283cd67b63c6debf70d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for opencce 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page