share a secret between java applet and c# server page

O

oliviergir

Hi,
I have an applet that needs to submit some data to the server via an
http GET request onto the server (an aspx page written in C#).
The url called by the applet is going to be visible by the user but I
need to make it impossible for the user to call that page again later
with fake data (unless he decompiles the applet code..) .


What i plan to do but i am not sure at all :
I suppose that I need a secret (a private key) that will be shared by
the applet and the server code.
A unique id (ex: System.currentMillis() +ip ?) generated by the
applet , encrypted with the private key and send as a parameter "uid"
to the server.

On server side, if same uid is receive twice, request is refused.
If not, I need to make sure that uid was properly "signed" with the
private key?

what do you think of that method ?
could give me sample code to achieve that ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top