private static boolean isSmallerThanGroupOrder(byte[] s) {
    for (int j = Field25519.FIELD_LEN - 1; j >= 0; j--) {
      // compare unsigned bytes
      int a = s[j] & 0xff;
      int b = GROUP_ORDER[j] & 0xff;
      if (a != b) {
        return a < b;
      }
    }
    return false;
  }
Returns the EdDSA signature for the {@code message} based on the {@code hashedPrivateKey}.

@param message to sign
@param publicKey {@link Ed25519#scalarMultWithBaseToBytes(byte[])} of {@code hashedPrivateKey}
@param hashedPrivateKey {@link Ed25519#getHashedScalar(byte[])} of the private key
@return signature for the {@code message}.
@throws GeneralSecurityException if there is no SHA-512 algorithm defined in {@link
    EngineFactory}.MESSAGE_DIGEST.
java_src/src/main/java/com/google/crypto/tink/internal/Ed25519.java