diff --git a/Crypto/Types/PubKey/RSA.hs b/Crypto/Types/PubKey/RSA.hs
--- a/Crypto/Types/PubKey/RSA.hs
+++ b/Crypto/Types/PubKey/RSA.hs
@@ -18,6 +18,8 @@
 
 import Data.Data
 import Data.ASN1.Types
+import Data.ASN1.BinaryEncoding (BER(BER))
+import Data.ASN1.Encoding (decodeASN1')
 import Data.Bits (shiftL, shiftR, complement, testBit, (.&.))
 import Data.Word (Word8)
 
@@ -44,6 +46,18 @@
               -- some bad implementation will not serialize ASN.1 integer properly, leading
               -- to negative modulus. if that's the case, we correct it.
               modulus = toPositive smodulus
+    fromASN1 ( Start Sequence
+             : IntVal 0
+             : Start Sequence
+             : OID [1, 2, 840, 113549, 1, 1, 1]
+             : Null
+             : End Sequence
+             : OctetString bs
+             : xs
+             ) = let inner = either strError fromASN1 $ decodeASN1' BER bs
+                     strError = Left .
+                                ("fromASN1: RSA.PublicKey: " ++) . show
+                 in either Left (\(k, _) -> Right (k, xs)) inner
     fromASN1 _ =
         Left "fromASN1: RSA.PublicKey: unexpected format"
 
@@ -115,6 +129,18 @@
                         , private_qinv = pcoef
                         }
 
+    fromASN1 ( Start Sequence
+             : IntVal 0
+             : Start Sequence
+             : OID [1, 2, 840, 113549, 1, 1, 1]
+             : Null
+             : End Sequence
+             : OctetString bs
+             : xs
+             ) = let inner = either strError fromASN1 $ decodeASN1' BER bs
+                     strError = Left .
+                                ("fromASN1: RSA.PrivateKey: " ++) . show
+                 in either Left (\(k, _) -> Right (k, xs)) inner
     fromASN1 _ =
         Left "fromASN1: RSA.PrivateKey: unexpected format"
 
diff --git a/crypto-pubkey-types.cabal b/crypto-pubkey-types.cabal
--- a/crypto-pubkey-types.cabal
+++ b/crypto-pubkey-types.cabal
@@ -1,5 +1,5 @@
 Name:                crypto-pubkey-types
-Version:             0.4.2.3
+Version:             0.4.3
 Description:         Generic cryptography public keys algorithm types
 License:             BSD3
 License-file:        LICENSE
@@ -20,6 +20,7 @@
                      Crypto.Types.PubKey.ECDSA
   Build-depends:     base >= 4 && < 5
                    , asn1-types >= 0.1 && < 0.4
+                   , asn1-encoding
 
 source-repository head
   type:     git
