CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-scrypt-js

The scrypt password-based key derivation function with sync and cancellable async.

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer uses scrypt-js to implement password-based key derivation with proper parameter configuration. The focus is on correct usage of the scrypt() function and understanding of the cryptographic parameters (N, r, p, dkLen) that control the internal primitives.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "scrypt function import",
      "description": "Correctly imports the scrypt() or syncScrypt() function from the scrypt-js package",
      "max_score": 10
    },
    {
      "name": "Password encoding",
      "description": "Properly encodes the password string into the array-like format required by scrypt (e.g., using Buffer.from() or equivalent)",
      "max_score": 15
    },
    {
      "name": "Salt handling",
      "description": "Correctly passes the salt array parameter to the scrypt function without modification",
      "max_score": 5
    },
    {
      "name": "N parameter usage",
      "description": "Correctly passes the N (CPU/memory cost) parameter to scrypt() as specified in the function signature",
      "max_score": 15
    },
    {
      "name": "r parameter usage",
      "description": "Correctly passes the r (block size) parameter to scrypt() as specified in the function signature",
      "max_score": 8
    },
    {
      "name": "p parameter usage",
      "description": "Correctly passes the p (parallelization) parameter to scrypt() as specified in the function signature",
      "max_score": 8
    },
    {
      "name": "dkLen parameter usage",
      "description": "Correctly passes the dkLen (desired key length) parameter to scrypt() as specified in the function signature",
      "max_score": 9
    },
    {
      "name": "Async/Promise handling",
      "description": "Properly handles the Promise returned by scrypt() using async/await or .then(), or uses syncScrypt() for synchronous operation",
      "max_score": 15
    },
    {
      "name": "Return value handling",
      "description": "Correctly returns the Uint8Array result from scrypt() without unnecessary transformations",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-scrypt-js

tile.json