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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:11:14+00:00 2026-05-15T09:11:14+00:00

I need to know the cost of succeeding with a Preimage attack (In cryptography,

  • 0

I need to know the cost of succeeding with a Preimage attack (“In cryptography, a preimage attack on a cryptographic hash is an attempt to find a message that has a specific hash value.”, Wikipedia).

The message I want to hash consists of six digits (the date of birth), then four random digits. This is a social security number.

Is there also a possibility to hash something using a specific password. This would introduce another layer of security as one would have to know the password in order to produce the same hash values for a message.

I am thinking about using SHA-2.

  • 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-15T09:11:15+00:00Added an answer on May 15, 2026 at 9:11 am

    If you want to know how expensive it is to find a preimage for the string you’re describing, you need to figure out how many possible strings there are. Since the first 6 digits are a date of birth, their value is even more restricted than the naive assumption of 10^6 – we have an upper bound of 366*100 (every day of the year, plus the two digit year).

    The remaining 4 ‘random’ digits permit another 10^4 possibilities, giving a total number of distinct hashes of 366 * 100 * 10^4 = 366,000,000 hashes.

    With that few possibilities, it ought to be possible to find a preimage in a fraction of a second on a modern computer – or, for that matter, to build a lookup table for every possible hash.

    Using a salt, as Tom suggests, will make a lookup table impractical, but with such a restricted range of valid values, a brute force attack is still eminently practical, so it alone is not sufficient to make the attack impractical.

    One way to make things more expensive is to use iterative hashing – that is, hash the hash, and hash that, repeatedly. You have to do a lot less hashing than your attacker does, so increases in cost affect them more than they do you. This is still likely to be only a stopgap given the small search space, however.

    As far as “using a password” goes, it sounds like you’re looking for an HMAC – a construction that uses a hash, but can only be verified if you have the key. If you can keep the key secret – no easy task if you’re assuming the hashes can only be obtained if your system is compromised in the first place – this is a practical system.

    Edit: Okay, so ‘fractions of a second’ may have been a slight exaggeration, at least with my trivial Python test. It’s still perfectly tractable to bruteforce on a single computer in a short timeframe, however.

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

Sidebar

Related Questions

Need to know this so that i could send DTMF and that is going
I need to know a couple of things, concerning IRC servers that I couldnt
I need to know about the uniform cost search algorithm. In the uniform cost
I know that the question has been asked before , but it's been two
I would like to estimate the initial cost that I would need to afford
I know that I can hash singular values as keys in a dict .
I know that many has been ask for how to create a SMS server,
Need to know which event triggered after text selection done in Apple iPad. It
I need to know how to change background of expanded list item when it
I need to know how to exclude files/folders from php generated zip. Here is

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.