2
$\begingroup$

At the risk of sounding stupid and being laughed at...I must ask this question. What is required to decrypt an encrypted file? Obviously you need the appropriate key to decrypt, but is any other information needed in order to correctly decrypt the content?

Please forgive me as I am just learning cryptography and this is the first time I've had to handle encrypting/decrypting files in a program.

Here is the scenario. I have a Python program that generates a file. This program also needs to encrypt that file and then send it to someone else. I'm using a library called keyczar for my cryptography tools. And I'm encrypting the file using AES-256.

My concern is that the person receiving the file won't be able to correctly decrypt the file because they'll be using their own system to perform the decryption process. What exactly does the person receiving the file need to correctly decrypt the file? Do they only need the AES key? Or do they need to know details about the encryption process such as the header, initialization vector, and signature?

$\endgroup$
1
  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$
    – e-sushi
    Dec 17, 2017 at 13:30

1 Answer 1

3
$\begingroup$

KeyCzar is a cryptosystem on its own. It defines a container format, with a header, IV, ciphertext and possibly a (symmetric) signature. The keys it uses are also not just keys, they contain additional information. These "keys" may even contain multiple keys, i.e. an additional one for the signature creation.

To decrypt KeyCzar encrypted files you need a program that is compatible with KeyCzar. Many libraries can be downloaded from the KeyCzar GitHub site. Alternatively you can implement your own library given the specifications hosted on the same site. KeyCzar can be used from the command line as well.

In general you need to understand the protocol (and protocol version) that is being used to encrypt/decrypt files. Just specifying that something is encrypted using AES-256 doesn't say much at all.


Note that KeyCzar also contains methods for asymmetric encryption. You should however first be able to trust the public key of the receiver for that to be useful.

$\endgroup$
1
  • $\begingroup$ @CM-Dev – It’s nice to notice you’re so enthusiastic about cryptography, but comments are not for extended discussion! That’s what the chat is for. So, this conversation has been moved to chat. $\endgroup$
    – e-sushi
    Oct 14, 2015 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.