Skip to content

Add BLAKE3 hash algorithm option for Secure Seed#681

Open
GideonWhite1029 wants to merge 4 commits intoWinds-Studio:ver/1.21.11from
GideonWhite1029:feat/blake3
Open

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

Conversation

@GideonWhite1029
Copy link

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 labels Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Pull request for adding new features type: general Pull request for general updates / changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants