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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:15:25+00:00 2026-05-23T10:15:25+00:00

On a new system, we require a one-way-hash to compute a digital signature from

  • 0

On a new system, we require a one-way-hash to compute a digital signature from binary input (e.g., a kilobyte of text, or larger text-and-binary files). The need is similar to how Scons (build system) hashes command-lines and source files, and how Git (version control system) hashes files to compute a signature for storage/synchronization.

Recall that Scons uses MD5, and Git uses SHA-1.

While MD5 and SHA-1 have been “broken”, neither Scons nor Git are using their hashes specifically for security (e.g., it’s not to store passwords), so general practice still considers those algorithms acceptable for that usage. (Of course, this is partially a rationalization due to legacy adoption.)

QUESTION: Would you use SHA256 (not MD5 nor SHA-1) for a (non-crypto/security) one-way hash in a new system?

The concerns are:

  1. MD5 and SHA-1 have a long history of adoption
  2. SHA256 is relatively new (not as much history), but
    seems to be currently recommended for new work (but
    “stronger” algorithm strength is not
    specifically required for my
    application)
  3. SHA256 is more time-expensive to
    compute
  4. SHA256 produces a longer key (these
    will be used as dir/file names, and
    stored within index files), but I
    suppose I could truncate the
    produced key (hash is less strong,
    but should be sufficient), or just assume storage is cheap and file systems can handle it.

I’d be particularly interested in an answer consistent with the Scons or Git communities saying, “We’ll keep ours forever!” or “We want to move to a new hash as soon as practical!” (I’m not sure what their plans are?)

  • 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-23T10:15:26+00:00Added an answer on May 23, 2026 at 10:15 am

    Yes, I would use SHA-256. SHA-256 had a lot more than security purposes in mind; in fact one of the reasons that SHA1 needed to be replaced was for the very reason you need a hash function. A hash algorithm produces a finite site output; while having an undetermined amount of input. Eventually there will be a collision. The larger the output; the less likely of a collision (when using a proper hash algorithm).

    Git went with SHA1 because they use it as file names; and they wanted it to be small and compact. SHA256 produces a much larger digest; consuming more disk space and more data to transmit over the wire. This question specifically addresses what would happen if git were to encounter collisions.

    To look at your points:

    1. SHA256 has been in the wild long enough that if there were problems; we should have seen them by now.
    2. It isn’t “stronger” per-se, it’s less likely to produce a collision (if that is your criteria for stronger; then yes it is stronger).
    3. SHA-256 is slower; yes. Much slower? Depends on what your needs are. For 95% of people; it’s performance is acceptable assuming you’re using a proper implementation.
    4. In general, truncating the hash of SHA2 is an okay thing to do.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the new System.Web.Optimization and have created a bundle like this: bundles.Add(New
Public extreme_foods As New System.Collections.ArrayList() Dim i As Integer i = 1 For Each
string exeFile = (new System.Uri(Assembly.GetEntryAssembly().CodeBase)).AbsolutePath; string exeDir = Path.GetDirectoryName(exeFile); string fileName = Path.Combine(exeDir, @..\..\xml\SalesOrderXMLData.csv.xml);
Microsoft introduced a new System.IO.MemoryMappedFiles namespace in .Net 4. Does anyone know if it
I have starter new System.Diagnostics.Process and it launchs FireFox. How can I obtain the
System.Data.SqlClient.SqlConnection conec = new System.Data.SqlClient.SqlConnection(data source= + servidor + ; initial catalog= + basedatos
I was just prototyping a new system for deferring certain operations until out of
I'm trying to create a new System.Threading.Thread object using Jscript, but I can't get
When you're prototyping a new system, what guideline(s) do you use to mark a
My company and I are building a new system for a relatively large client.

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.