I am writing a python program in which I use encryption. The user can set the password and when it will be an input, the database will be decrypted. However, the function needs the decryption key to decrypt. So I thought about hiding that key somewhere(encryption and decryption key will be generated dynamically which means that the user on new device will have another decryption key.). I have no idea where I could hide it, so program could use it, but the user could not crack it.
I have an Encrypted object in Minio, encrypted using the ASE 128 bit CBC algorithm.
The object is quite large (~50 MB) so instead of loading it into the memory completely (which may cause out of memory exception), I am retrieving it in chunks of 1MB. I need to decrypt it before use.
Is it possible to decrypt the object in this way (1MB at a time, the whole object was encrypted in one go)? If yes, how can I do it? I have tried decrypting 16-byte chunks which produce the following errors:
javax.crypto.BadPaddingException: Given final block not properly padded
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
Do browsers have a list with sites that are supposed to be encrypted?
Could a man in the middle attack be performed by presenting a user a http site instead of an https site? That way the server would not need to provide a certificate.
It wouldn’t show up as a secure site in the browser but I think most people wouldn’t notice it. And it wouldn’t warn the user, because there are legitemate sites who don’t use https.
Would such an attack be possible or does the browser notice that the site is supposed to use https but doesn’t?
I have an encrypted "*.pbl" file (100kb) that contain my forgotten password. My password is very easy: number+lower case letters with length=6. Once I find the Hashed password I’ll quickly recover my password.
Of course the hash of a file can be found but it is still not the hash of a password. How do I find the hashed password?
One thing I could possibly do is to create another account with another password; this way I can generate a new encrypted file with the exactly same format and I might be able to find the position of my passwords.
PS: I did check related post but obviously I don’t need to do things like SQL injection because the file has always been on my local machine.
I recently received a PDF file that, when attached to a gmail message, causes a warning to be displayed as follows:
Encrypted attachment warning – Be careful with this attachment. This message contains 1 encrypted attachment that can’t be scanned for malicious content. Avoid downloading it unless you know the sender and are confident that this email is legitimate.
However, I am able to open the file without getting prompted for a password. I followed the advice given in this security stack exchange question and used the
pdfid.py program whereupon I got the below output:
/Encrypt flag that’s set on the above output.
Why is Gmail telling me that the file is encrypted even though I can open it without being prompted for a password and would that, on its own, be reason for concern?
Some of my collegue give me 2 file of private key, one is encrypted and one passphrase. But it seems that’s the wrong passphrase.
Is it even possible to recover the pass phrase with the ecrypted and decrypted private key files?
I have a need to encrypt OAuth access and refresh tokens stored in the Google Cloud Datastore.
The goal here is to ensure that if the Datastore entities are accessed independently of the code, the OAuth tokens will be encrypted and thus unusable.
This is not intended to protect against situations where both the code and Datastore are exposed together.
To securely store the data, I have leveraged PyCrypto’s AES implementation, and created a custom property type that automatically encrypts/decrypts the properties when accessing them.
The logic is as follows:
To store – I generate a random initialization vector, encrypt the data, then I base64 encode both the initialization vector and the encrypted data, and store them together in a text property.
To retrieve – I fetch the text data, slice off the base64 encoded initialization vector, and proceed to decode then decrypt the remaining data.
In addition to securing my own application, I am considering publishing the details and distributing the relevant code for others, so I want to ensure I have a secure or "correct" implementation of this functionality
(Note I have stripped out App Engine specific code and just included relevant encryption code here, for simplicity. The actual implementation allows it to be dropped into existing Datastore models in a backwards-compatible fashion).
from Crypto.Cipher import AES from Crypto import Random from base64 import b64encode,b64decode from meta_secure import aes_key #aes_key is a 32 digit alphanumeric string (GUID) #encryption scheme def encrypt_value(value): rand = Random.new() init_vector = rand.read(16) aes = AES.new(aes_key,AES.MODE_CFB,init_vector) encrypted = b64encode(aes.encrypt(value)) return '%s%s'%(b64encode(init_vector),encrypted) def decrypt_value(value): init_vector = b64decode(value[:24]) aes = AES.new(aes_key,AES.MODE_CFB,init_vector) decrypted = aes.decrypt(b64decode(value[24:])) return decrypted
Have I used PyCrypto and AES correctly for the goal as stated above?
My laptop was stolen a few weeks ago, I got it back and my drive was encrypted. How can I be sure it wasn’t decrypted and the data accessed during this time? I thought about checking the timestamps of last opened/modified, but as I understand they could have been manually reverted back after opening.
Thanks for any help.
I want to encrypt an HTML document. My question is, if the following is known, is that going to weaken encryption?
- It is a text-based document
- It starts with
<DOCTYPE HTML>or a few variants of
- This is followed by an
<HTML>tag, followed by a
<HEAD>tag, which contains a number of ‘
Would this knowledge help a hacker to decrypt without the decrypt key? Would such knowledge make my documents effectively un-encryptable?
My apologies if this is a very simple question. I am a neophyte.
I’ve spent several hours searching the internet to see if anyone has cracked this encryption yet, but without any luck. I don’t want to reward criminals for their activity, but I do have a few files that I absolutely need. Besides finding a decryptor or paying the ransom, do I have any other options for recovering my files? I have been able to successfully restore a couple of systems from backups, but my personal system wasn’t backed up and has temporarily housed important files.
I’m somewhat familiar with best practices of backing up important files and/or saving to the cloud, but I will definitely be more vigilant in the future. It was mostly due to the ‘it will never happen to me’ mindset.
- I’ve identified how they got in, and have reset the password on that account (and all other accounts just in case).
- I did have malware bytes and sophos installed. Looking at the Event Viewer, there are logs of both of these software being successfully uninstalled.
- The files are renamed like this: originalFileName.orig.[8-digit-hex].[firstname.lastname@example.org].makop
- The ransom note file says to contact them at email@example.com to pay them in bitcoins.
- They’ll decrypt a couple of files for free, and then send me a scanner-decoder program after being paid.