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.

Many
  • 103
  • 1

1 Answers1

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.

Steffen Ullrich
  • 184,332
  • 29
  • 363
  • 424
  • Can you explain more how works encryption of whole archive, please? – Many 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. – Many 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. – Many Sep 22 '19 at 19:03