N
N
Nikita Petrenko2013-04-24 15:36:14
Encryption
Nikita Petrenko, 2013-04-24 15:36:14

Two keys for different decryption of ciphertext, is it possible?

The situation is this: is it possible to combine 2 different texts and encrypt them in such a way that the first text opens with the first key, and the second with the second? Is it possible in principle and, if so, how is it implemented, by what software, etc.?
For example:
There are 2 texts: "Text 1" and "Text 2"
Somehow we encrypt them together, we get a single encrypted text - "Text 3".
And we have two keys on our hands: “Key 1” and “Key 2”. When using "Key 1" when decrypting "Text 3" we get "Text 1" at the output, when using "Key 2" we get "Text 2" at the output.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
StepEv, 2013-04-24
@StepEv

This is one of the variants of steganography.
The only way is to put two ciphertexts into one container and teach the software to choose the right one by the key. Ready-made software I have not met.
Usually they go in a simpler way - they hide the very fact of the presence of a cryptographic message. It's called steganography. Another option is to simply destroy the cipher container upon entering an alternative password. Forever :)
Hidden volume in TrueCrypt will most likely solve your problems. That being said, you can have a regular volume to divert your eyes from :)

N
nerudo, 2013-04-24
@nerudo

I feel in my gut that in TrueCrypt (the mechanism of Hidden Volumes) this is approximately how it is done. But I'm not familiar with the theoretical foundations.

K
KEKSOV, 2013-04-25
@KEKSOV

As one of the possible options, if I understood your task correctly:
We make a container in which there are two parts - a title and content. The header, in turn, is divided into two parts (according to the number of passwords used). Each password is used to encrypt its part in the header. When decrypting, the program first of all tries to decrypt the header, having received success for some of the parts, the program decrypts the corresponding part of the content.
In fact, this is a very simplified analogue of the file system. You can still get confused and encrypt the text not with the user's password, but with some random long password that is written in the header. In this case, it will be possible to store the title separately from the text, and the user, even if he is persistently asked for a password, will not be able to help.

S
StepEv, 2013-04-25
@StepEv

In short, the author and commentators, no offense - read the basics of cryptography first, learn how modern ciphers and cryptosystems work. Then there will be no such questions and no answers either.

F
FilimoniC, 2013-04-25
@FilimoniC

I have not seen such algorithms, and it seems that they do not exist.
The only option is two blocks of data. One - with one key, the second - with another. The software must determine the start itself. This is how TrueCrypt works.
It is easier when the decryptor assumes the presence of noise in the stream, and the boundaries of the stream are not explicitly defined - then it will not be obvious to him that it is not being decrypted from the beginning.
In the case of a banal option, when a file for a couple of gigs is decrypted into a couple of kilobytes, and even from the end, something is obviously wrong

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question