{"id":42521448,"url":"https://github.com/confy-security/confy-addons","last_synced_at":"2026-01-28T15:19:50.958Z","repository":{"id":308910224,"uuid":"1034584507","full_name":"confy-security/confy-addons","owner":"confy-security","description":"Implementation of symmetric and asymmetric encryption with AES and RSA algorithms for client applications of the Confy communication system","archived":false,"fork":false,"pushed_at":"2026-01-24T11:18:38.000Z","size":253,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-24T22:09:53.726Z","etag":null,"topics":["aes","base64","confy","cryptography","decryption","encryption","privacy","rsa","security"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/confy-addons","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/confy-security.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-08T16:19:52.000Z","updated_at":"2026-01-24T11:18:35.000Z","dependencies_parsed_at":"2025-10-21T08:15:46.322Z","dependency_job_id":null,"html_url":"https://github.com/confy-security/confy-addons","commit_stats":null,"previous_names":["confy-security/confy-addons"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/confy-security/confy-addons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confy-security%2Fconfy-addons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confy-security%2Fconfy-addons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confy-security%2Fconfy-addons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confy-security%2Fconfy-addons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/confy-security","download_url":"https://codeload.github.com/confy-security/confy-addons/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confy-security%2Fconfy-addons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","base64","confy","cryptography","decryption","encryption","privacy","rsa","security"],"created_at":"2026-01-28T15:19:50.894Z","updated_at":"2026-01-28T15:19:50.944Z","avatar_url":"https://github.com/confy-security.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003ca href=\"https://github.com/confy-security/confy-addons\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n    \u003cpicture\u003e\n      \u003cimg width=\"80\" src=\"https://github.com/user-attachments/assets/d95cfc93-8a78-4545-a9ba-ba6b9000795b\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  Confy Addons\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eImplementation of symmetric and asymmetric encryption with AES and RSA algorithms for client applications of the Confy communication system.\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Test](https://github.com/confy-security/confy-addons/actions/workflows/test.yml/badge.svg)](https://github.com/confy-security/confy-addons/actions/workflows/test.yml)\n[![Coverage](https://coverage-badge.samuelcolvin.workers.dev/confy-security/confy-addons.svg)](https://coverage-badge.samuelcolvin.workers.dev/redirect/confy-security/confy-addons)\n[![PyPI - Version](https://img.shields.io/pypi/v/confy-addons?color=blue)](https://pypi.org/project/confy-addons/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/confy-addons)](https://pypi.org/project/confy-addons/)\n[![GitHub License](https://img.shields.io/github/license/confy-security/confy-addons?color=blue)](/LICENSE)\n[![Visitors](https://api.visitorbadge.io/api/visitors?path=confy-security%2Fconfy-addons\u0026label=repository%20visits\u0026countColor=%231182c3\u0026style=flat)](https://github.com/confy-security/confy-addons)\n  \n\u003c/div\u003e\n\n---\n\nA Python package that provides symmetric and asymmetric encryption functions for client applications of the Confy encrypted communication system, as well as prefixes that identify messages and encryption keys sent by applications during the handshake process. The package also includes functions to encode and decode the public RSA key to `base64` for sending over the network.\n\nLearn more about the project at [github.com/confy-security](https://github.com/confy-security)\n\nMade with dedication by students from Brazil 🇧🇷.\n\n## ⚡ Using\n\n### Install the package\n\nInstall the package with the package manager used in your project.\n\nFor example, with pip:\n\n```shell\npip install confy-addons\n```\n\nOr with Poetry:\n\n```shell\npoetry add confy-addons\n```\n\n### Usage example\n\n#### Import the necessary classes\n\n```python\nfrom confy_addons import (\n    AESEncryption,\n    RSAEncryption,\n    RSAPublicEncryption,\n    deserialize_public_key,\n)\n```\n\nThis imports all the encryption classes and utilities needed for RSA and AES operations.\n\n#### Generate an RSA key pair\n\n```python\nrsa_handler = RSAEncryption()\nprivate_key = rsa_handler.private_key\n```\n\nCreates a new RSA encryption handler that automatically generates a 4096-bit key pair. The private key is extracted for later decryption operations.\n\n#### Serialize and share the public key\n\n```python\npub_key_b64 = rsa_handler.base64_public_key\ndeserialized_pub_key = deserialize_public_key(pub_key_b64)\n```\n\nThe public key is serialized to a base64-encoded PEM format, which can be safely transmitted over text-based protocols. The deserialized version is reconstructed from the encoded string for encryption operations.\n\n#### Create an RSA public encryption handler\n\n```python\nrsa_public_handler = RSAPublicEncryption(key=deserialized_pub_key)\n```\n\nInitializes an RSA encryption handler using only the public key. This handler can encrypt data that only the holder of the private key can decrypt.\n\n#### Generate and encrypt an AES key\n\n```python\naes_handler = AESEncryption()\nencrypted_aes_key = rsa_public_handler.encrypt(aes_handler.key)\n```\n\nGenerates a random 256-bit AES key and encrypts it using RSA public key encryption. This allows secure transmission of the symmetric key to the recipient.\n\n#### Decrypt the AES key with the RSA private key\n\n```python\ndecrypted_aes_key = rsa_handler.decrypt(encrypted_aes_key)\naes_handler_decrypted = AESEncryption(key=decrypted_aes_key)\n```\n\nDecrypts the AES key using the RSA private key. A new AES handler is created with the decrypted key for symmetric encryption and decryption operations.\n\n#### Encrypt and decrypt messages with AES\n\n```python\nsecret_message = \"Secret message\"\nencrypted_message = aes_handler.encrypt(secret_message)\ndecrypted_message = aes_handler_decrypted.decrypt(encrypted_message)\nprint(decrypted_message)\n```\n\nEncrypts a plaintext message using AES-256 in CFB mode and then decrypts it back to verify the process works correctly. The output will display the original secret message.\n\n## Dependencies\n\nConfy Addons relies only on [`cryptography`](https://cryptography.io/).\n\n## Contributing\n\nIf you would like to contribute to the project, see more information at [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nConfy Addons is open source software licensed under the [GPL-3.0](https://github.com/confy-security/confy-addons/blob/main/LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfy-security%2Fconfy-addons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfy-security%2Fconfy-addons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfy-security%2Fconfy-addons/lists"}