4

You shouldn't encrypt large files as if they were just one message; you should split them up into small chunks and encrypt each chunk separately with an AEAD, using some construction that: Protects against modification, reordering, insertion and deletion of chunks; Protects against truncation of the file; Rotates keys once too much data has been processed ...


3

You'll have to guess the plaintext of at least one block (128 bits) that is on a 128 bit boundary from the start of the GCM ciphertext. Then you can XOR it to retrieve 128 bits of the key stream. Now the key stream you can decrypt since you have the key. This will get you a counter value. The counter in GCM mode starts with a 12 byte nonce and the counter ...


3

How is asymmetric cryptography safe under these conditions? Well, you sort of outlined (but see kelalaka's corrections) how you would use asymmetric crypto to do authentication; that is, to make sure that the message was actually sent from $A$. You ask "how does that provide privacy?". The answer, of course, is "if that's all you do, it doesn't". If we ...


2

[...], but if someone has a key to your encryption, knowing what type of encryption you are using (or running outputs against a lot of common encryption types) gives them the opportunity to reach your data using said key. Hiding the key The important thing is, that you hide the key. This goes all the way back to Kerckhoffs's principle: A cryptosystem ...


2

Maybe I misunderstood but it seems like you suggest hiding the encryption algorithm instead of your secret key, basically. Firstly, it is useless in any scenario that you want to send data to someone else to decrypt. If you aim to encrypt values so that only you will be able to decrypt them, think about which one is easier, hiding an algorithm from someone ...


1

Firstly, you misunderstood what is a signature and encryption with the public key. A signature requires a hash then sign paradigm with the senders private key so that any receiver can verify the signature. The RSA paper gave the first idea to digital signatures that were insecure and the Rabin Signature released in 1979 is the fist secure signature that ...


1

There are two scenarios: you keep the algorithm completely secret. In that case the leak of the algorithm is fatal for the security it offers. If you would lose the key as well (bruteforcing is not really an option) you might think you're still secure, while you are not. Keeping one algorithm secret is very hard, which is why Kerckhoff decided against it. ...


1

With regard to the structure of RSA key files, and how the public key is related to the private key - you can see that the modulus in the public key file is the product of the two large primes contained in the private key file by doing the following: Generate a private key: openssl genrsa -out private.key 2048 Extract the public key from the private key ...


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