0

I see advantage of using container in it that offer work with more files rather than with one but is there some advantage in encryption technique?I would like to know if it encrypt each single file in a container (or an archive) or is there some another technique used to encrypt it?I want create my own file container as a school project and add some features like encryption etc. therefore i would like to gain more complex overview firstly.

0

Both ways are possible: encrypting the whole archive or encrypting each file in the archive. Encrypting each file separately is more flexible because this way each file could be encrypted with a different key if needed and each file could be extracted separately, i.e. no need to decrypt the whole archive to get a single file. It comes with a bit more overhead though.
From the security perspective both ways can provide sufficient protection of the content if properly implemented.

| improve this answer | |
  • Can you explain more how works encryption of whole archive, please? – Emanuel Frátrik Sep 22 '19 at 18:16
  • @EmanuelFrátrik: I'm not sure what your problem of understanding here is. Encrypting the whole archive means to archive everything and then encrypt the result. The reverse is of course to decrypt it again in order to get to the unencrypted archive. – Steffen Ullrich Sep 22 '19 at 18:31
  • In my simple overview i see that if you encrypt each file separately u have to implement for every file format its own function or something but i cannot understand clearly how it will work in case of whole archive file. – Emanuel Frátrik Sep 22 '19 at 18:48
  • @EmanuelFrátrik: I'm not sure if this is really a security problem anymore or a basic understanding of how file manipulation primitives can be combined. If you have an encrypt and an archive primitive you could first encrypt each file and then archive these into a new file or you can first archive all the plain files into an archive file and then encrypt these. – Steffen Ullrich Sep 22 '19 at 18:57
  • I got it thanks. – Emanuel Frátrik Sep 22 '19 at 19:03

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