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-8/

{
  "context": "This criteria evaluates how well the engineer uses the scrypt-js package's synchronous key derivation functionality (syncScrypt) to derive cryptographic keys from passwords. The focus is on correct usage of the syncScrypt API, proper parameter passing, and appropriate handling of the returned Uint8Array.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import syncScrypt",
      "description": "Correctly imports the syncScrypt function from the scrypt-js package (e.g., const scrypt = require('scrypt-js'); or destructuring)",
      "max_score": 10
    },
    {
      "name": "Call syncScrypt function",
      "description": "Calls the syncScrypt function (or scrypt.syncScrypt) as the core implementation mechanism for key derivation",
      "max_score": 25
    },
    {
      "name": "Pass password parameter",
      "description": "Correctly passes the password parameter to syncScrypt as the first argument without unnecessary transformation",
      "max_score": 10
    },
    {
      "name": "Pass salt parameter",
      "description": "Correctly passes the salt parameter to syncScrypt as the second argument without unnecessary transformation",
      "max_score": 10
    },
    {
      "name": "Pass N parameter",
      "description": "Correctly passes the N (CPU/memory cost) parameter to syncScrypt as the third argument",
      "max_score": 10
    },
    {
      "name": "Pass r parameter",
      "description": "Correctly passes the r (block size) parameter to syncScrypt as the fourth argument",
      "max_score": 10
    },
    {
      "name": "Pass p parameter",
      "description": "Correctly passes the p (parallelization) parameter to syncScrypt as the fifth argument",
      "max_score": 10
    },
    {
      "name": "Pass dkLen parameter",
      "description": "Correctly passes the dkLen (desired key length) parameter to syncScrypt as the sixth argument",
      "max_score": 10
    },
    {
      "name": "Return Uint8Array",
      "description": "Returns the Uint8Array result from syncScrypt directly or as part of the function return value without unnecessary conversion",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-scrypt-js

tile.json