D
D
deafmovie2021-03-23 18:02:30
Encryption
deafmovie, 2021-03-23 18:02:30

How to make a cipher in the application and decrypt it on the php server?

Gentlemen, please tell me how I can create a cipher in the application (C ++, winfoms) so that when it connects to the site - (I will transfer it through the refferer) - and decrypt it on the side of the site. Identify the connection.

How can I make it so that each time the cipher is different - but always decoded as correct. I will be grateful to you for the url, or real examples in php, or literature available for easy understanding and implementation.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Developer, 2021-03-23
@samodum

RSA

S
Stalker_RED, 2021-03-23
@Stalker_RED

Apply a digital signature .
Create a pair of keys. Public (public) key in the application, private (secret) on the server.
You encrypt any message with a public key, send it, if you managed to open it with a secret one, everything is fine.
But you should understand that attackers can "get" this key from your application, and forge messages.
If this risk is unacceptable, it is possible to generate session keys directly when creating a connection, as in SSL , which greatly complicates the attack. Browsers have been doing this for a long time.
For all this, there are ready-made implementations, just connect, and go!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question