python-cryptography is a python library for secure cryptographic services. The module includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, message digests, and key derivation functions.
Questions tagged [python-cryptography]
231 questions
                    
                    72
                    
            votes
                
                15 answers
            
        ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
I get an error when pip builds wheels for the cryptography package.
Error:
LINK : fatal error LNK1181: cannot open input file 'libssl.lib'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual…
         
    
    
        Chirag Bhansali
        
- 1,900
- 1
- 15
- 22
                    30
                    
            votes
                
                8 answers
            
        Installing Cryptography on an Apple Silicon M1 Mac
Help! I'm trying to install cryptography on my m1. I know I can run terminal in rosetta mode, but I'm wondering if there is a way not to do that.
Output:
    ERROR: Command errored out with exit status 1:
     command:…
         
    
    
        Joe Fedorowicz
        
- 625
- 2
- 6
- 14
                    19
                    
            votes
                
                5 answers
            
        Pipenv install fails on cryptography package: "Disabling PEP 517 processing is invalid" error
Without being aware of it, I've been using the cryptography package for many months now without issue, but suddenly it won't build and it's brought development on my project to a halt.
It turns out cryptography is a dependency of one of the other…
         
    
    
        Dylan
        
- 2,315
- 2
- 20
- 33
                    17
                    
            votes
                
                4 answers
            
        Paramiko: "FutureWarning: CTR mode needs counter parameter"
I am trying to use Paramiko in Python2 for transferring files through SFTP with a private SSH key but it displays this warning:
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: 
FutureWarning: CTR mode needs counter parameter, not IV…
         
    
    
        Adrián Kálazi
        
- 250
- 1
- 2
- 13
                    15
                    
            votes
                
                1 answer
            
        cryptography AssertionError: sorry, but this version only supports 100 named groups
I'm installing several python packages via pip install on travis, 
language: python
python:
- '2.7'
install:
- pip install -r requirements/env.txt
Everything worked fine, but today I started getting following error:
 Running setup.py install for…
         
    
    
        glmvrml
        
- 1,612
- 2
- 14
- 31
                    13
                    
            votes
                
                3 answers
            
        How do/can I generate a PKCS#12 file using python and the cryptography module?
How do/can I generate a PKCS#12 file using python and the cryptography module?
It's pretty easy using said module to generate the contents of .pem file for a private key:
keyPEMBytes = privateKey.private_bytes(
   …
         
    
    
        Travis Griggs
        
- 21,522
- 19
- 91
- 167
                    12
                    
            votes
                
                5 answers
            
        Pip error installing cryptography on Big Sur
Using pip version 20.2.4, Python 3.8.2 and Big Sur 11.0.1.
When I run pip install cryptography, I get this error:
  Building wheels for collected packages: cffi
    Building wheel for cffi (setup.py): started
    Building wheel for cffi (setup.py):…
         
    
    
        MDalt
        
- 1,681
- 2
- 24
- 46
                    10
                    
            votes
                
                4 answers
            
        Docker: Installing python cryptography on alpine linux distribution
I am a little bit new to Docker and deployment cycle.
I have Django application that we would like to deploy with uWSGI to docker container. Actually the deploy worked perfectly for a few weeks, but now it soundly report error... 
Error seam to be…
         
    
    
        Marko Zadravec
        
- 8,298
- 10
- 55
- 97
                    9
                    
            votes
                
                3 answers
            
        CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team
I upgraded my system from python 2 to python 3, and now when I run my code:
from cryptography.hazmat.backends import default_backend
I am getting this…
         
    
    
        Kanhaiya Singh
        
- 93
- 1
- 1
- 4
                    9
                    
            votes
                
                2 answers
            
        Is it possible to save a fernet key for a later session?
I am very new at python, I was working on a program that encrypts a text string, then saves it to a file. My program works perfectly when I encrypt then decrypt it in the same session. What I would like to do is: encrypt a file, then close the…
        user10462296
                    9
                    
            votes
                
                1 answer
            
        SQLAlchemy encrypt a column without automatically decrypting upon retrieval
Currently, I use EncryptedType from sqlalchemy_utils in order to automatically encrypt data on the way in to the table and decrypt the data when it's being retrieved from the table, using some predefined string as the encryption key. This works…
         
    
    
        Jfach
        
- 301
- 1
- 3
- 11
                    8
                    
            votes
                
                2 answers
            
        Support both encrypted and non encrypted configuration with aumbry
We have a python application that loads a config.yml with aumbry. For production purpose we need to encrypt this configuration with fernet, which aumbry can load seamlessly.
We want to be able to load both unencrypted and encrypted in a transparent…
         
    
    
        Jav_Rock
        
- 22,059
- 20
- 123
- 164
                    7
                    
            votes
                
                2 answers
            
        Failed to install cryptography package with Poetry on Python 3.9
When I try to install cryptography module with Python Poetry 1.1.4 package manager (poetry add cryptography) in a Python 3.9.0 virtual environment, I get:
    error: can't find Rust compiler
    
    If you are using an outdated pip version, it is…
         
    
    
        bolino
        
- 867
- 1
- 10
- 27
                    7
                    
            votes
                
                0 answers
            
        TypeError: from_buffer() cannot return the address of a unicode object
While updating a tool to python3, I have been facing this issue on MacOS.
print(args.secret)
h = hmac.HMAC(args.secret.decode("hex"),hashes.SHA512(),backend=default_backend())
Output
39830c786a16
h = hmac.HMAC(hex(int(args.secret, 16)),…
         
    
    
        Sprite
        
- 350
- 1
- 5
- 17
                    7
                    
            votes
                
                0 answers
            
        Is it possible to use django-cryptography with filter or get methods?
we are trying to encrypt some fields in Django models, so that no one get data through database access (previously we used django.core.signing), but we need it in some queries where we need to query based on the value but we are getting this…
         
    
    
        viratayya salimath
        
- 2,695
- 2
- 10
- 11