diff --git a/automotive-cse.cabal b/automotive-cse.cabal
--- a/automotive-cse.cabal
+++ b/automotive-cse.cabal
@@ -1,6 +1,6 @@
 
 name:                automotive-cse
-version:             0.1.6.0
+version:             0.1.7.0
 synopsis:            Automotive CSE emulation
 description:         This package includes Cryptography Security Engine (CSE)
                      codec emulation for automotive things.
diff --git a/src/Codec/Automotive/CSE/Internal.hs b/src/Codec/Automotive/CSE/Internal.hs
--- a/src/Codec/Automotive/CSE/Internal.hs
+++ b/src/Codec/Automotive/CSE/Internal.hs
@@ -4,7 +4,7 @@
   M1, unM1, makeM1, extractM1, refineM1,
   M2, unM2, makeM2, extractM2, refineM2,
   M3, unM3, makeM3,
-  M4, unM4, makeM4, extractM4, makeM4', extractM4',
+  M4, unM4, makeM4, extractM4, refineM4, makeM4', extractM4',
   M5, unM5, makeM5,
 
   K1, K1', makeK1,
@@ -314,6 +314,13 @@
 extractM4 :: K3 -> M4 -> ((UID, Word8, Word8), Word32)
 extractM4 k3 m4 = (extractM1 m1, counter)
   where (m1, counter) = extractM4' k3 m4
+
+refineM4 :: MonadPlus m => K3 -> ByteString -> m (M4, ((UID, Word8, Word8), Word32))
+refineM4 k3 s = do
+  let m4 = M4 s
+      ps@((uid, kid, akid), counter) = extractM4 k3 m4
+  guard $ makeM4 k3 uid kid akid counter == m4
+  return (m4, ps)
 
 newtype M5 = M5 ByteString deriving Eq
 
diff --git a/test/Iso.hs b/test/Iso.hs
--- a/test/Iso.hs
+++ b/test/Iso.hs
@@ -8,7 +8,7 @@
 
 import Codec.Automotive.CSE
   (UID, makeUID, KeyAuthUse, makeKeyAuthUse, derivedCipher, K1, K1', makeK1, K3, K3', makeK3,
-   M1, unM1, makeM1, extractM1, refineM1, M2, unM2, makeM2, extractM2, refineM2, M4, makeM4, extractM4)
+   M1, unM1, makeM1, extractM1, refineM1, M2, unM2, makeM2, extractM2, refineM2, M4, unM4, makeM4, extractM4, refineM4)
 
 import Control.Applicative ((<$>), (<*>))
 import Control.Monad (replicateM)
@@ -98,6 +98,12 @@
         k3 = derivedCipher k3'
         m4 = g k3
 
+isoRefineM4 :: K3' -> GenM4 -> Bool
+isoRefineM4 k3' (GenM4 g) = refineM4 k3 (unM4 m4) == Just (m4, t)
+  where t = extractM4 k3 m4
+        k3 = derivedCipher k3'
+        m4 = g k3
+
 tests :: [Test]
 tests =
   [ qcTest "iso - M1 extract make" isoM1
@@ -105,4 +111,5 @@
   , qcTest "iso - M2 extract make" isoM2
   , qcTest "iso - M2 refine extract" isoRefineM2
   , qcTest "iso - M4 extract make" isoM4
+  , qcTest "iso - M4 refine extract" isoRefineM4
   ]
