sha2

How many SHA256 hashes can a modern computer compute?

女生的网名这么多〃 提交于 2019-12-05 11:25:17
问题 I want to know the mathematical time required for cracking hashes based off different sets of characters. For example, using only 7 letter, US-ASCII alphabetic characters we know that there are 26 7 possible sequences that could be used. Knowing how many of these could be generated by a computer each minute would give me an idea of how long it would take to generate all possible hashes and crack a certain 7 character hash ( birthday attacks aside ). For example, taking the number above, if a

What's the state of support for SHA-2 in various platforms?

天涯浪子 提交于 2019-12-05 08:18:47
I read that SHA-1 is being retired from the FIPS 180-2 standard. Apparently there are weaknesses in SHA-1 that led to this decision. Can anyone elaborate on the basis for that decision? Are there implications for the use of SHA-1 in commercial applications? My real questions are: What is the state of SHA-2 support in various class libraries and platforms? Should I attempt to move to SHA-2 ? Interested in mainstream platforms: .NET, Java, C/C++, Python, Javascript, etc. Sha1, Sha0, md4 and md5 have all been found to be insecure over the past few years. The problem is that if an attacker can

MySQL SHA2 function does not appear to work

时光总嘲笑我的痴心妄想 提交于 2019-12-04 13:51:15
I'm using MySql 5.5.32 and trying to reproduce some code in a stored procedure that we have in the business layer so I can set passwords for people using sql . It appears that there is something wrong with the SHA2 function though, but maybe I'm missing something: SELECT length(SHA2("bob", 512)) Returns 128. Shouldn't it be 64? SELECT length(SHA2("bob", 256)) Which returns 64, so it appears that either I missing something, or there is a bug in SHA2. Any ideas? Bill Karwin I coded the patch for the SHA2() function in 2005 and contributed it to MySQL (the developers then edited my code a bit to

Calculating a hash code for a large file in parallel

吃可爱长大的小学妹 提交于 2019-12-04 02:52:32
I would like to improve the performance of hashing large files, say for example in the tens of gigabytes in size. Normally, you sequentially hash the bytes of the files using a hash function (say, for example SHA-256, although I will most likely use Skein, so hashing will be slower when compared to the time it takes to read the file from a [fast] SSD). Let's call this Method 1. The idea is to hash multiple 1 MB blocks of the file in parallel on 8 CPUs and then hash the concatenated hashes into a single final hash. Let's call this Method 2. A picture depicting this method follows: I would like

How many SHA256 hashes can a modern computer compute?

∥☆過路亽.° 提交于 2019-12-04 00:53:44
I want to know the mathematical time required for cracking hashes based off different sets of characters. For example, using only 7 letter, US-ASCII alphabetic characters we know that there are 26 7 possible sequences that could be used. Knowing how many of these could be generated by a computer each minute would give me an idea of how long it would take to generate all possible hashes and crack a certain 7 character hash ( birthday attacks aside ). For example, taking the number above, if a modern quad core could generate 1 million hashes each minute it would take 8031810176 / 1000000 / 60 =

Matching Java SHA2 Output vs MySQL SHA2 Output

浪子不回头ぞ 提交于 2019-12-03 09:10:06
When I reproduce a SHA2 hash via the following code: MessageDigest digest = MessageDigest.getInstance("SHA-256"); digest.digest("A".getBytes("UTF-8")); it gives me a byte array, which is: 85,-102,-22,-48,-126,100,-43,121,93,57,9,113,-116,-35,5,-85,-44,-107,114,-24,79,-27,85,-112,-18,-13,26,-120,-96,-113,-33,-3 But when I reproduce same hash via MySQL it gives me a string which is: 5cfe2cddbb9940fb4d8505e25ea77e763a0077693dbb01b1a6aa94f2 How can I convert tha Java's result so that I can compare it with MySQL's result? First check out your DB result it looks like your initial hash is actually a

sha512-crypt mysql and dovecot

旧街凉风 提交于 2019-12-03 06:21:26
I have a question about understanding sha512-crypt hashing. I found this tutorial to set up dovecot and postfix with mysql. I followed the tutorial (with slight modifications) and everything works fine. But there is one thing, that I do not understand: To add a user, I should use: INSERT INTO `mailserver`.`virtual_users` (`id`, `domain_id`, `password` , `email`) VALUES ('1', '1', ENCRYPT('firstpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'email1@example.com'), ('2', '1', ENCRYPT('secondpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'email2@example.com'); and again, this

Java - Hash algorithms - Fastest implementations

无人久伴 提交于 2019-11-29 20:18:50
I want to know what is the best and fastest implementation of hash algorithms for Java especially MD5 and SHA-2 512 (SHA512) or 256. I want a function to get a string as an argument and return the hash as the result. Thak you. Edit: This is for getting mapping each URL to a unique hash. Since MD5 is not that reliable in this area, I'm more interested in finding the best & fastest implementation for SHA-2 algorithms. Note that I know even SHA-2 might produce the same hash for some URLs but I can live with that. First things first: speed is overrated. You should make measures before declaring

Hashing a password using SHA256 and .NET/Node.js

非 Y 不嫁゛ 提交于 2019-11-29 03:07:45
Im Storing SHA256 hashes of user passwords in my database generated by .NET and I need to be able to check them with Node.js. The only problem is that .NET and Node.js create different hashes for the same password. Password: ThisPassword .NET: var ue = new UnicodeEncoding(); var byteSourceText = ue.GetBytes("ThisPassword"); var byteHash = new System.Security.Cryptography.SHA256Managed().ComputeHash(byteSourceText); return Convert.ToBase64String(byteHash); //Tlwxyd7HIQhXkN6DrWJtmB9Ag2fz84P/QgMtbi9XS6Q= Node.js (Using Crypto): var crypto = require('crypto'); return crypto.createHash('sha256')

Java - Hash algorithms - Fastest implementations

非 Y 不嫁゛ 提交于 2019-11-28 16:17:49
问题 I want to know what is the best and fastest implementation of hash algorithms for Java especially MD5 and SHA-2 512 (SHA512) or 256. I want a function to get a string as an argument and return the hash as the result. Thak you. Edit: This is for getting mapping each URL to a unique hash. Since MD5 is not that reliable in this area, I'm more interested in finding the best & fastest implementation for SHA-2 algorithms. Note that I know even SHA-2 might produce the same hash for some URLs but I