{ "info": { "author": "Ilya Kreymer", "author_email": "ikreymer@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving", "Topic :: System :: Archiving :: Backup", "Topic :: Utilities" ], "description": "Warc-Signer 0.3.1\n=================\n\n.. image:: https://travis-ci.org/ikreymer/warcsigner.svg?branch=master\n :target: https://travis-ci.org/ikreymer/warcsigner\n\n.. image:: https://coveralls.io/repos/ikreymer/warcsigner/badge.svg\n :target: https://coveralls.io/r/ikreymer/warcsigner\n\n\nTools to add and a verify a cryptographic signature to WARC (or any gzip-chunked) files\n\nThis package provides complemetary ``warc-sign`` tool which signs WARC(s) with an RSA signature and \n``warc-verify`` which verifies that the WARC(s) have been signed.\n\nUsage\n------\n\nInstall with: ``python setup.py install``\n\nTests can be run with: ``python setup.py test``\n\nTo sign a warc:\n\n``warc-sign privatekey.pem my-warc-file.warc.gz``\n\nTo verify that a warc has been signed:\n\n``warc-verify publickey.pem my-warc-file.warc.gz``\n\n\nAPI Usage\n~~~~~~~~~\n\nwarcsigner can be used from other scripts.\nTo sign a warc:\n\n::\n\n from warcsigner.warcsigner import RSASigner\n \n signer = RSASigner(private_key_file='privatekey.pem')\n \n if signer.sign('my-warc-file.warc.gz'):\n # warc signed successfully\n \n\nor to verify:\n\n::\n\n from warcsigner.warcsigner import RSASigner\n \n signer = RSASigner(public_key_file='publickey.pem')\n \n if signer.verify('my-warc-file.warc.gz'):\n # signature verified\n else:\n # signature not found/invalid\n\n\nthe ``sign`` and ``verify`` methods can take either a filename string or a file-like \nstream object (an object with a ``read`` method)\n\nAdditionally, upon verification, the signature can be removed:\n\n::\n\n if signer.verify('my-warc-file.warc.gz', remove=True):\n # signature verified and removed\n\n assert signer.verify('my-warc-file.warc.gz') == False\n\nIf the first verify succeeds, the signature will be removed and file truncated\nto its previous pre-signature size. (The file is unaltered if the verification fails).\nThis may be useful if planning to append to the WARC and then resigning it.\n\nStreaming and ``seek()``\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nIt is possible to use a file-like object which supports a ``read()`` instead of a filename.\n\nWhen a WARC is signed, the signature is appended to the end of the file.\n\nWhen verifying a file, the ``seek()`` may be used to determine the file size and the position of the signature.\nHowever, if a ``size=`` param is added to ``verify`` or ``verify_stream`` calls, no seek() calls are made during\nthe verification and the file-like object is consumed linearly. This is specially useful\nwhen streaming a file from a remote location and ``seek()`` is not available. \nThe total file size must be provided, though.\n\n\nPublic/Private keys are expected to be in .PEM format\nSee the `python-rsa formats doc `_ for more information\non supported key formats.\n\nOriginal Stream\n~~~~~~~~~~~~~~~\n\nIn certain situations, it may be useful to return the original, unsigned stream from a signed stream.\n``signer.get_unsigned_stream(stream, size)`` will return a wrapper for `stream` which will not include the signature (if present). This is useful if concatenating WARCs without including a signature (and empty record) for each one.\n\n\nHow it works\n------------\n\nThe `python-rsa `_ library is used to sign and verify the signature.\n\nThe signature is stored in an extra gzip chunk containing no data but using `custom extra field `_ \nto store the signature. This allows the verify tool to quickly access the signature by checking a fixed offset from the end of the WARC.\n\nWhen decompressing gzip chunks, there should be no detectable difference as most gzip tools ignore the extra gzip header.\n\nWhile this is designed for compressed WARCs, this can be used for any format consisting of concatenated gzip chunks, ARC files, etc...\n\nNote: since the signature is a gzip block, it makes less sense for uncompressed / plain text files.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ikreymer/warcsigner", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "warcsigner", "package_url": "https://pypi.org/project/warcsigner/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/warcsigner/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ikreymer/warcsigner" }, "release_url": "https://pypi.org/project/warcsigner/0.3.1/", "requires_dist": null, "requires_python": null, "summary": "Tools for signing and verifying WARC files", "version": "0.3.1" }, "last_serial": 1780626, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "0a6609aa73d5d22f94fbae820034f1f0", "sha256": "a7c617e9dd02e580341cf2cabc2344fa46b2c19bc46a9bc6e0a120fec2e66505" }, "downloads": -1, "filename": "warcsigner-0.3.0.tar.gz", "has_sig": false, "md5_digest": "0a6609aa73d5d22f94fbae820034f1f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7012, "upload_time": "2015-10-21T21:10:03", "url": "https://files.pythonhosted.org/packages/75/0f/328203850a2b0ee4e805facb2b70379bba43118af5a0185d38a73a799aa6/warcsigner-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "deebbf1c07ebc44961768a1a9474cf76", "sha256": "46b2364228da83afe996de821ddd814e7e305a4b8f5a6219e8597de3df29a3f5" }, "downloads": -1, "filename": "warcsigner-0.3.1.tar.gz", "has_sig": false, "md5_digest": "deebbf1c07ebc44961768a1a9474cf76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7210, "upload_time": "2015-10-21T21:42:35", "url": "https://files.pythonhosted.org/packages/2a/3f/e8313689966aab7f389167efc75fd933ff7a50f37ae13a1ac7209344bea5/warcsigner-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "deebbf1c07ebc44961768a1a9474cf76", "sha256": "46b2364228da83afe996de821ddd814e7e305a4b8f5a6219e8597de3df29a3f5" }, "downloads": -1, "filename": "warcsigner-0.3.1.tar.gz", "has_sig": false, "md5_digest": "deebbf1c07ebc44961768a1a9474cf76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7210, "upload_time": "2015-10-21T21:42:35", "url": "https://files.pythonhosted.org/packages/2a/3f/e8313689966aab7f389167efc75fd933ff7a50f37ae13a1ac7209344bea5/warcsigner-0.3.1.tar.gz" } ] }