diff --git a/Crypto.cabal b/Crypto.cabal
--- a/Crypto.cabal
+++ b/Crypto.cabal
@@ -1,5 +1,5 @@
 Name:            Crypto
-Version:         4.2.5
+Version:         4.2.5.1
 License:         OtherLicense
 License-File:    ReadMe.tex
 Author:          Dominic Steinitz
diff --git a/Data/Digest/SHA1.hs b/Data/Digest/SHA1.hs
--- a/Data/Digest/SHA1.hs
+++ b/Data/Digest/SHA1.hs
@@ -93,7 +93,7 @@
       g [] = Nothing
       g xs = Just (splitAt 64 xs)
 
-fromBytes :: (Bits a) => [a] -> a
+fromBytes :: (Num a, Bits a) => [a] -> a
 fromBytes input =
     let dofb accum [] = accum
         dofb accum (x:xs) = dofb ((shiftL accum 8) .|. x) xs
diff --git a/Data/Digest/SHA2.hs b/Data/Digest/SHA2.hs
--- a/Data/Digest/SHA2.hs
+++ b/Data/Digest/SHA2.hs
@@ -25,7 +25,7 @@
 ch x y z = (x .&. y) `xor` (complement x .&. z)
 maj x y z = (x .&. y) `xor` (x .&. z) `xor` (y .&. z)
 
-class (Bits w) => ShaData w where
+class (Num w, Bits w) => ShaData w where
   bigSigma0 :: w -> w
   bigSigma1 :: w -> w
   smallSigma0 :: w -> w
diff --git a/Data/LargeWord.hs b/Data/LargeWord.hs
--- a/Data/LargeWord.hs
+++ b/Data/LargeWord.hs
@@ -23,7 +23,7 @@
 
 -- Keys have certain capabilities.
 
-class LargeWord a where
+class (Num a) => LargeWord a where
    largeWordToInteger :: a -> Integer
    integerToLargeWord :: Integer -> a
    largeWordPlus :: a -> a -> a
