Port T:System.Security.Cryptography.PasswordDeriveBytes #11118

Closed
danmosemsft opened this Issue Aug 24, 2016 · 3 comments

Projects

None yet

3 participants

@danmosemsft
Member

PasswordDeriveBytes should be brought back, but as [EditorBrowsable(Never)]

T:System.Security.Cryptography.PasswordDeriveBytes

Usage is up to 5% of the top tier.

@steveharter steveharter added this to the 1.2.0 milestone Oct 3, 2016
@steveharter
Member
steveharter commented Oct 3, 2016 edited

Full ns2.0 API:

M:PasswordDeriveBytes.#ctor(System.Byte[],System.Byte[])
M:PasswordDeriveBytes.#ctor(System.Byte[],System.Byte[],CspParameters)
M:PasswordDeriveBytes.#ctor(System.Byte[],System.Byte[],System.String,System.Int32)
M:PasswordDeriveBytes.#ctor(System.Byte[],System.Byte[],System.String,System.Int32,CspParameters)
M:PasswordDeriveBytes.#ctor(System.String,System.Byte[])
M:PasswordDeriveBytes.#ctor(System.String,System.Byte[],CspParameters)
M:PasswordDeriveBytes.#ctor(System.String,System.Byte[],System.String,System.Int32)
M:PasswordDeriveBytes.#ctor(System.String,System.Byte[],System.String,System.Int32,CspParameters)
P:PasswordDeriveBytes.HashName
P:PasswordDeriveBytes.IterationCount
P:PasswordDeriveBytes.Salt
[Obsolete("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")][Obsolete("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")]
M:PasswordDeriveBytes.CryptDeriveKey(System.String,System.String,System.Int32,System.Byte[])
@komby
komby commented Nov 8, 2016 edited

@steveharter Is it necessary to actually implement the cspParameter or can this use the same approach that was used in the mono port and throw an exception if the CspParameter is set? " throw new NotSupportedException ("CspParameters are not supported by Mono");"

In my case I needed this to maintain support for legacy WCF services. For now I was able to work around this missing by implementing a PasswordDeriveBytes w/ PBKDF1/SHA1 using the BouncyCastle Crypto but would be ideal to have this added to dotnet core Cryptography.

@steveharter
Member

@komby the plan is to support CspParameters; note it is optional only used to obtain\create the appropriate Csp when CryptDeriveKey is called. If it is not provided, a default version is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment