{ "info": { "author": "https://www.updateframework.com", "author_email": "theupdateframework@googlegroups.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Security", "Topic :: Software Development" ], "description": "Secure Systems Library\n----------------------\n\n.. image:: https://travis-ci.org/secure-systems-lab/securesystemslib.svg?branch=master\n :target: https://travis-ci.org/secure-systems-lab/securesystemslib\n\n.. image:: https://coveralls.io/repos/github/secure-systems-lab/securesystemslib/badge.svg?branch=master\n :target: https://coveralls.io/github/secure-systems-lab/securesystemslib?branch=master\n\n.. image:: https://pyup.io/repos/github/secure-systems-lab/securesystemslib/shield.svg\n :target: https://pyup.io/repos/github/secure-systems-lab/securesystemslib/\n :alt: Updates\n\nA library that provides cryptographic and general-purpose functions for Secure\nSystems Lab projects at NYU. The routines are general enough to be usable by\nother projects.\n\nOverview\n++++++++\n\nsecuresystemslib supports public-key and general-purpose cryptography, such as\n`ECDSA\n`_,\n`Ed25519 `_, `RSA\n`_, SHA256, SHA512, etc.\nMost of the cryptographic operations are performed by the `cryptography\n`_ and `PyNaCl\n`_ libraries, but verification of Ed25519\nsignatures can be done in pure Python.\n\nThe `cryptography` library is used to generate keys and signatures with the\nECDSA and RSA algorithms, and perform general-purpose cryptography such as\nencrypting keys. The PyNaCl library is used to generate Ed25519 keys and\nsignatures. PyNaCl is a Python binding to the Networking and Cryptography\nLibrary. For key storage, RSA keys may be stored in PEM or JSON format, and\nEd25519 keys in JSON format. Generating, importing, and loading cryptographic\nkey files can be done with functions available in securesystemslib.\n\nInstallation\n++++++++++++\n\n::\n\n $ pip install securesystemslib\n\n\nThe default installation only supports Ed25519 keys and signatures (in pure\nPython). Support for RSA, ECDSA, and E25519 via the `cryptography` and\n`PyNaCl` libraries is available by installing the `crypto` and `pynacl` extras:\n\n::\n\n $ pip install securesystemslib[crypto]\n $ pip install securesystemslib[pynacl]\n\n\nCreate RSA Keys\n~~~~~~~~~~~~~~~\n\nNote: In the instructions below, lines that start with *>>>* denote commands\nthat should be entered by the reader, *#* begins the start of a comment, and\ntext without prepended symbols is the output of a command.\n\n::\n\n >>> from securesystemslib.interface import *\n\n # The following function creates an RSA key pair, where the private key is\n # saved to \"rsa_key1\" and the public key to \"rsa_key1.pub\" (both saved to\n # the current working directory). A full directory path may be specified\n # instead of saving keys to the current working directory. If specified\n # directories do not exist, they will be created.\n >>> generate_and_write_rsa_keypair(\"rsa_key1\", bits=2048, password=\"password\")\n\n # If the key length is unspecified, it defaults to 3072 bits. A length of\n # less than 2048 bits raises an exception. A password may be supplied as an\n # argument, otherwise a user prompt is presented. If the password is an\n # empty string, the private key is saved unencrypted.\n >>> generate_and_write_rsa_keypair(\"rsa_key2\")\n Enter a password for the RSA key:\n Confirm:\n\n\nThe following four key files should now exist:\n\n1. rsa_key1\n2. rsa_key1.pub\n3. rsa_key2\n4. rsa_key2.pub\n\nImport RSA Keys\n~~~~~~~~~~~~~~~\n\n::\n\n # Continuing from the previous section . . .\n\n # Import an existing public key.\n >>> public_rsa_key1 = import_rsa_publickey_from_file(\"rsa_key1.pub\")\n\n # Import an existing private key. If your private key is encrypted,\n # which it should be, you either have to pass a 'password' or enter one\n # on the prompt.\n >>> private_rsa_key1 = import_rsa_privatekey_from_file(\"rsa_key1\", password='some passphrase\")\n OR:\n >>> private_rsa_key1 = import_rsa_privatekey_from_file(\"rsa_key1\", prompt=True)\n Enter a password for the encrypted RSA key:\n\n**import_rsa_privatekey_from_file()** raises a\n*securesystemslib.exceptions.CryptoError* exception if the key / password is\ninvalid:\n\n::\n\n securesystemslib.exceptions.CryptoError: RSA (public, private) tuple cannot\n be generated from the encrypted PEM string: Bad decrypt. Incorrect password?\n\nNote: The specific message provided by the exception might differ depending on\nwhich cryptography library is used.\n\nCreate and Import Ed25519 Keys\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n # Continuing from the previous section . . .\n\n # Generate and write an Ed25519 key pair. The private key is saved\n # encrypted. A 'password' argument may be supplied, otherwise a prompt is\n # presented.\n >>> generate_and_write_ed25519_keypair('ed25519_key')\n Enter a password for the Ed25519 key:\n Confirm:\n\n # Import the Ed25519 public key just created . . .\n >>> public_ed25519_key = import_ed25519_publickey_from_file('ed25519_key.pub')\n\n # and its corresponding private key.\n >>> private_ed25519_key = import_ed25519_privatekey_from_file('ed25519_key')\n Enter a password for the encrypted Ed25519 key:\n\n\nCreate and Import ECDSA Keys\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n # continuing from the previous sections . . .\n\n >>> generate_and_write_ecdsa_keypair('ecdsa_key')\n Enter a password for the ECDSA key:\n Confirm:\n\n >>> public_ecdsa_key = import_ecdsa_publickey_from_file('ecdsa_key.pub')\n >>> private_ecdsa_key = import_ecdsa_privatekey_from_file('ecdsa_key')\n Enter a password for the encrypted ECDSA key:\n\n\nGenerate ECDSA, Ed25519, and RSA Signatures\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nNote: Users may also access the crypto functions directly to perform\ncryptographic operations.\n\n::\n\n >>> from securesystemslib.keys import *\n\n >>> data = 'The quick brown fox jumps over the lazy dog'\n >>> ed25519_key = generate_ed25519_key()\n >>> signature = create_signature(ed25519_key, data)\n >>> rsa_key = generate_rsa_key(2048)\n >>> signature = create_signature(rsa_key, data)\n >>> ecdsa_key = generate_ecdsa_key()\n >>> signature = create_signature(ecdsa_key, data)\n\n\nVerify ECDSA, Ed25519, and RSA Signatures\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n # Continuing from the previous sections . . .\n\n >>> data = 'The quick brown fox jumps over the lazy dog'\n >>> ed25519_key = generate_ed25519_key()\n >>> signature = create_signature(ed25519_key, data)\n >>> verify_signature(ed25519_key, signature, data)\n True\n >>> verify_signature(ed25519_key, signature, 'bad_data')\n False\n >>> rsa_key = generate_rsa_key()\n >>> signature = create_signature(rsa_key, data)\n >>> verify_signature(rsa_key, signature, data)\n True\n >>> ecdsa_key = generate_ecdsa_key()\n >>> signature = create_signature(ecdsa_key, data)\n >>> verify_signature(ecdsa_key, signature, data)\n True\n\n\nMiscellaneous functions\n~~~~~~~~~~~~~~~~~~~~~~~\n\n**create_rsa_encrypted_pem()**\n\n::\n\n # Continuing from the previous sections . . .\n\n >>> rsa_key = generate_rsa_key()\n >>> private = rsa_key['keyval']['private']\n >>> passphrase = 'secret'\n >>> encrypted_pem = create_rsa_encrypted_pem(private, passphrase)\n\n**import_rsakey_from_public_pem()**\n\n::\n\n >>> rsa_key = generate_rsa_key()\n >>> public = rsa_key['keyval']['public']\n >>> rsa_key2 = import_rsakey_from_public_pem(public)\n\n\n**import_rsakey_from_pem()**\n\n::\n\n >>> rsa_key = generate_rsa_key()\n >>> public = rsa_key['keyval']['public']\n >>> private = rsa_key['keyval']['private']\n >>> rsa_key2 = import_rsakey_from_pem(public)\n >>> rsa_key3 = import_rsakey_from_pem(private)\n\n\n**extract_pem()**\n\n::\n\n >>> rsa_key = generate_rsa_key()\n >>> private_pem = extract_pem(rsakey['keyval']['private'], private_pem=True)\n >>> public_pem = extract_pem(rsakey['keyval']['public'], private_pem=False)\n\n\n**encrypt_key()**\n\n::\n\n >>> ed25519_key = generate_ed25519_key()\n >>> password = 'secret'\n >>> encrypted_key = encrypt_key(ed25519_key, password)\n\n\n**decrypt_key()**\n\n::\n\n >>> ed25519_key = generate_ed25519_key()\n >>> password = 'secret'\n >>> encrypted_key = encrypt_key(ed25519_key, password)\n >>> decrypted_key = decrypt_key(encrypted_key.encode('utf-8'), password)\n >>> decrypted_key == ed25519_key\n True\n\n\n**create_rsa_encrypted_pem()**\n\n::\n\n >>> rsa_key = generate_rsa_key()\n >>> private = rsa_key['keyval']['private']\n >>> passphrase = 'secret'\n >>> encrypted_pem = create_rsa_encrypted_pem(private, passphrase)\n\n\n**is_pem_public()**\n\n::\n\n >>> rsa_key = generate_rsa_key()\n >>> public = rsa_key['keyval']['public']\n >>> private = rsa_key['keyval']['private']\n >>> is_pem_public(public)\n True\n >>> is_pem_public(private)\n False\n\n\n**is_pem_private()**\n\n::\n\n >>> rsa_key = generate_rsa_key()\n >>> private = rsa_key['keyval']['private']\n >>> public = rsa_key['keyval']['public']\n >>> is_pem_private(private)\n True\n >>> is_pem_private(public)\n False\n\n\n**import_ecdsakey_from_private_pem()**\n\n::\n\n >>> ecdsa_key = generate_ecdsa_key()\n >>> private_pem = ecdsa_key['keyval']['private']\n >>> ecdsa_key2 = import_ecdsakey_from_private_pem(private_pem)\n\n\n**import_ecdsakey_from_public_pem()**\n\n::\n\n >>> ecdsa_key = generate_ecdsa_key()\n >>> public = ecdsa_key['keyval']['public']\n >>> ecdsa_key2 = import_ecdsakey_from_public_pem(public)\n\n\n**import_ecdsakey_from_pem()**\n\n::\n\n >>> ecdsa_key = generate_ecdsa_key()\n >>> private_pem = ecdsa_key['keyval']['private']\n >>> ecdsa_key2 = import_ecdsakey_from_pem(private_pem)\n >>> public_pem = ecdsa_key['keyval']['public']\n >>> ecdsa_key2 = import_ecdsakey_from_pem(public_pem)\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/secure-systems-lab/securesystemslib", "keywords": "cryptography,keys,signatures,rsa,ed25519,ecdsa", "license": "", "maintainer": "", "maintainer_email": "", "name": "oll-securesystemslib", "package_url": "https://pypi.org/project/oll-securesystemslib/", "platform": "", "project_url": "https://pypi.org/project/oll-securesystemslib/", "project_urls": { "Homepage": "https://github.com/secure-systems-lab/securesystemslib" }, "release_url": "https://pypi.org/project/oll-securesystemslib/0.11.3.dev7/", "requires_dist": [ "six (>=1.11.0)", "cryptography (>=2.2.2) ; extra == 'crypto'", "colorama (>=0.3.9) ; extra == 'crypto'", "pynacl (>1.2.0) ; extra == 'pynacl'" ], "requires_python": "", "summary": "Open Law Library's fork of securesystemslib", "version": "0.11.3.dev7" }, "last_serial": 5872747, "releases": { "0.11.3.dev1": [ { "comment_text": "", "digests": { "md5": "169c7f9ea9cb9c0e7419e5722ac68d63", "sha256": "123fc605e38ca5d4c805346cad2668c59ac989b6f69bbb4c36213571c4fd1d81" }, "downloads": -1, "filename": "oll_securesystemslib-0.11.3.dev1-py3-none-any.whl", "has_sig": false, "md5_digest": "169c7f9ea9cb9c0e7419e5722ac68d63", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 101916, "upload_time": "2019-03-19T17:52:07", "url": "https://files.pythonhosted.org/packages/e7/42/cf02813fcfb41bcd62ef5a6a1af9e8e0f4b2f3be55f4ae43c437b9b4032c/oll_securesystemslib-0.11.3.dev1-py3-none-any.whl" } ], "0.11.3.dev3": [ { "comment_text": "", "digests": { "md5": "112abe52f3e51d42fa0765e11cc797f3", "sha256": "f8986cff644a50bfd513ac95f5ae49dcffc7d66f4d8850b4a5549502e428fa09" }, "downloads": -1, "filename": "oll_securesystemslib-0.11.3.dev3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "112abe52f3e51d42fa0765e11cc797f3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 101934, "upload_time": "2019-03-20T13:20:40", "url": "https://files.pythonhosted.org/packages/4c/4f/173a01bbcf15f311081434d508f3f8a4ed514da727d45c5711203704729c/oll_securesystemslib-0.11.3.dev3-py2.py3-none-any.whl" } ], "0.11.3.dev4": [ { "comment_text": "", "digests": { "md5": "b2f611aa392f5b8a9d3a41a4c501d146", "sha256": "19310d6211d0a288ec06dd82f322486694576cc17e7918c80d7bf5d86ce11798" }, "downloads": -1, "filename": "oll_securesystemslib-0.11.3.dev4-py3-none-any.whl", "has_sig": false, "md5_digest": "b2f611aa392f5b8a9d3a41a4c501d146", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 82197, "upload_time": "2019-08-15T17:55:52", "url": "https://files.pythonhosted.org/packages/48/77/c01e35171e2c72ada2a4b3a007f1b82473b4103862b2cc2acc0e0750a326/oll_securesystemslib-0.11.3.dev4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8252690e1f7514271ef2a0f67b716300", "sha256": "87faf8d90034cbd192d39b3b48a5719de33009a673b38b0163c55276113bef76" }, "downloads": -1, "filename": "oll-securesystemslib-0.11.3.dev4.tar.gz", "has_sig": false, "md5_digest": "8252690e1f7514271ef2a0f67b716300", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 98724, "upload_time": "2019-08-15T17:55:54", "url": "https://files.pythonhosted.org/packages/d3/9a/765e2b0ed8346ced00d8f4d655285ded7b73c998e35286b2a7ae6d0729a2/oll-securesystemslib-0.11.3.dev4.tar.gz" } ], "0.11.3.dev5": [ { "comment_text": "", "digests": { "md5": "50c62964a47aec92d39688fff6413a89", "sha256": "6f74634d8bcd674595be481638636a187d5cfd89feb4cb20b8b4acdd2285398d" }, "downloads": -1, "filename": "oll_securesystemslib-0.11.3.dev5-py3-none-any.whl", "has_sig": false, "md5_digest": "50c62964a47aec92d39688fff6413a89", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 82211, "upload_time": "2019-08-15T18:58:10", "url": "https://files.pythonhosted.org/packages/dd/ba/1b369181559b6f66a9bab77e6ae960ef6468f892d920be29bbef36fbe4dc/oll_securesystemslib-0.11.3.dev5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f2fadc26e0e881a7af85b42396392988", "sha256": "0d2f778ad6506fc607c10afbe1828673136936586f2882db14fdd0c9894a9fac" }, "downloads": -1, "filename": "oll-securesystemslib-0.11.3.dev5.tar.gz", "has_sig": false, "md5_digest": "f2fadc26e0e881a7af85b42396392988", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 98771, "upload_time": "2019-08-15T18:58:12", "url": "https://files.pythonhosted.org/packages/2c/be/37b5a33ee6073cbaf9678f02a157f1dd36fb817ba7ba0fa47154fa7acd3e/oll-securesystemslib-0.11.3.dev5.tar.gz" } ], "0.11.3.dev6": [ { "comment_text": "", "digests": { "md5": "b54402150776fd6ba5e40039e2c78a96", "sha256": "3a6ed98ae1e57dc84267378c9c9be455cc8b4e6e34f3a538397218d0bdee4b78" }, "downloads": -1, "filename": "oll_securesystemslib-0.11.3.dev6-py3-none-any.whl", "has_sig": false, "md5_digest": "b54402150776fd6ba5e40039e2c78a96", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 82229, "upload_time": "2019-09-04T14:33:48", "url": "https://files.pythonhosted.org/packages/91/cd/f88b1c48404f4d96b6e87f8bd25d39092748438b84ceb77d2ecc82acb343/oll_securesystemslib-0.11.3.dev6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d1a382877c9e46088fe698b40dc9578", "sha256": "5977d5ff50a3dcd077f0bd919311475434cb07bc0e786e4ce9d843597e1477b7" }, "downloads": -1, "filename": "oll-securesystemslib-0.11.3.dev6.tar.gz", "has_sig": false, "md5_digest": "8d1a382877c9e46088fe698b40dc9578", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 98817, "upload_time": "2019-09-04T14:33:50", "url": "https://files.pythonhosted.org/packages/73/e6/37cab6237c2bf399e000349ed3ceac4cff648b5879c4463d4bc9b7a615f3/oll-securesystemslib-0.11.3.dev6.tar.gz" } ], "0.11.3.dev7": [ { "comment_text": "", "digests": { "md5": "489b2bacdaaeac1028f5e98b3c3c8a55", "sha256": "cfa0fb975a147d35611cfdd7b418fb2d615ade8adff357f4096e53413773681e" }, "downloads": -1, "filename": "oll_securesystemslib-0.11.3.dev7-py3-none-any.whl", "has_sig": false, "md5_digest": "489b2bacdaaeac1028f5e98b3c3c8a55", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 82229, "upload_time": "2019-09-23T10:18:23", "url": "https://files.pythonhosted.org/packages/12/00/d0279126467cc606ec8ec0ad507f7240c3975b66094e667e99e86232e05b/oll_securesystemslib-0.11.3.dev7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "18d30706667046a64abca9cad16c5bf3", "sha256": "af546c6ee5db9a1b0a9cb19e0b4c9910bce370883e08b86fc57059898e0435e7" }, "downloads": -1, "filename": "oll-securesystemslib-0.11.3.dev7.tar.gz", "has_sig": false, "md5_digest": "18d30706667046a64abca9cad16c5bf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 98747, "upload_time": "2019-09-23T10:18:27", "url": "https://files.pythonhosted.org/packages/41/3c/b30791010161dad8337da7915812da1bcc611270986f6f5cc579b9196ce2/oll-securesystemslib-0.11.3.dev7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "489b2bacdaaeac1028f5e98b3c3c8a55", "sha256": "cfa0fb975a147d35611cfdd7b418fb2d615ade8adff357f4096e53413773681e" }, "downloads": -1, "filename": "oll_securesystemslib-0.11.3.dev7-py3-none-any.whl", "has_sig": false, "md5_digest": "489b2bacdaaeac1028f5e98b3c3c8a55", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 82229, "upload_time": "2019-09-23T10:18:23", "url": "https://files.pythonhosted.org/packages/12/00/d0279126467cc606ec8ec0ad507f7240c3975b66094e667e99e86232e05b/oll_securesystemslib-0.11.3.dev7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "18d30706667046a64abca9cad16c5bf3", "sha256": "af546c6ee5db9a1b0a9cb19e0b4c9910bce370883e08b86fc57059898e0435e7" }, "downloads": -1, "filename": "oll-securesystemslib-0.11.3.dev7.tar.gz", "has_sig": false, "md5_digest": "18d30706667046a64abca9cad16c5bf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 98747, "upload_time": "2019-09-23T10:18:27", "url": "https://files.pythonhosted.org/packages/41/3c/b30791010161dad8337da7915812da1bcc611270986f6f5cc579b9196ce2/oll-securesystemslib-0.11.3.dev7.tar.gz" } ] }