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
0
votes
2 answers
For building a highly secure website, can Ada be a better choice than Java/Python?
I am from network and OS operations and not from development background. I have some experience in writing Python and PHP code, and have studied software development in college.
As a hobby project (for now), I am planning on building a small…

Aseem
- 33
- 1
- 7
0
votes
2 answers
Decrypting in Python 3.5 using cryptography
I am trying to decrypt an encrypted file that is read from and stored in c_text.
from cryptography.fernet import Fernet
def cipher_decrypt(c_text):
key = open(key_loc,'rb')
key.seek(0)
key_b = key.read()
print ('Key: ' +…

Ray
- 3
- 4
0
votes
2 answers
How to decrypt the file in the encryption code
The encrypted picture should be decrypted by the xor the key using the first byte 0x89 if the of the PNG file and switching the place of the pictures

KillerVibe
- 9
- 2
0
votes
1 answer
from cryptography.hazmat.bindings._constant_time import lib ImportError: No module named _constant_time
I am basically deploying a flask app in app engine that uses pywebpush(https://github.com/web-push-libs/pywebpush). I followed the following tutorial to…

gajam
- 475
- 4
- 9
0
votes
2 answers
Crypto Error when Using Paramiko?
I haven't updated anything recently that I can think of that would have impacted nacl and the signing process for paramiko, but now it will not work. I have reinstalled paramiko, and netmiko and made sure all of the crypto libraries are up to date.…

Brandon Gile
- 11
- 2
0
votes
1 answer
Unable to build scrapy based project due to invalid environment marker error
I am unable to build docker image with Ubuntu as base OS for one of my projects written few months ago using Scrapy. Its showing following dependency error -
Downloading/unpacking cryptography>=2.1.4 (from pyOpenSSL->Scrapy==1.4.0->-r…

comiventor
- 3,922
- 5
- 50
- 77
0
votes
1 answer
Expire token generator return InvalidToken
I'm trying to create a expire token generator. However when i for instance use generate_token and then use the token in get_token_value i keep getting cryptography.fernet.InvalidToken i guess this is a issue with the encoding in the two functions,…

Peter Pik
- 11,023
- 19
- 84
- 142
0
votes
1 answer
PyCryptodome RSA encryption
I am trying to use the pycryptodome example of encrypting a file with an RSA key. The example is as follows
from Crypto.PublicKey import RSA
from Crypto.Random import get_random_bytes
from Crypto.Cipher import AES, PKCS1_OAEP
file_out =…

jaydoe
- 1
- 1
- 2
0
votes
2 answers
Loading Human Readable Hex String Private/Public Keys Using Python (Or Converting Them to Pem or ASN.1 Format)
I have a human readable private/public elliptic curve (ecdh) key pair in a hexadecimal string. The public key is 64 Bytes (128 hex characters) and the private key is 32 Bytes.
Question :How can I load these into either a python cryptography key or…

JDollars
- 61
- 4
0
votes
0 answers
who could tell me that the following code was encoding with which encoding system?
who could tell me that the following code was encoding with which encoding system?
Is Base 64 part of cryptography ?
How i can decrypt the code please help me .
sorry for my english
# -*- coding: utf-8 -*-
import urllib
import urllib2
import…

Homayoun Mh
- 3
- 1
0
votes
1 answer
RSA "length must be equal to key size" error
I'm currently trying to encrypt and decrypt passwords using the python cryptography library and RSA. The key generation works fine, the encryption works but when it comes to decrypting the password, I'm faced with this traceback error message:
raise…

mandok
- 492
- 1
- 5
- 20
0
votes
1 answer
python: py2exe cryptography Multibackend cannot be initialized with no backends
I am using python 2.7.11 on windows 7 64bit with py2exe 0.6.9, I got the following error after running the .exe file.
ValueError: Multibackend cannot be initialized with no backends.
If you are seeing this error when trying to use default_backend()…

fouad sar
- 1
- 2
0
votes
1 answer
Installing Python cryptography package from source on Solaris 10
I am trying to install the Python cryptography package on a Solaris 10 system. I have built Python 2.7 and libffi from source in my home directory. I can build cffi by specifying the path to libffi:
$ python setup.py build_ext --include-dirs…

ef99
- 3
- 2
0
votes
1 answer
Import error No module named constant_time while accessing server
This is the follow up of Import Modules in Nifi ExecuteScript
I am new to python as well as nifi. I am trying to execute my python script in ExecuteScript processor.
I want to access a server. so i used paramiko client. But when i run the…

vishnu
- 891
- 2
- 11
- 20
-1
votes
1 answer
I have a python error with the cryptography library. Fernet.decrypt() missing 1 required positional argument: 'token'
I am experimenting with the cryptography library in python. I am getting this error:
Fernet.decrypt() missing 1 required positional argument: 'token'
This error came up while I was trying to decrypt the files. I do not no how to fix this, any…

Lofi
- 7
- 3