Skip to content

Commit 4be7a8b

Browse files
committed
Initial release: SeedShield v1.0.0 - Cryptographic structure seed protection for Paper/Spigot
0 parents  commit 4be7a8b

7 files changed

Lines changed: 580 additions & 0 deletions

File tree

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
target/
2+
*.class
3+
*.jar
4+
*.log
5+
.idea/
6+
*.iml
7+
.settings/
8+
.project
9+
.classpath
10+
.DS_Store

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 yunluo7
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# SeedShield
2+
3+
**Cryptographic structure seed protection for Paper/Spigot servers.**
4+
5+
SeedShield prevents seed cracking tools (chunkbase, SeedCrackerX, Structurecracker) from determining structure locations by replacing each structure type's placement salt with an irreversible SHA-256 derived value.
6+
7+
**This is the first Paper/Spigot plugin to provide cryptographic structure seed protection.** Previously, this level of protection was only available through Fabric mods or custom server forks.
8+
9+
## How It Works
10+
11+
Minecraft determines structure positions using this formula:
12+
13+
```
14+
position = f(worldSeed, regionCoords, salt)
15+
```
16+
17+
The `salt` is a hardcoded integer per structure type. Tools like chunkbase know these default salts, so knowing the world seed = knowing all structure locations.
18+
19+
SeedShield replaces each salt with:
20+
21+
```
22+
salt = SHA-256(secretKey + ":" + worldSeed + ":" + structureType)[0..4]
23+
```
24+
25+
- **Per-structure isolation**: Each structure type gets a unique cryptographic salt. Cracking one type's salt reveals nothing about others.
26+
- **Secret key protection**: Without the 256-bit key (stored in `config.yml`), salts cannot be reversed.
27+
- **Stronghold protection**: Also modifies `concentricRingsSeed` and recalculates ring positions.
28+
29+
## Comparison with Existing Solutions
30+
31+
| Solution | Platform | Modifies Structure Positions | Crypto Protection | Per-Structure Isolation | Stronghold Protection |
32+
|----------|----------|:---:|:---:|:---:|:---:|
33+
| **SeedShield** | **Paper/Spigot plugin** | **** | **✅ SHA-256** | **** | **** |
34+
| [SeedGuard](https://github.com/DrexHD/SeedGuard) | Fabric mod || ❌ Random |||
35+
| [SecureSeed](https://github.com/Earthcomputer/SecureSeed) | Fabric mod (1.16.5, abandoned) || ✅ BLAKE2 |||
36+
| [AntiSeedCracker](https://github.com/akshualy/AntiSeedCracker) | Spigot plugin |||||
37+
| Leaf `secure-seed` | Server fork || ✅ 1024-bit |||
38+
| spigot.yml seeds | Built-in || ❌ Plain int || ⚠️ |
39+
40+
## Installation
41+
42+
1. Download `SeedShield-1.0.0.jar` from [Releases](https://github.com/yunluo7/SeedShield/releases)
43+
2. Place it in your server's `plugins/` folder
44+
3. **Delete the region files** of worlds you want to protect (structures must regenerate)
45+
4. Restart the server
46+
5. Edit `plugins/SeedShield/config.yml` to configure which worlds to protect
47+
48+
> **Important**: SeedShield only affects newly generated chunks. Existing structures in already-generated chunks will not change positions.
49+
50+
## Configuration
51+
52+
```yaml
53+
# Auto-generated 256-bit secret key. DO NOT SHARE.
54+
secret-key: "a1b2c3d4..."
55+
56+
# Worlds to protect
57+
enabled-worlds:
58+
- world
59+
- survival
60+
```
61+
62+
## Requirements
63+
64+
- Paper 1.21+ (or forks: Leaves, Purpur, Folia, etc.)
65+
- Java 17+
66+
67+
## Security Analysis
68+
69+
| Attack Vector | Protection Level |
70+
|---------------|:---:|
71+
| chunkbase / online seed maps | ✅ Fully defeated |
72+
| SeedCrackerX client mod | ✅ Defeated (combine with FakeSeed for hashed seed) |
73+
| Brute-force single structure salt (2³² attempts) | ⚠️ Possible per-type, but each type must be cracked independently |
74+
| Reverse secret key from salt | ✅ Infeasible (SHA-256 preimage resistance) |
75+
| Cross-structure salt derivation | ✅ Impossible without key |
76+
77+
## Building from Source
78+
79+
```bash
80+
git clone https://github.com/yunluo7/SeedShield.git
81+
cd SeedShield
82+
mvn package
83+
```
84+
85+
The JAR will be at `target/SeedShield-1.0.0.jar`.
86+
87+
## License
88+
89+
MIT License

pom.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.seedshield</groupId>
8+
<artifactId>SeedShield</artifactId>
9+
<version>1.0.0</version>
10+
<packaging>jar</packaging>
11+
12+
<name>SeedShield</name>
13+
<description>Cryptographic structure seed protection for Paper/Spigot servers</description>
14+
<url>https://github.com/yunluo7/SeedShield</url>
15+
16+
<properties>
17+
<maven.compiler.source>17</maven.compiler.source>
18+
<maven.compiler.target>17</maven.compiler.target>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
</properties>
21+
22+
<repositories>
23+
<repository>
24+
<id>papermc</id>
25+
<url>https://repo.papermc.io/repository/maven-public/</url>
26+
</repository>
27+
</repositories>
28+
29+
<dependencies>
30+
<dependency>
31+
<groupId>io.papermc.paper</groupId>
32+
<artifactId>paper-api</artifactId>
33+
<version>1.21.1-R0.1-SNAPSHOT</version>
34+
<scope>provided</scope>
35+
</dependency>
36+
</dependencies>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-compiler-plugin</artifactId>
43+
<version>3.13.0</version>
44+
<configuration>
45+
<source>17</source>
46+
<target>17</target>
47+
</configuration>
48+
</plugin>
49+
</plugins>
50+
</build>
51+
</project>

0 commit comments

Comments
 (0)