c# - Encrypt from server, decrypt on client (but not encrypt on client)? -
is there way server can provide encrypted string can decrypted on client, not re-encrypted on client? know seems kind of backwards... here's need is.
i have software key needs activated against our remote server. server needs provide client says "you active" , contain info such date it's valid until, how many licenses, etc. however, need prevent being tampered increase license count or dates (i.e, re-encrypt value new date using key found in de-compiled binary or w/e).
is such thing possible using public/private keys? or perhaps hashes?
edit
alternatively, can server provide hash client can validate server without giving client ability spoof or generate hash on it's own?
thanks in advance.
public/private key encryption should need. hashes 1 way functions; hash function make impossible retrieve original value.
in case, server has public/private key pair , client has public/private key pair. server's public key embedded client, , server has client's public key well. server can encrypt payload using it's private key , client's public key. when client wants decrypt payload, uses it's private key , server's public key. client cannot re-encrypt data without access server's private key.
http://en.wikipedia.org/wiki/public-key_cryptography - explanation of how works
http://msdn.microsoft.com/en-us/library/e970bs09.aspx - starting point .net classes make easier
Comments
Post a Comment