- Relaterede Spørgsmål om StackOverflow
- Need an SRP library which supports 'sha512' hash
I am in a need of implementing SRP protocol with nodejs .I am now using jsrp library.But this does not include 'sha512' hash and it supports only 'sha1' and 'sha256'. Is there any library available to use SRP along with 'sha512' hash.???

- SHA-512 Length of the input string impact ?
I am implementing a way to quickly find changes in the sources of my datawarehouse.

After couple of try we have found the hashing all the attribute of a given table and comparing it to the target is one of the most efficient way to compare it.

However the non negligible issue for us is the collision risk. Because I need to trust my data 100%

My understanding is that with SHA-512 it should be close to 0 (2^-256...). But what we cannot find is if the length of my input string can influence the probaility of collision.

Because in the case of a table with 20 field I am confident it will work, but for a table with 280 fields some of them having free text ... I want to be sure.

I know the maximum length of a string is 2^128 but does hashing a longer string of 20.000 character instead of 200, will raise the probability of a collision ?

Thanks for your help.

- SHA512 within Silverlight is not available, is there a managed library available?
`SHA512Managed`

is missing in Silverlight (for Windows Phone 7 CTP SDK), only upto SHA256 is available for use. Does anyone know a .NET class that I could use that offers a self-contained C# or VB.net SHA512 implementation?I need to use this for authentication to a HTTP web service.

- My friend hashes passwords with SHA512 algorithm without salt. How do I convince him that he needs to add salt?
Today I discovered something incredibly stupid - my friend hashes user passwords with sha512 algorithm without a salt. I immediately raised this issue to him but he said he wants to see anyone crack a single password in his database. I told him that without a hash his database is vulnerable to rainbow attack but he said no one had this large rainbow table for sha512 as each has is 64 hex characters long.

How do I convince him that he still needs to add salt? Does anyone know what the hash cracking rate of sha512 is? I could argue then that it would take this much or that much time to crack all 8 char passwords, etc.

- Getting different RSA encryption result in different language?
I am trying to encypt some data using RSA public key and signing with SHA-512 algo. But response recevied is differnet in different platform.

In C#:

`RSACryptoServiceProvider crypto = new RSACryptoServiceProvider(); crypto.ImportCspBlob(Convert.FromBase64String(publickey)); crypto.exportParameters(false); // and got the public key modulus and exp byte[] response = crypto.SignData(data, "SHA512");`

In Java:

`// got modulus and exp for public key from c# byte[] modulo = {.....}; byte[] exp = {1,0,1}; BigInteger modulus = new BigInteger(1, modulo); BigInteger pubExp = new BigInteger(1, exp); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); RSAPublicKeySpec priKeySpec = new RSAPublicKeySpec(modulus, pubExp); RSAPublicKey Key = (RSAPublicKey)keyFactory.generatePublic(priKeySpec); // Calculate Hash MessageDigest sha1 = MessageDigest.getInstance("SHA-512"); byte[] digest = sha1.digest(data); // Encrypt digest Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.ENCRYPT_MODE, Key); byte[] response = cipher.doFinal(digest);`

but both response are not matching.C# generate correct one but java not generating the same byte[]Any missing part in java code.

Please note that by viewing our site you agree to our use of cookies (see Privacy for details). You will only see this message once.