Please see diagram.
Let E, F, G and H be points at the same distance from A, B ,C and D , on the edges AB, BC, CD, and DA respectively. That distance need not be AB/2 only. It can be any.
Now, in the triangle HAE, let the angle EHA be y.
As, angle HAE = 90, AEH = 180 - 90 - y = 90- y.
Similarly, in the triangle EBF, we have angle BEF = y. This is because the triangles HAE and EBF are congruent. EB = HA. AE = BF and angle A = angle B.
Hence angle HEF = 180 - y - (90-y) = 90 deg. All other angles EFG, FGH and GHE are also 90 deg.
Now we have to prove that all sides are equal.
HE = root (HA² + AE²) = root (BE² + BF²) = EF
= root (FC² + CG²) = FG = root (GD² + DH²) = GH