Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3939604
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:19:09+00:00 2026-05-20T00:19:09+00:00

Goal: Website1 sends Website2 user data through http requests. Problem: Website2 is ensured that

  • 0

Goal: Website1 sends Website2 user data through http requests.

Problem: Website2 is ensured that the data came from Website1, and not some hacker.

NOTE: I will not be using HTTPS, I realize that’d solve a big problem, but right now GAE doesn’t support SSL for your own domain name: http://code.google.com/appengine/kb/general.html#httpsapps

So I’ve made some great progress by encrypting and sending data between two sites, and the other is site able to decrypt and read the data. I’m on Google App Engine/Python/Django-nonreal, and this page was a great resource for getting pycrypto to work: http://code.activestate.com/recipes/576980/ Kn

So I’m comfortable with knowing user data is encrypted and that you need to have the key to read it, but how could Website2 KNOW that the request came from Website1? What’s stopping a hacker from sending the exact same request again, and Website2 thinking this hacker is valid to do stuff on Website2?

For example, couldn’t someone just listen in on the http request and record what the encrypted data was send across the line? And then the hacker could do their own request, with the same values that Website1 used before, and the hacker could do the same things to Website2 that Website1 could? Essentially the hacker would be telling Website2 that they are a valid signed-in user of Website1.

Overall Goal: Website2 is told user data which only comes from requests from Website1. Any other requests from a hacker that uses the same encrypted data Website1 sent to Website2 won’t work unless your Website1.

Not sure if I explained well enough, or if its a pretty basic understanding that I just don’t have, but thank you for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:19:10+00:00Added an answer on May 20, 2026 at 12:19 am

    In order to prevent replay attacks, you’ll need to include a nonce and MAC (Message Authentication Code).

    The MAC can simply be a HMAC-SHA1 of the encrypted message contents. The receiving side will compute the same MAC and make sure it matches. The key for the HMAC-SHA1 must be a secret known to both sides. This step is important – just because your data is encrypted doesn’t mean it can’t be tampered with. In particular, if the attacker can alter just the nonce (see next), you’ll have problems. So use a proper MAC.

    The nonce should be within the encrypted portion of the message, and used only once ever. The receiving end should record the nonce and reject any future messages with the same nonce. This is the key to preventing replay attacks.

    You can avoid having to keep an infinite amount of nonces by also attaching an expiration date to the nonce. Messages received after the expiration date should be rejected. Nonces can be deleted from the seen-nonce database after the expiration date, plus a few hours to account for possible clock differences, passes.

    Generating the nonce can be tricky to do properly. Here’s one technique:

    • When your app server starts, create a new dummy datastore entity. Cache its key, as well as your startup timestamp, until your app server terminates. Also create a counter initialized to 0.
    • When you need a nonce, generate it by hashing (entity key, startup timestamp, counter). Then increment the counter.

    You may delete the dummy datastore entity after a period longer than the greatest amount of expected clock drift passes. A few hours should be plenty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to maintain a web file server separately from my main ASP.NET
my goal is to write a stored proc that can collect all field values
The goal: To create a .NET dll i can reference from inside SQL Server
My goal is to recognize simple gestures from accelerometers mounted on a sun spot.
GOAL My goal is to find a text file or library that enables me
On my website the goal that I want to track is actually attached to
Goal: Allow a user to authentication with Facebook into an iOS application which requires
Goal: Upload a picture that shall be saved in the asp.net MVC project created
Goal Java client for Yahoo's HotJobs Resumé Search REST API . Background I'm used
Goal: Create Photomosaics programmatically using .NET and C#. Main reason I'd like to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.