Skip to content

Add BLAKE3 hash algorithm option for Secure Seed#681

Open
GideonWhite1029 wants to merge 8 commits into
Winds-Studio:ver/1.21.11from
GideonWhite1029:feat/blake3
Open

Add BLAKE3 hash algorithm option for Secure Seed#681
GideonWhite1029 wants to merge 8 commits into
Winds-Studio:ver/1.21.11from
GideonWhite1029:feat/blake3

Conversation

@GideonWhite1029
Copy link
Copy Markdown

Continuation of this PR: #414

Summary

  • Adds HashingBlake3.java — a BLAKE3-inspired 64-bit implementation
    using only 4 rounds (vs 12 in BLAKE2b) and ThreadLocal state pooling
    for reduced allocations and improved throughput
  • WorldgenCryptoRandom now dispatches to either algorithm at runtime
    based on config
  • Adds hash-algorithm config option under misc.secure-seed:
    • blake2b (default) — original behaviour, unchanged
    • blake3 — faster alternative; fewer rounds
  • Extends Secure Seed coverage to Mineshaft, NetherFortress, and
    NetherFossil structures

Config

misc:
  secure-seed:
    enabled: false
    hash-algorithm: blake2b   # blake2b | blake3

Tests

Lead time with Blake3:
pictures

Lead time with Blake2b:
pictures

@Dreeam-qwq Dreeam-qwq added type: feature Pull request for adding new features type: general Pull request for general updates / changes, patch regular maintenance labels Mar 22, 2026
@Dreeam-qwq Dreeam-qwq added the status: docs update required Config changed, needs the PR author or team member to update docs label Mar 31, 2026
@Dreeam-qwq
Copy link
Copy Markdown
Member

Sorry for waiting so long, I'll check this after finishing the merge of some other PRs. I'll rebase to the latest at that time (To also reduce your workload =w=)

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

Labels

status: docs update required Config changed, needs the PR author or team member to update docs type: feature Pull request for adding new features type: general Pull request for general updates / changes, patch regular maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants