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

{
  "context": "This evaluation assesses how well the engineer uses scrypt-js to derive keys from passwords with proper Unicode normalization. The focus is on correct usage of Unicode normalization methods and the scrypt-js API to ensure consistent key generation.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Unicode normalization applied",
      "description": "Uses String.prototype.normalize() method with 'NFKC' or 'NFC' normalization form on password and salt strings before encoding",
      "max_score": 30
    },
    {
      "name": "Correct string encoding",
      "description": "Converts normalized strings to byte arrays using Buffer.from() with 'utf8' encoding before passing to scrypt",
      "max_score": 20
    },
    {
      "name": "Uses syncScrypt function",
      "description": "Calls scrypt.syncScrypt() or scrypt-js syncScrypt() method with correct parameters (password, salt, N, r, p, dkLen)",
      "max_score": 20
    },
    {
      "name": "Appropriate parameter values",
      "description": "Uses correct scrypt parameters as specified: N=1024, r=8, p=1, dkLen=32",
      "max_score": 15
    },
    {
      "name": "Hex encoding output",
      "description": "Converts the returned Uint8Array to hexadecimal string using Buffer.from().toString('hex') or equivalent",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-scrypt-js

tile.json