What is salt in the HashProvider corporate library? (SaltEnabled Key)

How is salt created in the HashProvider in the Microsoft Enterprise Library when we install SaltEnabled?

Is this random for new cars? Is this a magic number?

(I know what salt is, the question is what is the actual value of a / salt in the Enterprise Library HashProvider)

+3
source share
4 answers

Edit:

See Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.HashAlgorithmProvider for an example implementation. The steps of the step are:

  • If SaltEnabled, generate random bytes for salt length using RNGCryptoServiceProvider.
  • Add salt to clear text.
  • Hash salty plain text.
  • ( ) .

:

public bool CompareHash(byte[] plaintext, byte[] hashedtext)

. , , .

CompareHash :

  • - -. , 4 .
  • .
  • hashedtext . - true, else false.

:

", HashProvider, , ​​ . unhashed, unhashed ."

" -, . . , , unhashed-value , . "

http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=10284

+4

offtopic:

Rainbow. , , (/ ) .

"" .

, :

http://en.wikipedia.org/wiki/Rainbow_table

0

, , , , , .

0

, .

: fooobar.com/questions/1697440/...

:

  • 16 .
  • It is created using a method CryptographyUtility.GetRandomBytes(16);in the namespace Microsoft.Practices.EnterpriseLibrary.Security.Cryptography. This ultimately calls the C library method called[DllImport("QCall", CharSet = CharSet.Unicode)] private static extern void GetBytes(SafeProvHandle hProv, byte[] randomBytes, int count);
  • The first 16 bytes of the encoded Base64 is the salt that was used to hash the original value
0
source

Source: https://habr.com/ru/post/1697438/


All Articles