{"id":37743239,"url":"https://github.com/istommao/cryptokit","last_synced_at":"2026-01-16T14:12:48.141Z","repository":{"id":46150785,"uuid":"71613899","full_name":"istommao/cryptokit","owner":"istommao","description":"cryptokit is a cryptography kit","archived":false,"fork":false,"pushed_at":"2022-10-25T02:54:45.000Z","size":235,"stargazers_count":29,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-25T09:59:18.848Z","etag":null,"topics":["cryptography","cryptokit","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/istommao.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-22T03:18:47.000Z","updated_at":"2025-07-19T00:31:37.000Z","dependencies_parsed_at":"2022-09-23T02:31:09.954Z","dependency_job_id":null,"html_url":"https://github.com/istommao/cryptokit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/istommao/cryptokit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istommao%2Fcryptokit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istommao%2Fcryptokit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istommao%2Fcryptokit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istommao%2Fcryptokit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/istommao","download_url":"https://codeload.github.com/istommao/cryptokit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/istommao%2Fcryptokit/sbom","scorecard":{"id":496368,"data":{"date":"2025-08-11","repo":{"name":"github.com/istommao/cryptokit","commit":"a22301c6a5c231c8d2213fa61c5ff7ba367f8b0c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2021-62 / GHSA-hggm-jpg3-v476","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T20:30:21.775Z","repository_id":46150785,"created_at":"2025-08-19T20:30:21.775Z","updated_at":"2025-08-19T20:30:21.775Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["cryptography","cryptokit","python"],"created_at":"2026-01-16T14:12:47.757Z","updated_at":"2026-01-16T14:12:48.135Z","avatar_url":"https://github.com/istommao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/istommao/cryptokit.svg?branch=master)](https://travis-ci.org/istommao/cryptokit)\n[![codecov](https://codecov.io/gh/istommao/cryptokit/branch/master/graph/badge.svg)](https://codecov.io/gh/istommao/cryptokit)\n[![PyPI](https://img.shields.io/pypi/v/cryptokit.svg)](https://pypi.python.org/pypi/cryptokit)\n[![PyPI](https://img.shields.io/pypi/pyversions/Django.svg?style=plastic)](https://pypi.python.org/pypi/cryptokit)\n\n# cryptokit\ncryptokit is a cryptography kit base on Cryptography(https://github.com/pyca/cryptography)\n\n# Document\n\nYou can find more information in the cryptokit [documentation](http://cryptokit.readthedocs.io/zh/latest/).\n\n# Feature Support\n\n- AES Cryptography\n- RSA Cryptography\n- ED25519\n- x25519 key exchange\n- HKDF\n\n# Installation\n\n```shell\npip install cryptokit\n```\n\n## AES usage\n\n```python\n\u003e\u003e\u003e from cryptokit import AESCrypto\n\u003e\u003e\u003e message = \"hello cryptokit\"\n\u003e\u003e\u003e crypto = AESCrypto('WDMG1e38igW53YuxkE0SsKUDeLbULAtL', 'm2VYHdx41zRgvg6f')\n\u003e\u003e\u003e data = crypto.encrypt(message)\n\u003e\u003e\u003e b'\\xaa\u003c\\x9d\\xe9\\xde\\x0b\\xd7\\xe9\\xfd\\xac\\xfc\\xdd\\x9f\\xe2V\\xd4'\n\u003e\u003e\u003e crypto.decrypt(data)\n\u003e\u003e\u003e 'hello cryptokit'\n```\n\n\n## RSA usage\n\n```python\n\u003e\u003e\u003e from cryptokit import RSACrypto\n\u003e\u003e\u003e private_key = RSACrypto.generate_private_key(2048)\n\u003e\u003e\u003e public_key = private_key.public_key()\n\u003e\u003e\u003e message = 'Hello cryptokit'\n\u003e\u003e\u003e ciphertext = RSACrypto.encrypt(message, public_key, algorithm='sha256')\n\u003e\u003e\u003e plaintext = RSACrypto.decrypt(ciphertext, private_key, algorithm='sha256')\n\u003e\u003e\u003e plaintext == message\nTrue\n```\n\n## PFX usage\n\n```python\n\u003e\u003e\u003e from cryptokit import load_pfx, get_pubkey_from_pfx\n\u003e\u003e\u003e pkcs12 = load_pfx(pfx_file, password='password')\n\u003e\u003e\u003e cert = pkcs12.get_certificate()\n\u003e\u003e\u003e pubkey = get_pubkey_from_pfx(pfx_file, password='password')\n# or use cert get pubkey\n\u003e\u003e\u003e pubkey = cert.get_pubkey().to_cryptography_key()\n\n\u003e\u003e\u003e from cryptokit import generate_pfx\n\u003e\u003e\u003e pfx_data = generate_pfx(cert, friendly_name, private_key)\n```\n\n## Create csr\n\n```python\nfrom cryptokit import generate_csr\nfrom cryptokit.rsa import RSACrypto\n\nprivate_key = RSACrypto.generate_private_key(2048)\npayload = {\n    'country_name': 'US',\n    'state_or_province': 'California',\n    'locality_name': 'San Francisco',\n    'org_name': 'My Company',\n    'common_name': 'mysite.com',\n    'dns_list': ['mysite.com', 'www.mysite.com', 'subdomain.mysite.com']\n}\n\ncsr_data = generate_csr(private_key, encoding='pem', algorithm='sha256', **payload)\n\nwith open('/path/to/csr.pem', 'wb') as f:\n    f.write(csr_data)\n```\n\n## ED25519\n\n*Generate key pair*\n\n```python\nfrom cryptokit import ed25519\n\n# raw Cryptography object\nprivate_key_obj, public_key_obj = ed25519.generate_ed25519_key_pair()\n\n# hex\nprivate_key_hex, public_key_hex = ed25519.generate_ed25519_key_pair(\"hex\")\n\n# base64 encode\nprivate_key_b64, public_key_b64 = ed25519.generate_ed25519_key_pair(\"base64\")\n\n# bytes\nprivate_key_bytes, public_key_bytes = ed25519.generate_ed25519_key_pair(\"bytes\")\n```\n\n\n## ED25519 key exchange\n\n```python\nfrom cryptokit import ed25519\n\nprivate_key_hex = \"private_key_hex\"\n\ntarget_public_key_hex = \"target_public_key_hex\"\n\n\nshare_secret_hex = ed25519.get_share_secret_from_hex(private_key_hex, target_public_key_hex)\n```\n\n## HKDF\n\n```python\nfrom cryptokit import hkdf\n\ndevice_key = hkdf.get_hkdf_device_key(bytes.fromhex(\"hex format string\"))\n```\n\n# ChangeLog\n\n[changelog](changelog.md)\n\n# License\n\nMIT. See [LICENSE](https://github.com/istommao/cryptokit/blob/master/LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fistommao%2Fcryptokit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fistommao%2Fcryptokit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fistommao%2Fcryptokit/lists"}