Go conventions
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-09-28 14:01:42 -07:00
parent 6d5accb338
commit 8fe2974aaa
1 changed files with 2 additions and 2 deletions

View File

@ -56,8 +56,8 @@ func IsValidHostname(address string) bool {
// to do this we need to multiply the point by the order of the group and check that the
// result is the ed25519 identity element.
// l = order of the group (minus 1)
l_bytes := []byte{236, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16}
l,_ := edwards25519.NewScalar().SetCanonicalBytes(l_bytes)
lBytes := []byte{236, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16}
l,_ := edwards25519.NewScalar().SetCanonicalBytes(lBytes)
// construct a curve point from the public key
// if this fails then the hostname is invalid