Skip to content

Commit

Permalink
1024 to 4096 bits security update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cr0w Tom committed Nov 8, 2017
1 parent fb52c2c commit 1c4617f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Block_SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def certificateCreation():
print "Creating a new key pair:"
print "Warning: This is a pseudo-random generation.\n"
k = crypto.PKey()
k.generate_key(crypto.TYPE_RSA, 1024)
k.generate_key(crypto.TYPE_RSA, 4096)

# create a self-signed cert
cert = crypto.X509()
Expand Down Expand Up @@ -276,7 +276,7 @@ def certificateUpdate():
ans = raw_input("Do you have your old keys.key file with your key pair? [Y]es [N]o, default: [Y]\n")
if ans == "n" or ans == "N":
k = crypto.PKey()
k.generate_key(crypto.TYPE_RSA, 1024)
k.generate_key(crypto.TYPE_RSA, 4096)
print "Creating a new key pair:"
print "Warning: This is a pseudo-random generation.\n"
else:
Expand Down Expand Up @@ -510,7 +510,7 @@ def sendCertificate(i):
print "Please first run the -cc or the -u script.\n"


def encrypt_file(key, in_filename, out_filename=None, chunksize=64*1024):
def encrypt_file(key, in_filename, out_filename=None, chunksize=64*4096):

#Thanks to Eli Bendersky: https://eli.thegreenplace.net/2010/06/25/aes-encryption-of-files-in-python-with-pycrypto/
if not out_filename:
Expand All @@ -535,7 +535,7 @@ def encrypt_file(key, in_filename, out_filename=None, chunksize=64*1024):
outfile.write(encryptor.encrypt(chunk))


def decrypt_file(key, in_filename, out_filename=None, chunksize=24*1024):
def decrypt_file(key, in_filename, out_filename=None, chunksize=64*4096):

#Thanks to Eli Bendersky: https://eli.thegreenplace.net/2010/06/25/aes-encryption-of-files-in-python-with-pycrypto/
if not out_filename:
Expand Down

0 comments on commit 1c4617f

Please sign in to comment.