change key exchange to ED25519

This commit is contained in:
Sen 2025-06-16 15:12:39 +02:00
parent 256721aa12
commit 6afc26e601
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
11 changed files with 148 additions and 105 deletions

View file

@ -235,7 +235,7 @@ public final class Server implements IThreadListener, Executor {
Log.IO.info("Config-Version: %s", version);
Log.IO.info("Weltzeit: %d Ticks / %d Sekunden", time, time / 20L);
Log.IO.info("Zuletzt geladen: %s", new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(new Date(lastPlayed)));
if(tag.hasByteArray("PrivateKey") && tag.hasByteArray("PublicKey")) {
if(System.getProperty("server.regenkey") == null && tag.hasByteArray("PrivateKey") && tag.hasByteArray("PublicKey")) {
PrivateKey key = EncryptUtil.decodePrivateKey(tag.getByteArray("PrivateKey"));
PublicKey pubkey = EncryptUtil.decodePublicKey(tag.getByteArray("PublicKey"));
if(key != null && pubkey != null)