Metadata-Version: 2.1
Name: cotary
Version: 0.1
Summary: Prove a file currently exists without disclosing it's content.
Home-page: https://github.com/wchresta/cotary
Author: Wanja Chresta
Author-email: wanja.hs@chrummibei.ch
License: LICENSE
Project-URL: Source Code, https://github.com/wchresta/cotary
Project-URL: Issues, https://github.com/wchresta/cotary/issues
Description: # cotary
        Cotary allows you to prove that you have a document without releasing it.
        
        # Motivation
        The following scenario describes the motivation for this simple tool:
        Alice as an idea that she wants to use; either by publishing it in an article or paper or using it in a product. But she needs help; so she asks Bob to collaborate with her. Alice's idea is so good, though, that she is afraid that Bob will steal the idea from her and not involve her.
        
        To counter this, she needs proof that she had the idea first; but without releasing the idea to the public yet. So she writes a simple draft of her ideas including all important ingredients, calculates a cryptographic hash `H(d)` of this document `d` and stores the document it in a safe place. Before talking to Bob, she publishes the hash. Since `H` is one-way, her ideas are still safe.
        
        In case Bob tries to use Alice's ideas without her approval, she can at a later stage release the document `d` to the world. Since everyone can check that her previously published hash `H(d)` belongs to the document, she now proved that she had the ideas in the document before talking to Bob.
        
        _Cotary_ (code notary) makes this process for Alice very easy. Simply execute `cotary` on a file and it will publish a cryptographically secure hash on your Twitter account. This tweet with a timestamp and the hash proves you had the file at time of publishing.
        
        This shows a _very_ simple use case of hash functions and how to use them in practice.
        
        # Installation
        Make sure you have the python requirements installed.
        
        This can be achieved using pip (omit `--user` to install it system-wide).
        ```
        $ pip install --user .
        ```
        
        Then make `./cotary` executable and execute it:
        ```
        $ chmod +x cotary
        $ ./cotary -h
        ```
        
        # Configuration
        Configuration of Twitter APIs is done using a yaml config file.
        At the moment, these are the options. Default config file is in `~/.config/cotary/config.yaml`.
        
        ```yaml
        twitter:
            message: 
                'I own a file with checksum {checksum} (cotary)'
            consumer:
                key: xyz
                secret: abcd
            access_token:
                key: 123
                secret: 7890
        ```
        
        # Usage
        ```
        usage: cotary.py [-h] [-c] [--config [CONFIG]] [-q] [file]
        
        Publish the checksum of a file on Twitter.
        
        positional arguments:
          file               File for which to publish checksum. If none is given,
                             read from stdin
        
        optional arguments:
          -h, --help         show this help message and exit
          -c, --calc_only    Only calculate and print the checksum, do not publish it
          --config [CONFIG]  Use given config instead of ~/.local/cotary/config.yaml
          -q, --quiet        Do not print any messages
        ```
        
        # Example
        
        ```
        $ ./cotary README.md 
        checksum: openssl_sha256:66ca5ae6f1f3760ad7258cc1d1e906ec8853a0e4da2b2de42f55036cffe8f8a2
        Status published at 2019-01-16 15:18:38
        ```
        
        Leads to this Twitter message:
        
        
        ![I own a file with checksum openssl\_sha256:66ca5ae6f1f3760ad7258cc1d1e906ec8853a0e4da2b2de42f55036cffe8f8a2 (cotary)](screenshot.png)
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Science/Research
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Utilities
Requires-Python: >=3
Description-Content-Type: text/markdown
