korlibs / korlibs/korlibs-crypto
PBKDF2 is orders of magnitude slower than typical JVM/JS implementations
- Dominant language
- Kotlin
- Stars
- 12
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for implementing pbkdf2WithHmacSHA512!
The following test case does work on equivalent JVM and JS implementations. The korge implementation does not finish:
```kotlin
val password = "super secret. not"
val salt = ByteArray(12) { (it + 1).toByte() }
val iterationCount = 500000
val keyLength = 256
PBKDF2.pbkdf2WithHmacSHA512(password.encodeToByteArray(), salt, iterationCount, keyLength).hex shouldBe
"7094d5836ad28e6609c9f41dea292bde0b5ad4d6ffad52b1375aeeda691786a6"
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at PBKDF2.pbkdf2WithHmacSHA512 and reproduce the Kotlin test case with 500000 iterations and the supplied salt, password, and expected hexadecimal output. Compare its completion time and result with the JVM and JS implementations; done means the call completes and matches the expected key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- cryptography
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100