sha1

Does GIT have evil twin issues?

In ClearCase evil twin occurs when two files are found with the same name in two different versions of the directory, and If the element OIDs are different but the names are the same. In GIT the SHA1 id is always unique and file with same name always have different SHA1 id’s. We don’t have a concept of Evil twins, but there are likely ...

How to create a SHA1 digest on a tree of objects?

Let's say that I have a tree of objects of which every one have a string representation. I want to create a SHA1 digest on the whole tree. The easiest way would be to recursively go over each node of the tree. For each node I would concatenate (as simple strings) the SHA1 digests of all the children, add the string representation of th...

Is there any difference between md5 and sha1 in this situation?

It is known that 1. if ( md5(a) == md5(b) ) 2. then ( md5(a.z) == md5(b.z) ) 3. but ( md5(z.a) != md5(z.b) ) where the dots concatenate the strings. EDIT --- Here you can find a and b: http://www.mscs.dal.ca/~selinger/md5collision/ Check these links: hexpaste.com/qzNCBRYb/1 - this is a.md5(a)."kutykurutty" hexpaste....

SHA1CryptoServiceProvider changed in .NET 4

I am currently trying to upgrade a project of mine from .NET 3.5 to .NET 4.0 Everything was going really well, all code compiled, all tests passed. Then I hit a problem deploying to my staging environment. Suddenly my logins were no longer working. It seems my SHA1 hashed passwords are being hashed differently in .NET 4. I am using th...

Testing if string is sha1 in PHP

I'm planning on storing the passwords as a sha1, so I need a way to validate that it is a sha1 at another point in my website. I was planning on using preg_match, but I do not know how to make regex patterns. Could someone help me out with one? Thanks Edit: I am not trying to see if two hashes match. ...

Are SHA-1, SHA-2 patented?

Do you need a license to use SHA-1 or SHA-2 for commercial purposes? ...

What's the big deal with brute force on hashes like MD5

I just spent some time reading http://stackoverflow.com/questions/2768248/is-md5-really-that-bad (I highly recommend!). In it, it talks about hash collisions. Maybe I'm missing something here, but can't you just encrypt your password using, say, MD5 and then, say, SHA-1 (or any other, doesn't matter.) Wouldn't this increase the processi...

SHA1 form .exe file in C#

Hi! I hope that someone could help me with reading exe files in C# and create a SHA1 hash from it. I have tried to read from executable file using StreamReader and BinaryReader. Then using built-in SHA1 algorithm I tried to create a hash but without success. The algorithm results for StreamReader was "AEUj+Ppo5QdHoeboidah3P65N3s=" and f...

SHA1 Using php and .net

Hi lynn, Can u pls help me for the below issue. I have sha1 value in mssql table (Password is encrypted using algorithm SHA1 which provided in Microsoft .Net library) . I created one php application, in that i need to compare these encrypted value. Thanks ...

What should I use for password fields in a table; MD5 or SHA1?

I am by no means a security expert or even a novice. I'm a newbie at security at best. Someone suggested I use SHA1 instead of MD5 - why would I choose one over the other? Is one more secure? ...

Mysql – Detecting changes in data with a hash function over a part of table

Hi I need generate a single hash over some data in a table CREATE TABLE Table1 ( F1 INT UNSIGNED NOT NULL AUTO_INCREMENT, F2 INT default NULL, F3 Varchar(50) default NULL, .. FN INT default NULL, PRIMAR...

Possible to use sha1 with nginx rewrite module?

Hi, Was wondering if it's be possible to use sha1 as part of nginx rewrite rules. As in, for each file request, i'd like to redirect it to the sha1 hash of the file name. Haven't managed to find any references to this yet. Thanks! ...

Does sha-1 ever produce collisions for input messages less than 160bits?

I have a 128bit ID that I want to perform a one way hash on, but I don't want to ever get the same digest for an input message. Does anyone know if sha-1, or an alternative, is guaranteed not to produce collisions for the set of messages less than its output digest size? This is at least theoretically possible... I also considered using...

different sha1 checksum on different php versions?!

I run this script: define('SECRET', "vJs;ly-W\XDkD_2'-M7S2/ZRRBobxt5"); echo sha1(SECRET . 'zcbkeyky' . '[email protected]') . "\n"; Locally with PHP 5.3.2 (cli) it gives me: 3baa47e50394cd2dce236dcbf2f409fdb9010f2a On a remote machine with PHP 5.1.6 (cli) it gives: d1bcf4ea83e50593d3df19a8455a5f5cd32d63ef Why does the same calculation dif...

Hashing Using SHA1

Hi, I am doing an enhancement on our system and there is this other application that is already doing the hashing / ecryption but nobody knows what algorithm was used and we do not have access to the code. I have to do the same hashing using java or javascript for our system because I need to perform a search so I need to pass the corre...

SHA1 hashing in SQLite: how?

Working with several DBs in parallel and need to initialize some records with hashed passwords. In MS SQL server there are handy functions that allow to hash on the fly: HashBytes('SHA1', CONVERT(nvarchar(32), N'admin')) Is there is a similar function with SQLite? If not, which is the easiest workaround (such as select from SQL serv...

Continuing a SHA1 hash in PHP

Is it possible to "continue" a hash in PHP? Say for example I start hashing a large chuck of data like this: $ctx = hash_init('sha1'); hash_update($ctx, $data_block); $hash = hash_final($ctx); That's all well and good but suppose the data is not fully available at that point and I want to "pause" the hashing mid-way and save where we'...

SHA1 JavaScript Implementation for large string

Hi All, I have the same problem as :Can SHA-1 algorithm be computed on a stream? With low memory footprint? I'm looking for a JavaScript implementation which computed block by block of a very large string. The idea is to slice the string into 512 bits block and do it block by block. Any hint? [updated] Thanks sunetos's help, I write ...

[C#] Different SHA1 Hash result between Java and C#

Hi guys, I've a big problem. I using this C# function to encode my message: byte[] buffer = Encoding.ASCII.GetBytes(file_or_text); SHA1CryptoServiceProvider cryptoTransformSHA1 = new SHA1CryptoServiceProvider(); String hashText = BitConverter.ToString(cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", ""); On java side, I use this ...

SHA1CryptoServiceProvider in .NET doesn't match UNIX shasum

I'm trying to share authentication between an ASP.NET app and another UNIX-based app, where the hashed password is stored in the database. I need to ensure the hashing algorithms on both platforms match. This is how I'm hashing in C#: var sha1 = new SHA1CryptoServiceProvider(); var passwordBytes = Encoding.UTF8.GetBytes(password); var...