Skip to content

Zero scrypt scratch buffers before freeing#414

Open
albertoblancas123 wants to merge 1 commit into
Tarsnap:masterfrom
albertoblancas123:codex/zero-scrypt-buffers-703
Open

Zero scrypt scratch buffers before freeing#414
albertoblancas123 wants to merge 1 commit into
Tarsnap:masterfrom
albertoblancas123:codex/zero-scrypt-buffers-703

Conversation

@albertoblancas123

Copy link
Copy Markdown

Summary

Zero the scratch buffers used by crypto_scrypt() before releasing them:

  • wipe B, XY, and V in the reference implementation
  • wipe B, XY, and V in the platform implementation
  • cover both success and allocation-error cleanup paths

This uses the existing insecure_memzero() helper already linked by the project.

Refs Tarsnap/tarsnap#703.

Validation

  • git diff --check HEAD~1 HEAD
  • Reviewed the optimized smix storage contract and zeroed the full 256 * r + 64 XY region in the platform implementation.

I could not run autoreconf && ./configure && make test locally because this Windows environment does not have the C/autotools toolchain installed and WSL is not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant