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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:48:58+00:00 2026-05-14T08:48:58+00:00

I am just starting to think about how api keys and secret keys work.

  • 0

I am just starting to think about how api keys and secret keys work. Just 2 days ago I signed up for Amazon S3 and installed the S3Fox Plugin. They asked me for both my Access Key and Secret Access Key, both of which require me to login to access.

So I’m wondering, if they’re asking me for my secret key, they must be storing it somewhere right? Isn’t that basically the same thing as asking me for my credit card numbers or password and storing that in their own database?

How are secret keys and api keys supposed to work? How secret do they need to be? Are these applications that use the secret keys storing it somehow?

  • 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-14T08:48:59+00:00Added an answer on May 14, 2026 at 8:48 am

    Basically elaborating on what’s outlined here.

    Here’s how it works: let’s say we have a function that takes a number from zero through nine, adds three and, if the result is greater than ten, subtracts ten. So f(2) = 5, f(8) = 1, etc. Now, we can make another function, call it f’, that goes backwards, by adding seven instead of three. f'(5) = 2, f'(1) = 8, etc.

    That’s an example of a two-way function and its inverse. Theoretically, any mathematical functions that maps one thing to another can be reversed. In practice, though, you can make a function that scrambles its input so well that it’s incredibly difficult to reverse.

    Taking an input and applying a one-way function is called “hashing” the input, and what Amazon stores on their system is a “hash” of your secret key. SHA1 is an example of this kind of “one-way” function, it’s also hardened against attacks.

    The HMAC function builds on established hash functions to use a known key to authenticate a string of text. It works like this:

    • You take the text of your request and your secret key and apply the HMAC function.
    • You add that authentication header to your request and send it to Amazon.
    • Amazon looks up their copy of the secret key, and the text you just sent and applies the HMAC function.
    • If the result matches, they know that you have the same secret key.

    The difference between this and PKI is that this method is RESTful, allowing a minimum number of exchanges between your system and Amazon’s servers.

    Isn’t that basically the same thing as
    asking me for my credit card numbers
    or password and storing that in their
    own database?

    Yes, though the damage someone can do with S3 seems to be limited to draining your account.

    How secret do they need to be? Are
    these applications that use the secret
    keys storing it somehow?

    At some point, you’re going to have to load the secret key, and with most Unix based systems, if an attacker can get root access they can get the key. If you encrypt the key, you have to have code to decrypt it, and at some point the decryption code has to be plain text so it can be executed. This is the same problem DRM has, except that you own the computer.

    In many cases, I just put secret keys in a file with limited permissions, and take the usual precautions to prevent my system from being rooted. There are a few tricks to make it work properly with a multiuser system, such as avoiding temporary files and such.

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

Sidebar

Related Questions

OK, so I'm just starting to think how to implement a new graphical plugin
I’m starting to think about and develop an architecture for a big web application,
Just would like some thoughts of what you think about my strategy to learn
I'm just starting out with the whole ajax thing and I need some help.
Just starting out in asp.net. Have just created a login.aspx page in my site
Just starting to explore the 'wonders' of regex. Being someone who learns from trial
Just starting out with subversion, have set up repos for 3 current projects and
Just starting with js, decided to convert Friendfeed to a fluid app, and as
Just starting to learn ASP.NET (C#) and I am using Visual Studio 2008. I
Im just starting a project and since this project is personal I was wondering

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.