diff --git a/Data/X509/Validation/Signature.hs b/Data/X509/Validation/Signature.hs
--- a/Data/X509/Validation/Signature.hs
+++ b/Data/X509/Validation/Signature.hs
@@ -138,7 +138,7 @@
                 Nothing                -> Nothing
                 Just (ptFormat, input) ->
                     case ptFormat of
-                        4 -> if B.length bs == 2 * bytes
+                        4 -> if B.length input /= 2 * bytes
                                 then Nothing
                                 else
                                     let (x, y) = B.splitAt bytes input
@@ -148,7 +148,7 @@
                                             else Nothing
                         -- 2 and 3 for compressed format.
                         _ -> Nothing
-          where bits  = numBits . ECC.ecc_n . ECC.common_curve $ curve
+          where bits  = ECC.curveSizeBits curve
                 bytes = (bits + 7) `div` 8
 
         ecdsaVerify HashMD2    = ECDSA.verify MD2
diff --git a/x509-validation.cabal b/x509-validation.cabal
--- a/x509-validation.cabal
+++ b/x509-validation.cabal
@@ -1,5 +1,5 @@
 Name:                x509-validation
-Version:             1.6.3
+Version:             1.6.4
 Description:         X.509 Certificate and CRL validation
 License:             BSD3
 License-file:        LICENSE
@@ -25,9 +25,9 @@
                    , pem >= 0.1 && < 0.3
                    , asn1-types >= 0.3 && < 0.4
                    , asn1-encoding >= 0.9 && < 0.10
-                   , x509 >= 1.6 && < 1.7
+                   , x509 >= 1.6.2 && < 1.7
                    , x509-store >= 1.6 && < 1.7
-                   , cryptonite >= 0.3
+                   , cryptonite >= 0.8
   Exposed-modules:   Data.X509.Validation
   Other-modules:     Data.X509.Validation.Signature
                      Data.X509.Validation.Fingerprint
