pysodium | wrapper for libsodium providing high level crypto primitives | Cryptography library

 by   stef Python Version: 0.7.17 License: Non-SPDX

kandi X-RAY | pysodium Summary

kandi X-RAY | pysodium Summary

pysodium is a Python library typically used in Security, Cryptography applications. pysodium has no bugs, it has no vulnerabilities, it has build file available and it has low support. However pysodium has a Non-SPDX License. You can install using 'pip install pysodium' or download it from GitHub, PyPI.

This is a very simple wrapper around libsodium masquerading as nacl.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pysodium has a low active ecosystem.
              It has 115 star(s) with 47 fork(s). There are 14 watchers for this library.
              There were 5 major release(s) in the last 12 months.
              There are 2 open issues and 35 have been closed. On average issues are closed in 61 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pysodium is 0.7.17

            kandi-Quality Quality

              pysodium has 0 bugs and 44 code smells.

            kandi-Security Security

              pysodium has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pysodium code analysis shows 0 unresolved vulnerabilities.
              There are 5 security hotspots that need review.

            kandi-License License

              pysodium has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              pysodium releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              pysodium saves you 545 person hours of effort in developing the same functionality from scratch.
              It has 1418 lines of code, 160 functions and 4 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pysodium and discovered the below as its top functions. This is intended to give you an instant insight into pysodium implemented functionality, and help decide if they suit your requirements.
            • Encrypts a message using the Blake2B private key
            • Pad a buffer
            • Read the cipherstream from the secret stream
            • XOR of a message using the XOR algorithm
            • Push a message to the secret stream
            • Create a crypto sign state
            • This function is used to get client session keys
            • Get the key pair for a key pair
            • Encrypts a message using the IETF - Chacha20poly1305
            • XOR algorithm for xchacha20
            • Decrypt the decacha20poly1305 Poly1305 polygon
            • Calculate a cryptographic key using a cryptographic key
            • Calculate the chacha20 - encoded message
            • Encrypts a message using the standard key
            • Decrypt decacha20poly1305 polygon
            • Encrypts a message using the specified key
            • Encrypts a message using the private key
            • Calculate the SHA256 hash of a cryptographic key
            • Encrypts the contents of the given message
            • Decrypts the xchacha20poly1305 poly1305 polygon
            • XOR of a message using the chacha20 algorithm
            Get all kandi verified functions for this library.

            pysodium Key Features

            No Key Features are available at this moment for pysodium.

            pysodium Examples and Code Snippets

            Is it possible to encrypt then decrypt data securely against a password in Python?
            Pythondot img1Lines of Code : 22dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            import cryptography.fernet
            import argon2
            import base64
            
            def encrypt_data(data_bytes, password, salt):
                password_hash = argon2.argon2_hash(password=password, salt=salt)
                encoded_hash = base64.urlsafe_b64encode(password_hash[:32])
                

            Community Discussions

            QUESTION

            Is it possible to encrypt then decrypt data securely against a password in Python?
            Asked 2018-Mar-24 at 19:28

            I have some data in a python program that I'd like to encrypt before writing to a file with a password, and then read it and decrypt it before using it. I'm looking for some secure symmetric algorithm that can encrypt and decrypt against a password.

            This question shows a non-secure way and suggests using libsodium. Since I'm using Python, I found pysodium. It seems to have tons of functions mapped from libsodium, but I don't know how to simply encrypt/decrypt data against password.

            My problem is that it looks like all encryption algorithms use keys. I don't want to use keys. I want to only use a password. Just like what I do in the terminal:

            To encrypt:

            ...

            ANSWER

            Answered 2018-Mar-24 at 19:28

            So my question reduced to: "How can I encrypt data against a password in Python". I gave up on pysodium due to the lack of documentation. I used cryptography and argon2 packages to write my own encryption algorithm (it's not my own crypto algorithm, I know Rule No. 1 in crypto; it's just the procedure to utilize what's already there). So here are my functions:

            Source https://stackoverflow.com/questions/49465692

            QUESTION

            Installing Python's Cryptography on Windows
            Asked 2017-Nov-22 at 05:15

            I've created a script on windows to connect to Remote SSH server. I have successfully installed cryptography, pynacl and finally paramiko(Took me an entire day to figure out how to successfully install them on windows).

            Now that I run the script, it pops an error saying that the DLL loading has failed. The error seems to be related to libsodium but I cannot figure out exactly which DLL is to trying to load and from where. Just to be on the safer side I also installed pysodium.

            Here's the script:

            automate.py

            ...

            ANSWER

            Answered 2017-Nov-22 at 05:15

            After a lot of googling, I finally stumbled upon this. As mentioned in the conversation I uninstalled my previous pynacl installation, downloaded the zipped source from https://github.com/lmctv/pynacl/archive/v1.2.a0.reorder.zip, downloaded libsodium from https://github.com/jedisct1/libsodium/releases/download/1.0.15/libsodium-1.0.15.tar.gz, set LIB environment variable to D:\Users\prashant-gu\Downloads\libsodium-1.0.15\bin\x64\Release\v140\dynamic, and finally installed pynacl form this downloaded source using

            pip install .

            Now it works fine.

            During the installation of paramiko, I also happen to download OpenSSL from https://ci.cryptography.io/job/cryptography-support-jobs/job/openssl-release-1.1/, and set INCLUDE environment variable to D:\Users\prashant-gu\Downloads\openssl-1.1.0g-2015-x86_64\openssl-win64-2015\include in order to successfully install the cryptography package which happens to be a dependency for paramiko.

            Source https://stackoverflow.com/questions/47413755

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pysodium

            You can install using 'pip install pysodium' or download it from GitHub, PyPI.
            You can use pysodium like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install pysodium

          • CLONE
          • HTTPS

            https://github.com/stef/pysodium.git

          • CLI

            gh repo clone stef/pysodium

          • sshUrl

            git@github.com:stef/pysodium.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cryptography Libraries

            dogecoin

            by dogecoin

            tink

            by google

            crypto-js

            by brix

            Ciphey

            by Ciphey

            libsodium

            by jedisct1

            Try Top Libraries by stef

            libsphinx

            by stefC

            pyrsp

            by stefPython

            wireless-radar

            by stefPython

            pbp

            by stefPython

            libopaque

            by stefC