diff --git a/core/java/src/net/i2p/crypto/eddsa/Utils.java b/core/java/src/net/i2p/crypto/eddsa/Utils.java
index 0b471550c7a3b9de3fd0dcc266e0c766783af57c..92cafaf231bd7c32cb39f7d29272e0f8f6198408 100644
--- a/core/java/src/net/i2p/crypto/eddsa/Utils.java
+++ b/core/java/src/net/i2p/crypto/eddsa/Utils.java
@@ -31,7 +31,7 @@ public class Utils {
         for (int i = 0; i < 32; i++) {
             result |= b[i] ^ c[i];
         }
-        return ~equal(result, 0) & 0x01;
+        return equal(result, 0);
     }
 
     /**
diff --git a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java
index bfa6fef641c4d33802cdcf18294f7048b8df8088..dc527e36929efa57bb85828f087b4c40e5d45de1 100644
--- a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java
+++ b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java
@@ -26,7 +26,7 @@ public class Ed25519FieldElement extends FieldElement {
 
     public boolean isNonZero() {
         byte[] s = toByteArray();
-        return Utils.equal(s, ZERO) == 1;
+        return Utils.equal(s, ZERO) == 0;
     }
 
     /**