aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-09-13 23:41:17 +0200
committerest31 <MTest31@outlook.com>2015-09-14 00:32:06 +0200
commit915807f8db1f3721ad9ffc00a4863ad940010c45 (patch)
tree38778a8ad71089c2cee638c23ef22464d4a21723 /doc
parentbeba96941365a750f8b681df7a73566bdf797f0c (diff)
downloadminetest-915807f8db1f3721ad9ffc00a4863ad940010c45.tar.gz
minetest-915807f8db1f3721ad9ffc00a4863ad940010c45.tar.bz2
minetest-915807f8db1f3721ad9ffc00a4863ad940010c45.zip
Rename doc/mapformat.txt and update doc to match SRP changes
The documentation file contains not just information about the map itself, but also about further files inside the world's directory. Documentation didn't reflect recent SRP addition, now it does.
Diffstat (limited to 'doc')
-rw-r--r--doc/worldformat.txt (renamed from doc/mapformat.txt)18
1 files changed, 13 insertions, 5 deletions
diff --git a/doc/mapformat.txt b/doc/worldformat.txt
index 2b049adcd..d3b1b1189 100644
--- a/doc/mapformat.txt
+++ b/doc/worldformat.txt
@@ -41,13 +41,21 @@ auth.txt
---------
Contains authentication data, player per line.
<name>:<password hash>:<privilege1,...>
-Format of password hash is <name><password> SHA1'd, in the base64 encoding.
+
+Legacy format (until 0.4.12) of password hash is <name><password> SHA1'd,
+in the base64 encoding.
+
+Format (since 0.4.13) of password hash is #1#<salt>#<verifier>, with the parts inside <> encoded in the base64 encoding.
+<verifier> is an RFC 5054 compatible SRP-2048-SHA1 verifier
+of the given salt, password, and the player's name lowercased.
Example lines:
- Player "celeron55", no password, privileges "interact" and "shout":
celeron55::interact,shout
-- Player "Foo", password "bar", privilege "shout":
+- Player "Foo", password "bar", privilege "shout", with a legacy password hash:
foo:iEPX+SQWIR3p67lj/0zigSWTKHg:shout
+- Player "Foo", password "bar", privilege "shout", with an up to date pw hash (yes it is THAT long):
+ foo:#1#hPpy4O3IAn1hsNK00A6wNw#Kpu6rj7McsrPCt4euTb5RA5ltF7wdcWGoYMcRngwDi11cZhPuuR9i5Bo7o6A877TgcEwoc//HNrj9EjR/CGjdyTFmNhiermZOADvd8eu32FYK1kf7RMC0rXWxCenYuOQCG4WF9mMGiyTPxC63VAjAMuc1nCZzmy6D9zt0SIKxOmteI75pAEAIee2hx4OkSXRIiU4Zrxo1Xf7QFxkMY4x77vgaPcvfmuzom0y/fU1EdSnZeopGPvzMpFx80ODFx1P34R52nmVl0W8h4GNo0k8ZiWtRCdrJxs8xIg7z5P1h3Th/BJ0lwexpdK8sQZWng8xaO5ElthNuhO8UQx1l6FgEA:shout
- Player "bar", no password, no privileges:
bar::
@@ -204,14 +212,14 @@ algorithm, defined here in Python:
def getBlockAsInteger(p):
return int64(p[2]*16777216 + p[1]*4096 + p[0])
-
+
def int64(u):
while u >= 2**63:
u -= 2**64
while u <= -2**63:
u += 2**64
return u
-
+
It can be converted the other way by using this code:
def getIntegerAsBlock(i):
@@ -221,7 +229,7 @@ It can be converted the other way by using this code:
i = int((i - y) / 4096)
z = unsignedToSigned(i % 4096, 2048)
return x,y,z
-
+
def unsignedToSigned(i, max_positive):
if i < max_positive:
return i