Metadata-Version: 2.1
Name: pycocks
Version: 0.0.1
Summary: An implementation of Cocks' identity-based encryption (IBE) scheme
Home-page: https://github.com/CarltonShepherd/pycocks
Author: Carlton Shepherd
Author-email: carlton@linux.com
License: UNKNOWN
Description: # PyCocks
        
        A Python implementation of Cocks' identity-based encryption (IBE) scheme [1].
        
        Cocks' scheme is distinct in that it is based on the quadratic residuosity hardness problem, rather than bilinear pairings used prevalently in other IBE schemes, e.g. Boneh-Franklin [2]. 
        
        As such, no dependencies are required for performing pairing-based cryptography; only gmpy2 is sufficient.
        
        ## Usage
        
        The module comprises two main classes:
        
        1. ```CocksPKG```: the public key generator (PKG) responsible for the scheme's initialisation and extracting secret keys from authorised user identity values.
        
        2. ```Cocks```: the user-side class for encrypting and decrypting messages using the secret key and public modulus generated by ```CocksPKG```.
        
        Example usage:
        ```
        from cocks.cocks import CocksPKG, Cocks
        
        cocks_pkg = CocksPKG()   # Optional param.: bit size (default = 2048)
        
        # Extract private key, r, from an identity string; a transformed
        # ID string, a, is also returned, which is required for encryption
        # and decryption.
        r, a = cocks_pkg.extract("User1")
        
        cocks = Cocks(cocks_pkg.n)  # Must use same public modulus, n, from cocks_pkg
        c = cocks.encrypt(b"test", a)
        msg = cocks.decrypt(c, r, a)  # => b"test"
        ```
        
        ## Tests
        
        Some tests can be found in ```test_pycocks.py```, which can be executed using ```pytest```.
        
        ## Requirements
        
        - gmpy2 (tested v2.0.8)
        
        ## References
        
        1. [C. Cocks, *"An identity based encryption scheme based on quadratic residues"*, Proceedings of the IMA International Conference on Cryptography and Coding. Springer, 2001.](https://link.springer.com/chapter/10.1007/3-540-45325-3_32)
        2. [D. Boneh and M. Franklin, *"Identity-based encryption from the Weil pairing"*, Annual International Cryptology Conference. Springer, 2001.](https://search.proquest.com/docview/918831320?pq-origsite=gscholar)
        
Keywords: cocks,encryption,decryption,ibe,identity,based,crypto,cryptography,security,privacy
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Security :: Cryptography
Classifier: Intended Audience :: Science/Research
Classifier: Development Status :: 3 - Alpha
Description-Content-Type: text/markdown
