From what I understand this line in pad function isn't right.
// get closest divisible by 64 to <packet-len> + 1 byte for 0x80
minQuestionSize := (len(packet)+1+63)/64 + 64
It doesn't result in closes divisible by 64. For example if packet length is 56 it will result in 65 which should be 64 (the closest divisible by 64 to 56+1 is 64).
I think it should get rewritten to STH like this:
minQuestionSize := len(packet) + 1 + (64 - (len(packet)+1)%64)
From what I understand this line in
padfunction isn't right.It doesn't result in closes divisible by 64. For example if
packetlength is 56 it will result in 65 which should be 64 (the closest divisible by 64 to 56+1 is 64).I think it should get rewritten to STH like this: