2
votes
1answer
24 views

PyCrypto : AssertionError(“PID check failed. RNG must be re-initialized after fork(). Hint: Try Random.atfork()”)

I am creating various processes that do different tasks. One of them and only one of them, has a security module that creates the PyCrypto objects. So my program starts, creates the various ...
2
votes
1answer
42 views

How do I encrypt/decrypt a dictionary in Python 3.3? [duplicate]

I have a dictionary, myDict = {1:'a',2:'b',3:'c'}, that I'd like to encrypt and write to an external raw text file. I've already downloaded and installed PyCrypto since a lot of other threads seem to ...
0
votes
3answers
36 views

encryption and writing to file

So heres the deal. I have some data. It is so arranged that each line consists of one record. And each record consists of 4 items: username account name password remarks These records are ...
1
vote
1answer
94 views

How to AES encrypt/decrypt files using Python/PyCrypto in an OpenSSL-compatible way?

There are many ways to use AES, resulting in frequent incompatibilities between different implementations. OpenSSL provides a popular command line interface for AES encryption/decryption: openssl ...
1
vote
1answer
90 views

Fast RC4 cipher stream for Python?

I'm trying to write an app that needs large numbers of cryptographic strength pseudorandom bytes. The RC4 cipher would be ideal for this; it's lightweight and simple to understand conceptually. So, ...
0
votes
2answers
58 views

Python encryption function and global variables [duplicate]

Ok, so I am writing a python encryption code. The code was longer than it needed to be, so I switched part of it over to functions. As soon as I started doing this, it said that it could not find ...
1
vote
3answers
45 views

remember password functionality in python

basically, I want to have a login box, and the option to remember the password next time you log in. I know there are encryption modules out there, but they require a password to work in the first ...
0
votes
0answers
39 views

Python - Extract and execute in RAM

I'm developing a small python script to take a base64 encoded zip, decode it, and run an EXE that's inside the zip only in RAM (so no disk writing). This is what I have so far if it makes sense, ...
0
votes
4answers
114 views

Python Encryption

So for an exam question I've followed this specific pseudo code which basically makes a program which encrypts a number sequence using the same principle as the ceasar cipher. It should work but for ...
1
vote
4answers
119 views

Password Protection Python

I have a small python program which will be used locally by a small group of people (<15 people).But for accountability, i want to have a simple username+password check at the start of the program ...
1
vote
1answer
49 views

Python equivalent of PHP Mcrypt

