Re: SHA1 Hashing on different machines

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Chris Taylor (chris_taylor_za_at_hotmail.com)
Date: 01/01/05


Date: Sat, 1 Jan 2005 18:27:11 +0200

Hi,

For a straight SHA1 hash, the hash value should be consistent on all
machines for a given set of data. However if you are salting the the input
data (ie. the password) with some machine specific salt this would cause a
problem. If you provided some code to show how you are performing the hash,
that might help to resolve your problem.

-- 
Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor
<johnrudy3@aol.com> wrote in message
news:1104445346.861674.55660@z14g2000cwz.googlegroups.com...
> Bit of an interesting problem I've encountered -- and one which I'm
> sure is due to my own ignorance in the ways of cryptography.
>
> I have a fairly simple trouble ticket-tracking application I've just
> rolled out from my dev machine to our test server here at work, so the
> techies can start beating up on it. The logins use a one-way hash using
> the SHA1 algorithm to store the passwords in the database.
>
> (Basic process: When creating a user, supply password, it gets hashed
> and sent in. When user logs on, hash their entered password and compare
> bytes against what's in DB.)
>
> This works GREAT on my system. But I performed a backup of the SQL
> Server database for this app, restored the backup on our test server,
> deployed the application, tied it to the server, and none of the logins
> work now.
>
> The hashed password bytes are the same on test as on my machine.
>
> I am typing the passwords in correctly. (Figured I'd toss that out NOW
> ... :D)
>
> The component that performs the hashing and comparisons is deployed to
> both machines in the bin directory of the virtual directory.
>
> The component that performs the hashing and comparisons is the same
> version on both machines.
>
> The web app components are the same versions on both machines.
>
> And, um, naturally I didn't build in any back doors. :)
>
> Are there any known issues with the hashing that might be
> machine-specific? Any workarounds? Will I have to kick open a remote
> debug session against the server to trace this ugliness?
>
> Any help would be appreciated. Thanks in advance, and happy new year!
> John Rudy
> johnrudy3@aol.com
>


Relevant Pages

  • Re: [PATCH] Allow 32-bit and 64-bit hashes
    ... The sym2 driver would like to hash a u32 value, ... call hash_longand rely on integer promotion on 64-bit machines, ... -static inline unsigned long hash_long(unsigned long val, unsigned int bits) ...
    (Linux-Kernel)
  • Re: maintaining order in a hash (without Tie::IxHash)
    ... >> of insertion without a counter (internal to this hash or external)? ... the excuse of not wanting/able to install modules is usually ... >> bogus as there are many ways to install modules on almost any platform. ... nc> difficult to propagate the modules to prod machines. ...
    (comp.lang.perl.misc)
  • Limit the route hash size.
    ... I got the following from the boot of one of our really large machines: ... routing cache hash table of 33554432 buckets, ...
    (Linux-Kernel)
  • Re: [opensuse] saving boot-time console output
    ... Hash: SHA1 ... I have seen it empty for ... years in my machines. ...
    (SuSE)
  • Re: [root user] How to disable root account?
    ... that's why we distribute the hash of the root password ... (And the machines do an update/upgrade regularly.) ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)