https://tools.ietf.org/html/rfc8032#section-5.1.7 requires that s be in the range [0, order) in order to prevent signature malleability. This is a new requirement in the RFC so the ed25519 package predates it. This change aligns the code with the RFC. The linked bug says that libsodium is also enforcing this check by default. See golang/go#24350 Change-Id: Ib69ce7c9e5a58971cbe225318d9fd87660bd5e4b Reviewed-on: https://go-review.googlesource.com/100436 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>