T
T
theWaR_132016-04-02 19:41:15
JavaScript
theWaR_13, 2016-04-02 19:41:15

Asymmetric message encryption?

Good afternoon. Now I am doing a small project in which users communicate via WebRTC. You need to add encryption directly messages. I decided to use AES for encryption, and the Diffie-Hellman algorithm for key exchange, but a problem arose. If the user sets a private key that is too large (more than 3 digits), then js can no longer calculate it. Otherwise, the master key is too simple. What do you think is the best way to organize asymmetric encryption? I read about RSA, but, as I understand it, I will not be able to simultaneously generate private and public keys in the browser, and the project requires maximum simplicity for the user (i.e. without opening the terminal and generating keys through such terrible console commands). Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
theWaR_13, 2016-04-03
@theWaR_13

If someone is relevant, I found an excellent CrypticoJS library . Everything is described in detail in the test.html file and is just right for my question.

V
Vasily, 2016-04-02
@Foolleren

I was not seriously interested in this issue, but I think you should pay attention to elliptic cryptography, somewhere I even saw open implementations in js.

P
Pavel, 2016-04-03
@Svarog7

Why asymmetric encryption if you generate a shared Diffie-Hellman key?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question