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 7983887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:05:55+00:00 2026-06-04T11:05:55+00:00

My team and I are working on an API/Middleware system that will require all

  • 0

My team and I are working on an API/Middleware system that will require all requests made to the middleware layer to sign the request with a public and private key for security. Most of these requests are going to be made server to server with the exception of mobile applications such as iPhone and Android apps that will directly query data from the middleware.

We have implemented our signature libraries very closely mirroring the way the Amazon Market API works using sorted query strings and doing HMAC 256 hashing with public and private keys to generate a signature that is compared upon receipt using the same algorithm.

Unfortunately, we just learned (a little late in the game) that in order to release iPhone apps through the app store you have to meet certain government criteria in order to implement the crypto libraries (read as export restrictions). Now we are being forced to decide if we should re-write our signing algorithms to use a much more simple method such as appending a private key to the query string and SHA1() hashing it for comparison.

I HATE taking a highly secure method and reducing it to just hashing in a private key, but I’m not familiar enough with security and crypto to know what I am losing in the long run by dropping HMAC 256. (Note: the query string already includes the public key)

For example, we currently order our query string and perform an operation like this to sign it:

$signature = base64_encode( hash_hmac( 'sha256', $querystring, $private_key, TRUE ) );

If we are forced to not use the crypto class in our apps then our signatures would look like this:

$signature = base64_encode( sha1( $querystring . $private_key ) );

Technically we may meet the criteria to use the library in our app, but I don’t know if I want to risk the legal ramifications if the US Gov’ment decides that what we are doing doesn’t exactly meet their legal description of ‘authentication’.

Any and all advice from you security gurus out there is much appreciated! What am I losing by using the second code example, does it make hacking our middleware any easier?

  • 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-04T11:05:57+00:00Added an answer on June 4, 2026 at 11:05 am

    In case anyone else ends up in a similar situation, at least in our circumstance, the encryption method we are using (described above) does fit within the legal requirements and works with Apples ToS. We basically implemented an Amazon AWS style authentication, though in hindsight OAuth 1.0 would have been just a little stronger method with pre-built libraries to help along the way.

    IF you were to do this type of authentication in an app today I would definitely suggest looking to OAuth.

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

Sidebar

Related Questions

Our team has recently been working on a logic and data layer for our
Working with C# and Team Foundation Server I am working on a webservice that
I am working with a team that works on a very large software project,
Our team is working on a new application that we started with Rails 3.1
My team has a web site with a RESTful API. We're is working on
I'm working with a team that's building an engine for a variety of 2D
We're all development team working on a Django site. Recently we've begun using zc.buildout
All, I have a 20 member dev team working on a development project. To
Our team is working with TeamCity and I am building a deployment system for
Our team is currently working on some killer ios location app that we fear

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.