47

The two options are intended for different use cases. Option 1 is intended for your use case. It encrypts the file with a key derived from a password, so that only the person who knows the password (i.e. most likely the person who encrypted it in the first place) can decrypt it. Option 2 is designed so you can share encrypted files/messages with others. The ...


22

There's one advantage of using public key cryptography over private key cryptography when you're encrypting file for yourself. When you use symmetric cryptography, you need to expose the password every time you need to encrypt or decrypt a file. With public key cryptography, you only need to decrypt the private key if you need to decrypt the file. In public ...


7

So what's the point of using a private key instead of a password if the private key itself is password protected? Why wouldn't I want to straightforwardly use option 1? In this case it's probably not a big point. But certificates can be stored on smart cards. Smart cards refuse to hand out a copy of the certificate, but they can do computations based on the ...


5

You don't say that you're dealing with malware, but I will assume you are. If the application is doing encryption, then of course it has the key. The fundamental approaches are to either analyze the application binary on disk, or to let it run and analyze the running binary. But be aware that malware authors do not want their applications to be reverse-...


3

When you copy the file to a flash drive, it remains encrypted When EFS-encrypted file is copied to a drive that do no support encryption (FAT/exFAT families), the file is decrypted before copied and copy is unencrypted. I believe that only NTFS-formatted drives support encrypted file copy. If you attempt to ZIP the file, it is decrypted first and then ...


2

IANA operation details on the root key ceremonies and procedures are at https://www.iana.org/dnssec You may be interested by section §4.2.2 of https://www.iana.org/dnssec/dps/ksk-operator/ksk-dps.txt Access to and management of cryptographic hardware is based on the principle of successive barriers in three tiers, requiring at least seven trusted ...


2

The best option is to use full-disk encryption that encrypts everything whether it's explicitly encrypted with file encryption or not. In your situation, you could try and write a file so big that it fills the whole drive, making it more likely you overwrite the original file. However, there could be data from the file written in paging (swap). You might ...


2

No, this is not generally secure. You cannot have deduplication with other users' files and privacy. But this depends on your exact threat model/security goals. Using the hash of a file to encrypt it is called convergent encryption, and is a deterministic encryption method. Notably, there is no secret key that would add security to the ciphertext. Instead, ...


2

Yes Your situation violates three of the Ten Immutable Laws of Security, namely: Law #2: If a bad guy can alter the operating system on your computer, it’s not your computer anymore Law #3: If a bad guy has unrestricted physical access to your computer, it’s not your computer anymore Law #6: A computer is only as secure as the administrator is trustworthy ...


2

You can use a simple symmetric encryption, like ChaCha20-poly1305, to encrypt the data with a key derived from the password, using Argon2id for example. The key, encoded in base64url, can be appended by the client to the link as a URL fragment. The server (and its administrator) does not need to know the password or the key: the encryption should be entirely ...


1

You give up. DRM doesn't work. It's fundamentally broken. The idea is that someone should not be able to view the data, but should be able to view the data. That's just not possible; to play the data to show it on a screen, you have to be able to understand it. If you understand it, you can make copies to whatever format you want. Hollywood attempted to ...


1

I am not an expert on either the PDF spec or PDF readers, but I would guess the encryption / decryption key for a cipher like AES is derived from the password using a Password-Based Key Derivation Function such as PBKDF2, and that the password and key are only held in memory long enough to decrypt the document. After that you can zero out both the password ...


1

Haven't tried, but in NTFS, "deallocated space" and "metadata" is not the same thing. Try to recover a file: is it recoverable, or is it garbage? (I would agree that not deleting the name of a file is still a security risk, and freed files metadata should be considered deallocated space, but maybe Microsoft thinks differently). Or maybe (...


1

I found I was going about this all wrong and I found gpg-preset-passphrase, which seems to be for prepopulating passphrases in gpg-agent, meaning gpg2 won't ask for a passphrase as long as I call gpg-preset-passphrase from my script before running the gpg2 encrypt-and-sign I posted in my question. Just make sure to start gpg-agent with a very high --max-...


1

The idea behind encryption is that the original can be restored by decrypting again, that means that the process is lossless and thus the quality of the "file" is not harmed.


Only top voted, non community-wiki answers of a minimum length are eligible