B
B
benzoback2017-01-16 10:59:02
Java
benzoback, 2017-01-16 10:59:02

GOST 2015 and Diffie-Hellman, how to make friends?

Tusk:
There are two opponents who agreed on everything from the very beginning. I need to write a program that each of my opponents will later have on their computer. The program must encrypt the text according to the GOST-2015 encryption standard (which is the latest one), and then, as they wrote to me, "one opponent encrypts the text and sends it to another opponent, and then sends the key to decrypt the ciphered text using the protocol (or algorithm) Diffi- Hellman.
The essence of my question, I will immediately indicate that the first opponent is A, the second is B. I'll start and start. A enters the program, enters the text and the program encrypts it according to GOST, the output: ciphertext and decryption key. And now directly the question is what should happen next?It would be cool if you scattered the further algorithm point by point. I most likely just did not fully understand the mechanics of the work of Diffie-Hellman, and most likely GOST.
Thank you all in advance! It would be really cool if someone who understands and understood what I wrote came out, wrote Skype (or telegrams and other instant messengers), so that later, if necessary, I would ask a couple of questions. That would be awesome)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2017-01-16
@benzoback

sends a key to decrypt the ciphertext using the Diffie-Hellman protocol (or algorithm)

There is something wrong with this sentence. The Diffie-Hellman algorithm allows two parties to agree on an encryption key without transmitting data from which a third party could obtain this key (except for the MiTM attack).
As a rule, with this method, the parties at the beginning of communication develop a common session key, and then use it when exchanging messages.

A
Andrew, 2017-01-16
@OLS

Usually, Diffie-Hellman just generates a session key, on which the message will be encrypted with some block cipher, for example, GOST 2015.
But if it is important for you that the program first generate a random key and encrypt it with a block algorithm, and only then carry out an exchange using Diffie-Hellman, then this is also possible, although somewhat redundant:
1) agree on the Diffie-Hellman session key in the usual manner;
2) encrypt your key with this key and send it to subscriber B via the channel.
PS Are they definitely "opponents" and not "subscribers"?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question