User:PerryTachett
From Wikipedia, the free encyclopedia
Committed identity: 3c73b3edf3b60687cba35d0c98275f5df12d4f714366fa709e75a15e90e54f8339e1c6b3be8c3670f96e712cdaa35967e18f1793339510fb114e7d6a5bd76b5c is a SHA-512 commitment to this user's real-life identity.
Committed identity: 94443a6a1904bc1fdf1c96f02471d823 is a PerryHash-2 commitment to this user's real-life identity.
I am an editor who reads the works of Terry Pratchett. I am also an editor who only just realized I misspelled my user name. (It should be PerryTatchett)
I like doing anti-vandalism, and am keeping a counter of my reverted vandalisms:
Vandalisms Reverted so far: 2
Well, thats about it.
PerryHash-2 is a hash algorithm of my own devising. To calculate a PerryHash-2 Hashsum: (Pseudocode)
array bitbudge, shifts, chunks
string message, data, value, olddata
int roundnum, count
bitbudge := 49, 199, 3, 60, 80, 161, 187, 201, 161, 85, 175, 43, 113, 186, 218, 236, 27, 224, 98,
220, 203, 241, 137, 198, 100, 215, 71, 214, 54, 21, 244, 139, 178, 107, 164, 28, 88, 126, 235, 27,
52, 59, 194, 176, 112, 208, 21, 198, 198, 61, 42, 239, 147, 119, 87, 129, 223, 140, 157, 86, 157,
216, 173, 189, 116, 191, 56, 1, 216, 155, 23, 101, 112, 148, 75, 43, 204, 162, 129, 13, 204, 143,
25, 218, 40, 129, 223, 107, 42, 51, 201, 239, 33, 5, 24, 76, 176, 98, 37, 125, 192, 114, 185, 220,
102, 49, 162, 42, 206, 69, 15, 135, 199, 112, 137, 151, 236, 77, 165, 84, 238, 25, 91, 47, 216,
147, 169, 85
shifts := 35, 25, 99, 127, 121, 74, 66, 59, 78, 42
message := message + "1" + string(length(message))
chunks := 128 bit chunks of message
chunks := reverse(array)
pad chunks[0] to 128 bits with 0
olddata := character(0) repeated 16 times
for data in chunks
data := data xor olddata
for roundnum from 0 to 119
count := 0
for value in data
value := value xor bitbudge[count mod 256]
shifts[count mod length(shifts)] := shifts[count mod length(shifts)] xor value
shifts[count mod length(shifts)] := shifts[count mod length(shifts)] mod length(bitbudge)
count := (count + 1) mod length(bitbudge)
count := 0
repeat 7
bitbudge[0] := bitbudge[0] xor data[count]
shift bitbudge left wrapping around
count := (count + 3) mod length(data)
count := 0
repeat 3
data[0] := data[0] xor bitbudge[count]
shift bitbudge left wrapping around
count := (count - 3) mod length(bitbudge)
if (roundnum mod 10) == 0
bitbudge := reverse(bitbudge)
if (roundnum mod 10) == 5
data := reverse(data)
if (roundnum mod 10) == 8
for value in shifts
move bitbudge[value] to end
if (roundnum mod 10) == 3
for value in shifts
move data[value] to end
olddata := data
hashsum := data
Some PerryHash-2 hashes:
PH2("")
= de77bdfb 70b02989 0a3a570c 8e334e82
PH2("the quick brown fox jumps over the lazy dog")
= 13b61e2c ad0085fb ebd7ef84 8fdcf773
PH2("the quick brown fox jumps over the lazy cog")
= 749f9d2c 8550f0b6 f69d3079 fe34a4df

