0

Does anyone have a tested function that implements the scrypt algorithm in TSQL? I've searched here and the interwebs at large and to my amazement have not found a CREATE FUNCTION statement I can copy and paste.

Others doing this search, be warned, that Google will "help" you by thinking you are a moron and replacing "scrypt" with "script" on your first search, until you promise you are indeed looking for "scrypt".

I half expect the answer to this question to be a link to an existing article, but I'll be damned if I can find it. The alternative would be writing code from scratch myself, and nobody does that anymore, right?

Thanks in advance for assistance.

LDMJoe
  • 1,591
  • 13
  • 17
  • This is a pretty specific request, and stackexchange may be a better place to ask. If you've already written something and are seeing odd behavior or experience errors, feel free to post that. – Phoenix Jun 11 '15 at 21:49
  • Yes, it is specific, just like the tips throughout the generation of the question instructed. It also seems of use to others, as I would think many DBA's will be migrating away from processor hard hashing in favor of memory hard problems for passwords, and scrypt seemed to be the most readily implementable from my research. Is there a way to migrate this to stackexchange, or should I just re-post it there? – LDMJoe Jun 15 '15 at 15:07

1 Answers1

1

No, nobody has done this.

The closest you can get is finding a .NET implementation of Scrypt and wrapping it in a CLR assembly.

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
  • I'm going to give it one more day to see if anyone else comes to the party with a better response, then accept this as the answer. Inspired by this response, I did find [this other question](http://stackoverflow.com/questions/19706624/hashing-web-user-password-in-asp-net-vs-sql-clr) where someone posted a link to [a .NET implementation of scrypt](https://github.com/replicon/Replicon.Cryptography.SCrypt). – LDMJoe Jun 16 '15 at 20:01