I wrote the following DES encryption scheme in PHP . It uses a static Initialization Vector to make sure the output and input is one to one mapped PHP code : function encrypt($plaintext, $key) { ...
1
vote
1answer
224 views

Decrypting data in Python that was encrypted in 3DES by Java

I'm trying to decrypt data using PyCrypto. The data was encoded in Java with the javax.crypto package. The encryption is Triple DES (referred to as "DESede" in Java). As far as I can tell, default ...
0
votes
5answers
132 views

Encryption — how to do it

issue I am writing an application in python. It takes care of contacts and other information about a person. I want to prompt the user for a master key every time that he/she wants to perform a major ...
-4
votes
2answers
156 views

How to write a simple encryption algorithm in Python? [closed]

I need to store a password of servers in my application in a encryption which I need in a text form for later use. So that there is a need of my own very simple encryption and decryption program. ...
7
votes
2answers
194 views

Is it possible to salt and or hash HOTP/TOTP secret on the server?

I am building a two-factor authentication system based on the TOTP/HOTP. In order to verify the otp both server and the otp device must know the shared secret. Since HOTP secret is quite similar to ...
0
votes
0answers
22 views

openssl_private_encrypt in python

Is there any python equivalent for PHP 'openssl_private_encrypt'? what kind of encryption is happening with 'openssl_private_encrypt'? please provide a sample python code for ...
0
votes
3answers
95 views

Caeser cipher encryption from file in Python

My Caeser cipher works interactively in the shell with a string, but when I've tried to undertake separate programs to encrypt and decrypt I've run into problems, I don't know whether the input is not ...
2
votes
1answer
216 views

AES encrypted File transfer over TCP socket; padding issue

I'm trying to do a file transfer using encrypted TCP socket with AES 256. If I transfer a file without encryption, it works fine. If I send small commands (such as 'ipconfig') to the client or ...
0
votes
2answers
85 views

Django Override password encryption

I am currently developing a tool in Python using Django, in which I have to import an existing User database. Obviously, password for these existing users have not the same encryption than the default ...
-4
votes
1answer
190 views

How do I decrypt these strings? [closed]

I am writing a encrypting/decrypting program and I am having trouble with the decryption process: phrase = 'WHO WATCHES THE WATCHERS' def chunker(seq, size): return (seq[pos:pos + size] for pos ...
3
votes
1answer
131 views

Encrypt/Decrypt an animated gif in Python without storing the final copy to HD

Okay, let's try this again. I'm trying to encrypt an animated gif with PyCrypto to be sent to someone. After the receiver gets it, they should be able to run my pycrypto script and view the animated ...
0
votes
3answers
778 views

Python: Caesar cipher encryption

Hello everyone I have a question. Why doesn't the following code dont produce any output or errors? This is a code that encrypts and decrypts user codes alpha = ['a','b','c','d','e','f', ...
-1
votes
1answer
111 views

crypto analysis of my algo

import string,random,platform,os,sys def rPass(): sent = os.urandom(random.randrange(900,7899)) print sent,"\n" intsent=0 for i in sent: intsent += ord(i) print intsent ...
0
votes
4answers
112 views

simple password validation

I wan't to make 1000 passwords and give them to users. Passwords contain 6 digits - they look like random 6 digits. When user comes there is no information besides this password, and I want to ...
-2
votes
1answer
104 views

Python encoding key, minus one character if too long

Here is my code so far: def code_block(text, key): itext = int(text) rkey = int(key) res= itext + rkey def last(): return res[-1:] if res>=11111111: last() ...
-4
votes
1answer
78 views

Python encoding blocks of text using strings [closed]

The question I've been set is: "For encoding blocks of text it is easier to work with strings than numbers, in order to avoid problems with leading zeros. So, we will need a function like ...
0
votes
1answer
114 views

python, encryption of any size code with a smaller key

So I'm trying to work to create a program which can take two inputs such as encrypt('12345','12') and it will return '33557' where the code ('12345') and been incremented by the key ('12'), ...
2
votes
0answers
157 views

Password encryption in php like web2py

i wont to implement the password encryption done in web2py in php , now i got some instructions on how to do it from massimo de piero the created of web2py but i am still cant implement it in php , ...
0
votes
1answer
145 views

Creating WPA Message Integrity Code (MIC) with Python

I tried to calculate the MIC for a WPA Handshake packet, but unfortunatelly it fails. To be more precise, I took the 802.1x packet (like the specification says). MIC = HMAC_MD5(MIC Key, 16, 802.1x ...
0
votes
1answer
295 views

How to encrypt a file with python but can be decrypted using the shell?

I need to encrypt a file, send it to another person, who then can only decrypt it using shell. I usually encrypt the file with the openssl command: openssl enc -aes-256-cbc -salt -in [filename] -out ...
1
vote
2answers
370 views

HMAC-SHA256 with AES-256 in CBC mode

I recently came across the following code sample for encrypting a file with AES-256 CBC with a SHA-256 HMAC for authentication and validation: aes_key, hmac_key = self.keys # create a PKCS#7 pad to ...
2
votes
3answers
150 views

Making AES decryption fail if invalid password

I've written my own encryption method using AES in a project I've been working on lately using PyCrypto. I use a hash to generate a 32-byte password and feed that to AES-256bit encryption using CBC. ...
2
votes
0answers
35 views

PHP EAS Encryption / Python Decryption [duplicate]

I need to encrypt a text in php and decrypt it in python. This is my php code (a standard sample): $key = "df811af36fcafd6dbd092955aa6fb15b"; $string = 'Hello World ++++'; $iv='1234567812345678'; ...
0
votes
2answers
85 views

Methods all need to be indented one level in to indicate that they are methods of the class in python

I'm following the RSA algorithm from the Wiki: http://en.wikipedia.org/wiki/RSA_(algorithm) I am using Python 3.3.0 and I'm trying to do RSA Encryption and I ran into two problems that I don't know ...
0
votes
3answers
99 views

Convert some C function to Python [closed]

i need to convert this function in C to Python: void myencrypt(char password[],int mkey) { unsigned int i; for(i=0;i<strlen(password);++i) { password[i] = password[i] - mkey; } ...
1
vote
1answer
390 views

Using PyCrypto to decrypt Perl encrypted password

I'm trying to decrypt a pass phrase stored in a file. The encryption was done with the Perl::CBC module, but I need to decrypt it for a Python script. Frankly, I don't know much (or anything really) ...
2
votes
1answer
127 views

How to decrypt Zend2 encrypted data?

I'm using Zend2 Crypt module to encrypt a data. Here's my code. $cipher = BlockCipher::factory('mcrypt', array( 'algorithm' => 'aes', )); $cipher->setKey('mypassphrase'); $encrypted = ...
2
votes
1answer
129 views

How can I encrypt a file in AES's EAX mode?

Is there a Python library which supports AES EAX mode? PyCrypto doesn't seem to support it. Is there a reason why it doesn't seem to be supported?
1
vote
1answer
149 views

Pycrypto AES-CTR implementation

I am new to python and pycrypto. I am trying to implement AES-CTR. To check my program for correct ciphering I tried to use test sequences from NIST SP 800-38A standard (section F.5). But I do not get ...
2
votes
1answer
174 views

Pyocrypt DES3 file encryption, decryption missing sections of text

I'm using a 3DES encryption from this blog (under header Applications) in python with Crypto, And I've been testing it on the Tree of Fun Files, as an example for this question the An Accountant and ...
0
votes
0answers
23 views

Pycrypto, list into AES key generator [duplicate]

Possible Duplicate: Pass list to AES key generator in PyCrypto I'm making a wrapper for an API by porting JavaScript to Python. It passes a list as the key into an AES generator e.g: ...
0
votes
2answers
210 views

Encrypt files before putting into Dropbox using Python [closed]

I want to encrypt files before uploading into Dropbox using keys and some encryption standards in Python. How would I do that in code without using any third party tools?
0
votes
1answer
184 views

Pass list to AES key generator in PyCrypto

I'm attempting to generate an AES key with Pycrypto but receive the following error: TypeError: 'list' does not support the buffer interface for the following statement: aescipher = ...
1
vote
0answers
46 views

Simplest yet secure way of using gpg in python?

I want to encrypt some plaintext in python using a key that's been generated through the gpg2 commandline. The application will only know the public key, and would encrypt the data before storage into ...
1
vote
2answers
317 views

Convert linux sha512 shadow to hex

I am trying to understand the linux shadow string format, and convert the string to a general hex format, just like how MD5 is usually represented. I was following the definitions here ...
0
votes
5answers
160 views

Python decryption with lists

I'm stuck with a decryption problem I'm having. I have a really basic cipher that is only the alphabet and is offset by 1 letter, like this: A B B C C D D E to z to A the right column ...
0
votes
1answer
77 views

bcrypt passphrase with multiple rounds of AES encryption?

I'm trying to write a simple Python solution to encrypt a file securely using a passphrase. I figured I would use something like bcrypt or pbkdf2 so that as time goes on, I could make my password ...
1
vote
1answer
41 views

Downloading File Code changes file content and affects ability to decrypt file

When I download a file from my server using Python and urlib2, the files contents are slightly different than what they should be. They are different in that there are extra lines("\r\n" or "\n") ...
1
vote
1answer
118 views

Python crypt package: Can type extra characters in password

I'm using Python's crypt package to persist encrypted passwords in a MySQL databse for a Django website. I'm not sure if this is a bug, but here's the code I'm using: To encrypt/persist the password: ...
5
votes
2answers
532 views

How to add a padding to the data to make it acceptable for AES256 encryption algorithm in pycrypto library

Can someone tell me how to add a padding to the data to make it acceptable for AES256 encryption algorithm in pycrypto library (Python). Thanks a lot in advance.. :)

1 2 3 4 5 6
15 30 50 per page