2

How can I implement encryption between server side in (php/python) and C++ (Win32/Native Windows)?

I have to transfer data between server side (using php or python) and client side (C++ using Win32 APIs). I am not sure that what functions/APIs or Libs I can use on the both sides so that both sides should be able to communicate. I am not looking for some complicated public/private key or using https but a simple encryption method. Any help in this regards would be of great help.

Thanks in advance!

Martin v. Löwis
  • 124,830
  • 17
  • 198
  • 235
Humble Learner
  • 791
  • 12
  • 26
  • Rather than saying "I Want Encryption" you should come up with a series of attacks you would like to protect against. The tools you use when you are just trying to avoid eavesdropping is quite different from the tools you will use to limit communication to only a defined set of trusted parties. – SingleNegationElimination Nov 13 '10 at 00:29

1 Answers1

3

Use OpenSSL on client side and OpenSSL on server side. In other way you writing "I am not looking for some complicated" but if you don't want use some complicated then you don't have encryption. Easiest way is use cleartext transmission without encryption, if you searching something like this use for example ROT13 (str_rot13) but this is not give you any encryption.

Svisstack
  • 16,203
  • 6
  • 66
  • 100
  • Thanks Guys! Yes, I'm aware of ROT13. I think I do have a better idea than that. Pick up a secret key and do an XOR or ADD or any other arithmatic operation on buffer(=size of secret key) while looping through the file. Not the best thing to do but still better than ROT13. I am looking for some encryption APIs or Libs that can implement the same algorithm on both sides and can be used for both encrypt and decrypt. Any Recommendations? – Humble Learner Nov 13 '10 at 02:09
  • @Humble Learner: write by self, this is a simple code, you don't find to this library because this is few lines. – Svisstack Nov 13 '10 at 02:22
  • I can write this and that's not my question. I was looking PHP/Python equivalent to Windows Crypto APIs as mentioned here: http://msdn.microsoft.com/en-us/library/ms867086.aspx – Humble Learner Nov 14 '10 at 03:01