cryptographic-hash-function

Does any published research indicate that preimage attacks on MD5 are imminent?

╄→尐↘猪︶ㄣ 提交于 2019-12-04 22:31:55
I keep on reading on SO that MD5 is broken, bust, obsolete and never to be used. That angers me. The fact is that collision attacks on MD5 are now fairly easy. Some people have collision attacks down to an art and can even us use them to predict elections . I find most of the examples MD5 "brokeness" less interesting. Even the famous CA certificate hack was a collision attack meaning that its provable that the party generated the GOOD and EVIL certificates at same time. This means that if the EVIL CA found its way into the wild, it is provable that it leaked from the person who had the good CA

Generating k pairwise independent hash functions

∥☆過路亽.° 提交于 2019-12-04 18:58:49
问题 I'm trying to implement a Count-Min Sketch algorithm in Scala, and so I need to generate k pairwise independent hash functions. This is a lower-level than anything I've ever programmed before, and I don't know much about hash functions except from Algorithms classes, so my question is: how do I generate these k pairwise independent hash functions? Am I supposed to use a hash function like MD5 or MurmurHash? Do I just generate k hash functions of the form f(x) = ax + b (mod p) , where p is a

How to decrypt a string encrypted with HMACSHA1?

≯℡__Kan透↙ 提交于 2019-12-03 17:43:59
问题 I'm an encryption novice trying to pass some values back and forth between systems. I can encrypt the value, but can't seem to figure out how to decrypt on the other end. I've created a simple Windows Forms application using VB.NET. Trying to input a value and a key, encrypt and then decrypt to get the original value. Here's my code so far. Any help greatly appreciated. Thanks. Imports System Imports System.IO Imports System.Security.Cryptography Imports System.Text Public Class Form1 Private

Generating k pairwise independent hash functions

删除回忆录丶 提交于 2019-12-03 12:32:39
I'm trying to implement a Count-Min Sketch algorithm in Scala, and so I need to generate k pairwise independent hash functions. This is a lower-level than anything I've ever programmed before, and I don't know much about hash functions except from Algorithms classes, so my question is: how do I generate these k pairwise independent hash functions? Am I supposed to use a hash function like MD5 or MurmurHash? Do I just generate k hash functions of the form f(x) = ax + b (mod p) , where p is a prime and a and b are random integers? (i.e., the universal hashing family everyone learns in algorithms

How to decrypt a string encrypted with HMACSHA1?

天涯浪子 提交于 2019-12-03 06:48:07
I'm an encryption novice trying to pass some values back and forth between systems. I can encrypt the value, but can't seem to figure out how to decrypt on the other end. I've created a simple Windows Forms application using VB.NET. Trying to input a value and a key, encrypt and then decrypt to get the original value. Here's my code so far. Any help greatly appreciated. Thanks. Imports System Imports System.IO Imports System.Security.Cryptography Imports System.Text Public Class Form1 Private Sub btnEncode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEncode

Converting a md5 hash byte array to a string

本秂侑毒 提交于 2019-12-03 04:43:13
问题 How can I convert the hashed result, which is a byte array, to a string? byte[] bytePassword = Encoding.UTF8.GetBytes(password); using (MD5 md5 = MD5.Create()) { byte[] byteHashedPassword = md5.ComputeHash(bytePassword); } I need to convert byteHashedPassword to a string. 回答1: public static string ToHex(this byte[] bytes, bool upperCase) { StringBuilder result = new StringBuilder(bytes.Length*2); for (int i = 0; i < bytes.Length; i++) result.Append(bytes[i].ToString(upperCase ? "X2" : "x2"));

Why is it not possible to reverse a cryptographic hash?

陌路散爱 提交于 2019-12-02 18:12:25
Why can't you just reverse the algorithm like you could reverse a math function? How is it possible to make an algorithm that isn't reversible? And if you use a rainbow table, what makes using a salt impossible to crack it? If you are making a rainbow table with brute force to generate it, then it invents each plaintext value possible (to a length), which would end up including the salt for each possible password and each possible salt (the salt and password/text would just come together as a single piece of text). Jeremy Salwen MD5 is designed to be cryptographically irreversible . In this

Encrypting(MD5) multiple times can improve security?

走远了吗. 提交于 2019-11-30 13:53:07
I saw some guy who encrypt users password multiple times with MD5 to improve security. I'm not sure if this works but it doesn't look good. So, does it make sense? Let's assume the hash function you use would be a perfect one-way function. Then you can view its output like that of a "random oracle" , its output values are in a finite range of values (2^128 for MD5). Now what happens if you apply the hash multiple times? The output will still stay in the same range (2^128). It's like you saying "Guess my random number!" twenty times, each time thinking of a new number - that doesn't make it

HMAC security - Is the security of the HMAC based on SHA-1 affected by the collisions attacks on SHA-1?

十年热恋 提交于 2019-11-30 11:38:42
Is the security of the HMAC based on SHA-1 affected by the collisions attacks on SHA-1? Nick Johnson The security implications of HMAC are described in detail in the security section of the RFC . In a nutshell, a very strong attack indeed is required before the security of the HMAC is threatened; the existing collision attacks on SHA-1 certainly don't constitute such. HMAC is specifically designed to make attacks difficult, and ordinary collision attacks won't generally suffice: The security of the message authentication mechanism presented here depends on cryptographic properties of the hash

Encrypting(MD5) multiple times can improve security?

99封情书 提交于 2019-11-29 19:18:55
问题 I saw some guy who encrypt users password multiple times with MD5 to improve security. I'm not sure if this works but it doesn't look good. So, does it make sense? 回答1: Let's assume the hash function you use would be a perfect one-way function. Then you can view its output like that of a "random oracle", its output values are in a finite range of values (2^128 for MD5). Now what happens if you apply the hash multiple times? The output will still stay in the same range (2^128). It's like you