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

  • SEARCH
  • Home
  • 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 8684767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:23:23+00:00 2026-06-12T22:23:23+00:00

The 1st case would require to generate for each communication a HMAC identifying the

  • 0

The 1st case would require to generate for each communication a HMAC identifying the request, so the server can re-generate it to make sure the client is authorized (because the HMAC is encryped with a private key that is only known by the server and the client), while the 2nd one only requires the service to issue the certificate (or token) once, and keep it live for some minutes -ex. 15 minutes-. Of course to prevent MITM or Replay attacks it must be sent only over SSL, with all the conseguences (more bandwitdh and more CPU requirements).

Personally I find the 1st to be not only simpler but also stronger, because each request has its own unique data, while the 2nd relies on the SSL certificate integrity (I’m not saying that’s easy to crack a signed SSL certificate, but if someone would break it all the traffic would be sniffed for all communications).

So I find them to have the following pro/cons:

  • HMAC pros: unique token for each request, can be really secure against MITM and Replay attacks -by using unique data to compose the signature and a timestamp-, easy to implement
  • HMAC cons: requires the server to work for each single request to re-generate the token
  • Token pro: one token for multiple requests, useful on services that require multiple client actions
  • Token cons: requires SSL for all communications.

I think I’d need to set up some tests to get a final answer, but I’d love to hear if someone has already some knowledge or some tought based on old experiences.

  • 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-06-12T22:23:25+00:00Added an answer on June 12, 2026 at 10:23 pm

    HMACs and PKIs are designed to solve very different problems.

    If you are trying to protect the message from being modified in transit, then HMAC is designed to solve that problem, and will serve you well.

    If you are trying to prevent the message from being read in transit, than your only option is a PKI (such as SSL). A PKI provides a strictly stronger guarantee than an HMAC though — after all, if one can’t read the message, it is awfully difficult to make meaningful modifications to that message 🙂

    If you transmit the secret used by a HMAC over a PKI, note that it is impossible for the HMAC to be more secure than the PKI system. After all, if you break the PKI then you can just read the HMAC secret.

    Most all of the bandwidth overheads of SSL are going to be in the handshaking process; if you’re going to be sending anything over SSL there’s little reason to not send the rest of your communications over SSL.

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

Sidebar

Related Questions

I want to convert the 1st letter of each line to lower case up
I know that in MATLAB, in the 1D case, you can select elements with
I've created a Windows Communication Foundation service (the appDomain in this case is a
I am using OpenMP to parallelize loops. In normal case, one would use: #pragma
Hello I'm new to android programming. I would like to ask how can I
1st disclaimers: I'm not a programmer, never was had never been taught higher math
1st I have to say I know nothing bout php. I was actually doing
1st Question: How do I get the title and subtitle of a selected annotation?
This is the 1st time I am using stackoverflow, I usually find answers to
consider following: 1st APPROACH: public void f3() { f2(); f1(); } and this ...

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.