encryption

How to use AES-CTR with same IV in Python?

How to use AES-CTR with same IV in Python? Question: With the pycryptodome library, when encrypting with AES-CTR, the iv keyword argument is unavailable for MODE_CTR. I tried setting nonce to 0, but the second ciphertext is still different from the first ciphertext. from Crypto.Cipher import AES key = ‘1111111111111111’ message = ‘Hello, world!’ cipher …

Total answers: 1

Python: Decrypting a file (have key)

Python: Decrypting a file (have key) Question: I encrypted a file from ascii randomized key. I need to decrypt back into normal letters from and then put that into a new file import random lst = list(range(1,128)) #for key numbersran = list() while len(numbersran) < 128: candidate = random.randint(1,128) if candidate not in numbersran: numbersran.append(candidate) …

Total answers: 2

Encrypting a file into ascii key

Encrypting a file into ascii key Question: I am trying to encrypt a file input by user into a randomized key of ascii. I got the random key and can translate the string in the file into ascii but cannot figure out how to translate it into the key I tried many things but am …

Total answers: 1

Python: Assigning numbering to list of ascii

Python: Assigning numbering to list of ascii Question: Need help with making a encryption python program that encrypts with use of ascii values. I have 1-127 random number generator with no repeats and need to basically assign a value to each one. Example: list 1 is (1,2,3…127) list 2 is (54,60,27…) I need to get …

Total answers: 2

AES-GCM 256-bit VS. SSL/TLS for socket security

AES-GCM 256-bit VS. SSL/TLS for socket security Question: Is there a difference between using AES-GCM 256-bit encryption, or using SSL/TLS to pass data over a socket. I am currently passing data back and forth from client to server, using asymmetric AES-GCM 256-bit encryption. Is there an advantage to using SSL/TLS as opposed to my current …

Total answers: 1

Function – encrypt key

Function – encrypt key Question: I’m trying to create a function that encrypts a number of 4 digits insert by the user. I was able to reach this: while True: num = int(input(‘Insira um valor entre 1000 e 9999: ‘)) if num<1000 or num>9999: print(‘Insira um valor vĂ¡lido.’) else: break num_str = str(num) def encrypt(num): …

Total answers: 1

Docker running script but server doesn't work

Docker running script but server doesn't work Question: I am doing an encryption service that everytime a user goes on the server it changes the key , the problem is that when i run the python file alone in works like this when it works but when I am dockerizing it by the below code …

Total answers: 1

How would I add a space character to ascii_lowercase

How would I add a space character to ascii_lowercase Question: So im making a code that’ll encrypt a character or word per se. Im done with that so far but would like to include a space character and continue on with an extra word to encrypt. "Congratulations you won"<<< from random import shuffle from string …

Total answers: 1

TPM2.0 Secure Cert file and Private key generated by openssl

TPM2.0 Secure Cert file and Private key generated by openssl Question: I generated a Cert file and Private key using openssl. These files are used to connect MQTT with TLS. How do I store/secure these files in the TPM on a raspberry pi. Once stored/secured how do I use them again? Say in a command …

Total answers: 1

Having issues Decrpyting ciphertext using own alphabet string (python)

Having issues Decrpyting ciphertext using own alphabet string (python) Question: I have it set to ask the user a word to encrpyt which works fine using my own alphabet. My issue is trying to also get it to return the deciphered text. So far I have it either returning the encrypted message twice or sending …

Total answers: 2