diff --git a/Crypto/Classes.hs b/Crypto/Classes.hs
--- a/Crypto/Classes.hs
+++ b/Crypto/Classes.hs
@@ -21,6 +21,7 @@
         -- * Cipher classes and helper functions
         , BlockCipher(..)
         , blockSizeBytes
+        , keyLengthBytes
         , buildKeyIO
         , StreamCipher(..)
         , buildStreamKeyIO
@@ -173,6 +174,11 @@
 -- |The number of bytes in a block cipher block
 blockSizeBytes :: (BlockCipher k) => Tagged k ByteLength
 blockSizeBytes = fmap (`div` 8) blockSize
+
+-- |The number of bytes in a block cipher key (assuming it is an even
+-- multiple of 8 bits)
+keyLengthBytes :: (BlockCipher k) => Tagged k ByteLength
+keyLengthBytes = fmap (`div` 8) keyLength
 
 -- |Build a symmetric key using the system entropy (see 'System.Crypto.Random')
 buildKeyIO :: (BlockCipher k) => IO k
diff --git a/Crypto/Util.hs b/Crypto/Util.hs
--- a/Crypto/Util.hs
+++ b/Crypto/Util.hs
@@ -27,6 +27,13 @@
 i2bs l i = B.unfoldr (\l' -> if l' < 0 then Nothing else Just (fromIntegral (i `shiftR` l'), l' - 8)) (l-8)
 {-# INLINE i2bs #-}
 
+-- |@i2bs_unsized i@ converts @i@ to a 'ByteString' of sufficient bytes to express the integer.
+-- The integer must be non-negative and a zero will be encoded in one byte.
+i2bs_unsized :: Integer -> B.ByteString
+i2bs_unsized 0 = B.singleton 0
+i2bs_unsized i = B.reverse $ B.unfoldr (\i' -> if i' <= 0 then Nothing else Just (fromIntegral i', (i' `shiftR` 8))) i
+{-# INLINE i2bs_unsized #-}
+
 -- | Useful utility to extract the result of a generator operation
 -- and translate error results to exceptions.
 throwLeft :: Exception e => Either e a -> a
diff --git a/crypto-api.cabal b/crypto-api.cabal
--- a/crypto-api.cabal
+++ b/crypto-api.cabal
@@ -1,5 +1,5 @@
 name:           crypto-api
-version:        0.12
+version:        0.12.1
 license:        BSD3
 license-file:   LICENSE
 copyright:      Thomas DuBuisson <thomas.dubuisson@gmail.com>
