E
E
Evgeny2016-04-11 13:59:53
Encryption
Evgeny, 2016-04-11 13:59:53

Is it possible to use one pair of keys for both encryption and EDS?

Hello!
I apologize in advance for the stupid question, but I didn’t find the answer in Google (or I didn’t look for it that way).
We have one pair of public and private keys.
We give the open one to Bob, he encrypts a message with it, which can only be decrypted if he has the closed one (that is, only we can do this).
If we need to put a digital signature, we must encrypt the hash with a private key, and anyone can decrypt it with an open one, i.e. vice versa (buried becomes open, and open becomes closed).
Therefore, using one pair of keys for both EDS and message encryption, both keys will be available to the general public, which is not good.
The question is:
If we have only one pair of keys, is it possible to use both digital signature and encrypt messages that only we can read, having a private key?
Are keys interchangeable in a one-way function with a secret? (i.e. if you use key A to encrypt and key B to decrypt, is it possible to use the same key B to encrypt and key A to decrypt?)
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Peter, 2016-04-15
@jennik

Much depends on the context.
For example:
For RSA the following would be true:
Alice has a pair of keys e (public) and d (secret). She will give the public one to Bob (naturally in a safe way).
Situation 1:
Bob needs to send a confidential message to Alice. He simply takes the message, encrypts it with Alice's public key, and sends the received cryptogram to Alice.
Alice receives the cryptogram and, using her secret key, which is known only to her, decrypts the message.
Situation 2.
Alice decided to tell the whole world that she is the most beautiful. And so that no one doubts that these words belong to her, she made an ES (electronic signature) using her secret key.
Bob decided to make sure that the words really belonged to Alice. We remember that he has her public key, with which he can verify Alice's signature.
It is not always possible to use the secret and public keys so easily in two situations at once. For example, algorithms based on elliptic curves can so far only be used in ES protocols.

V
Vladimir Martyanov, 2016-04-11
@vilgeforce

It is not clear why you think that with EDS the private key becomes public: signing should be done by only one person using the private key, and signature verification is done by everyone and everyone who has a public key. Similarly, with encryption: only the recipient has the private key.

R
res2001, 2016-04-11
@res2001

When you encrypt a message, you encrypt it with the recipient's public key.
And in the case of an EDS, your private key is used, because. you put your EDS. At the same time, the recipient uses your public key to verify the digital signature.
In any case, usually for the exchange of two people, there must be a pair of keys from one and the other. Although in the degenerate case - sending messages to yourself, you can get by with one key.
Some CIPF have different keys for EDS and encryption. For example Verba.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question