Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
57 views

I am trying to implement CMS detached signature for artifacts in Python. The sign operation is being done by private key stored inside AWS KMS service. I have code signing certificate issued by ...
Cloudy's user avatar
  • 23
0 votes
0 answers
233 views

I'm developing a Flask web app that uses the ccxt library to connect to an API. When trying to run my application, I'm encountering this error: AttributeError: module 'cryptography.hazmat.bindings....
Mohamed Amine's user avatar
1 vote
1 answer
59 views

I am trying to implement a system in which pictures are encrypted on my database, but when they are sent as a response to a user, this data becomes decrypted. Here is how I am encrypting... def ...
fiocotti's user avatar
0 votes
0 answers
101 views

I am trying move the data encryption/decryption away from the database into the application (python 3.x). This app needs to encrypt/decrypt data that was encrypted using pgcrypto.encrypt method. Which ...
mithun_daa's user avatar
  • 4,414
0 votes
1 answer
71 views

My teammate wrote kotlin code to encrypt zip files from android side using AES BC and I'm trying to decrypt it. But it's not happening. I need to write client side python code to decrypt those files ...
Rahim T.S's user avatar
0 votes
0 answers
98 views

1. Minimal Python code import os from stat import S_IRUSR from stat import S_IWUSR from cryptography.hazmat.primitives.asymmetric import ed25519 from cryptography.hazmat.primitives.serialization ...
davidcesarino's user avatar
2 votes
1 answer
386 views

I want to use AES-256 with python's cryptography.fernet.Fernet class. I have generated two keys with Fernet.generate_key() and tried to run the version of the following code (where instead of key1 and ...
Archive the Archive's user avatar
1 vote
0 answers
153 views

I'm looking to replicate the following command in python: openssl smime -verify -inform der -in sig.rsa -content data.txt -CAfile ca.crt -purpose any Given that most other python cryptography ...
cegfault's user avatar
  • 6,652
0 votes
2 answers
91 views

I'm implementing some Bluetooth Low Energy functionalities in Python. In the pairing process there is a Pairing Confirm Value like specified in Bluetooth Core Specs 5.3 page 1604 and 1562f. I have the ...
Pascal Rockenstiehl's user avatar
0 votes
1 answer
684 views

I have been trying to run a quick start flask app for the first time via PyCharm / VSCode. My pip is fully upgraded to the latest version, and I have installed requirements.txt in my venv, but when I ...
Abdul Ahad Akram's user avatar
0 votes
1 answer
151 views

I am doing an assignment where I have a CA (server) and a client that requests a certificate from the CA, this function works. The certificate is sent via tcp as bytes. The idea is that clients will ...
Reabetsoe Mpapa's user avatar
0 votes
1 answer
49 views

I can not seem to transform the master_pwd string into bytes. I do not know if it's been removed or am I missing something. The code is not done yet but I do not want to go further unless I find out ...
Daniel Lex's user avatar
1 vote
1 answer
58 views

