New answers tagged

2

think I should prefix this by saying I'm not a JS or Crypto nerd, but am interested in both! to other people seeing this question, this code/module seems to mostly reimplement the CCM demo at the bottom of the Crypto docs: https://nodejs.org/api/crypto.html#crypto_ccm_mode anyway on with a few issues I noticed: why isn't _iv just returning crypto....


4

Usability It should be easy to use I consider this easy to use because all technical details are hidden from the end-user. var hashing = new HashingManager(); var hash = hashing.HashToString("test"); var isValid = hashing.Verify("test", hash); Security It should be secure You are using a well estblished algorithm Pbkdf2 together with a technique ...


1

1) Real implementation of RSA use the Chinese Remainder Theorem, which greatly improves the performance. 2) The big performance difference between encryption and decryption is a normal thing for RSA. It comes from the fact, that the performance of the modular exponentiation used depends on the number of 1 bits in the exponent. If you either chose the public ...


2

As discussed in the comments, this isn't cryptographically secure. The most obvious reason is that the optimizer may choose to do any number of things. The most likely to be concerning are a change in order of operations, or a change in join methodology. If math.RangeInt does any kind of table access (I assume this gives you a numbers table equivalent) then ...


1

I took a very, very wild swing at this. I also couldn't get it down to something entirely set-based, but I was able to get it to an inline TVF with a recursive CTE (two of them, unfortunately). With 1000 iterations, I needed a MAXRECURSION of at least 998 to get it to finish. I wouldn't trust this as a cryptographically secure implementation. I strongly ...


Top 50 recent answers are included