I use the following to encrypt a file in Java: public static byte[] hexStringToByteArray(String s) { int len = s.length(); byte[] data = new byte[len / 2]; for (int i = 0; i <...
Pro West's user avatar
  • 419
0 votes
0 answers
2k views

I need to install the cryptography module since it is a dependency for many modules in my python project that I want to migrate to Python 3.13. I remember that the same problem occured, when I was ...
kilian579's user avatar
0 votes
1 answer
498 views

I've written a Python code to generate a cert chain using cryptography library. It involves three certificates: root, intermediate, and leaf. The root is self signed certificate, intermediate cert is ...
vivek's user avatar
  • 11
0 votes
0 answers
96 views

Use case: I want to generate no-passphrase 2048-byte RSA keypairs I can use for service accounts to authenticate to Snowflake. I need to generate them programmatically to make key rotation practical. ...
Levin's user avatar
  • 2,045
0 votes
0 answers
70 views

I was given an assignment at Uni where we were asked to implement RSA on the programming language of our choice. I chose Python to implement it and I did successfully implement it. However, it works ...
ArunVijay0718's user avatar
0 votes
0 answers
64 views

def encrypt(self): if not os.path.exists(self.filename): raise Exception('File does not exist!') # Generate a random salt salt = Fernet.generate_key() # ...
Adarsh Kumar's user avatar
1 vote
0 answers
138 views

I generated two certificates using openssl cli. The first (if I'm not wrong) should be rsa_pss_rsae_sha256 and the second (dito) should be rsa_pss_pss_sha256. openssl genpkey -out ca-rsa.key.pem -...
Julien Castiaux's user avatar
0 votes
0 answers
76 views

I am trying to make a login interface in a command prompt, def login(): key_file_path = "etc/keys/key.key" # Read the key from the file with open(key_file_path, "rb") ...
Dy Noob's user avatar
1 vote
0 answers
167 views

I am trying to sign my OCSP builder to create a valid OCSP response for client use. However I'm receiving this error when I try to sign my response builder: 'ERROR': "PKCS#11 Error: Unknown ...
Harry Lubbe's user avatar
0 votes
1 answer
641 views

I'm trying to extract the cert and key from the pfx file, and then write them to the x.key and x.crt files. I can get the cert and key by the below Python code, my question is how to write them to the ...
nick's user avatar
  • 69
2 votes
1 answer
318 views

I am using this library to try and make a mceliece encrypter with reed solomon. My problem is when I try to decrypt, after applying P_inv the decoder does not recognize the coded data and gives me an ...
Junior1373's user avatar
0 votes
0 answers
64 views

In my client-server app, I'm trying to encrypt strings, send, receive and decrypt. Maybe the order of unpadding and decrypting is wrong, or it does have something about deconding from ascii or uft-8, ...
Josué Jr's user avatar
2 votes
2 answers
279 views

I have a user interface in python (tkinter) that uses cryptography.fernet to encrypt the password of the user and stores it in a yaml file. For password recovery purposes, I also keep the generated ...
arezab's user avatar
  • 75
0 votes
1 answer
7k views

Python 3.11 upgrade throws error: lib64/libc.so.6: version GLIBC_2.28' not found [ERROR] Runtime.ImportModuleError: Unable to import module 'xxxxx': /lib64/libc.so.6: version GLIBC_2.28' not found (...
Rbadiger's user avatar
0 votes
0 answers
2k views

I tried many combinations of parameters of rsa.RSAPrivateKey.private_bytes but none of them work: from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives....
Basj's user avatar
  • 47.6k
1 vote
0 answers
19 views

Use the crytographic objects (AESCrypto and RSACrypto) Install necessary cryptographic module(s). Verify the hash of the supplied part 1 files (publickey.pem, part1.txt.enc, part1.txt.sig) with their ...
Shawntelle's user avatar
1 vote
0 answers
142 views

I have a python script in the Zope (5.8.3) ZMI. When I was running Zope 5.5.1 this worked perfectly but since I upgraded to 5.8.3 and thus updated all the accompanying python modules, I am now getting ...
kittonian's user avatar
  • 1,534
2 votes
1 answer
1k views

For context I am using the azurerm_key_vault_key terraform resource to create an secp256k1 key. I can output the X and Y coordinates for this key as strings that look like this (appears to be a base64 ...
Karl's user avatar
  • 5,842
1 vote
1 answer
282 views

I am trying to convert my current OPENSSL code to python in Azure databricks which decrypts the encrypted file using RANDOM key and uses AES-256-CBC algorithm. File is shared by source team which is ...
newstack's user avatar
2 votes
0 answers
313 views

I use FALCON from liboqs with python wrapper from OQS. I have 2 python files, one for generating the public key, hashes and dump the result to an external file. While the second file will be use for ...
Blake's user avatar
  • 21
1 vote
1 answer
70 views

So I was basically trying to create a script that would continuously generate keys and hypothetically brute force finding the correct key for the decryption, and running it outputs this: This is the ...
John Papajim's user avatar
0 votes
0 answers
398 views

When installing the cryptography python package in an offline environment (no internet), it is failing and trying to access github.com The error is: failed to connect to github.com: Connection timed ...
lorenz's user avatar
  • 11
2 votes
1 answer
1k views

According to the documentation for the cryptography.fernet module, fernet keys are: A URL-safe base64-encoded 32-byte key Yet this doesn't work: import secrets from cryptography import fernet f = ...
Tom's user avatar
  • 8,181
1 vote
1 answer
74 views

I need to update a kwarg for a class method which is called by another package. I interact with PyJWT encode much later this calls cryptography load_pem_private_key (https://cryptography.io/en/latest/...
Blind Rabit's user avatar
0 votes
1 answer
641 views

I am getting an error while trying to install cryptography in a python 3.7.3 venv with latest pip(23.0.1). I have Rust version 1.56.1 installed using rustup, and have all other linux packages relevant ...
zenu's user avatar
  • 1
2 votes
1 answer
4k views

I have a javascript function which encrypt a json using AES cipher from Crypto-Js module. I want a equivalent of this function in python. encryptAES = function(data1) { var keyUtf8 = CryptoJS.enc....
Aditya Gaurav's user avatar
1 vote
1 answer
4k views

I have the following error when i run my AWS lambda under python 3.9 : [ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': /lib64/libc.so.6: version `GLIBC_2.28' not found (...
Tom3652's user avatar
  • 2,975
0 votes
0 answers
226 views

I create a pair of ed25519 keys and then used the cryptography Python library to sign an auth code with the private key: private_key = serialization.load_ssh_private_key(open('ed25519', 'rb').read(), ...
Sarthak Rastogi's user avatar
2 votes
0 answers
106 views

I'm trying to use the cryptography library to sign a document. The following script (working.py) works when it is executed from a directory that contains a private key and a certificate: #!/usr/bin/...
pek's user avatar
  • 33
0 votes
0 answers
2k views

so I am running a Linux machine with python 3.10 and the latest version of pip. when I try installing Cryptography using PIP i get a successful installed message with one warning: sh-5.1$ pip install ...
Zak345's user avatar
  • 21
0 votes
0 answers
250 views

I'm building a certificate with cryptography.x509.CertificateBuilder: from pathlib import Path from cryptography import x509 from cryptography.hazmat.primitives.asymmetric import rsa from cryptography....
Gary van der Merwe's user avatar
0 votes
1 answer
324 views

I am using Python module pefile to extract the Authenticode from a Windows PE file. pe.parse_data_directories(directories=[pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_SECURITY']]) vAddr = pe....
synner's user avatar
  • 31
0 votes
1 answer
239 views

I want to do something like that : #Let m be the initial message c = rsa.encrypt(m) new_m = rsa.decrypt( Enc(2m)) Now Enc(2m) = 2^e *c mod n so a user that knows c can have Enc(2m) as well. My ...
tonythestark's user avatar
1 vote
0 answers
313 views

I'm trying to run a new version of a program on an old version of Raspbian OS (10 / buster) that requires the python3-cryptography package. The program requires at least Python 3.8 so, I had to ...
flyerbear's user avatar
1 vote
1 answer
1k views

Error stack trace creating build/temp.linux-aarch64-cpython-37/build #9 13.81 creating build/temp.linux-aarch64-cpython-37/build/temp.linux-aarch64-cpython-37 #9 13.81 gcc -Wno-unused-...
Some DevOps Guy's user avatar
0 votes
1 answer
86 views

CODE start_time1 = time.time() ec = EC(a, b, num) g, _ = ec.at(at) assert ec.order(g) <= ec.q # ElGamal enc/dec usage eg = ElGamal(ec, g) # mapping value to ec point # "masking&...
Jaivardhan Singh's user avatar
0 votes
1 answer
122 views

I'm a beginner to python I'm actually trying to encrypt a message using basic python LETTERS = ["A", "B", "C", "D", "E", "F", "G", ...
Definitely-not-a-crooked monke's user avatar
0 votes
1 answer
1k views

I want to send a signed mail with smime with the module cryptography. But all my mail programms can't detect the subject if I sign the mail. If I don't sign the mail it shows the subject. import ...
ikreb's user avatar
  • 2,855

1
2 3 4 5