diff --git a/Data/X509.hs b/Data/X509.hs
--- a/Data/X509.hs
+++ b/Data/X509.hs
@@ -16,7 +16,9 @@
     , SignedCRL
     , Certificate(..)
     , PubKey(..)
+    , PrivKey(..)
     , pubkeyToAlg
+    , privkeyToAlg
     , module Data.X509.AlgorithmIdentifier
     , module Data.X509.Ext
     , module Data.X509.ExtensionRaw
@@ -68,6 +70,7 @@
 import Data.X509.DistinguishedName
 import Data.X509.Signed
 import Data.X509.PublicKey
+import Data.X509.PrivateKey
 import Data.X509.AlgorithmIdentifier
 
 import qualified Crypto.Hash.MD5 as MD5
diff --git a/Data/X509/CertificateChain.hs b/Data/X509/CertificateChain.hs
--- a/Data/X509/CertificateChain.hs
+++ b/Data/X509/CertificateChain.hs
@@ -19,7 +19,7 @@
 
 -- | A chain of X.509 certificates in exact form.
 newtype CertificateChain = CertificateChain [SignedExact Certificate]
-    deriving (Eq)
+    deriving (Show,Eq)
 
 -- | Represent a chain of X.509 certificates in bytestring form.
 newtype CertificateChainRaw = CertificateChainRaw [ByteString]
diff --git a/Data/X509/PrivateKey.hs b/Data/X509/PrivateKey.hs
new file mode 100644
--- /dev/null
+++ b/Data/X509/PrivateKey.hs
@@ -0,0 +1,28 @@
+-- |
+-- Module      : Data.X509.PublicKey
+-- License     : BSD-style
+-- Maintainer  : Vincent Hanquez <vincent@snarc.org>
+-- Stability   : experimental
+-- Portability : unknown
+--
+-- Public key handling in X.509 infrastructure
+--
+module Data.X509.PrivateKey
+    ( PrivKey(..)
+    , privkeyToAlg
+    ) where
+
+import Data.X509.AlgorithmIdentifier
+import qualified Crypto.Types.PubKey.RSA as RSA
+import qualified Crypto.Types.PubKey.DSA as DSA
+
+-- | Private key types known and used in X.509
+data PrivKey =
+      PrivKeyRSA RSA.PrivateKey -- ^ RSA private key
+    | PrivKeyDSA DSA.PrivateKey -- ^ DSA private key
+    deriving (Show,Eq)
+
+-- | Convert a Public key to the Public Key Algorithm type
+privkeyToAlg :: PrivKey -> PubKeyALG
+privkeyToAlg (PrivKeyRSA _)         = PubKeyALG_RSA
+privkeyToAlg (PrivKeyDSA _)         = PubKeyALG_DSA
diff --git a/x509.cabal b/x509.cabal
--- a/x509.cabal
+++ b/x509.cabal
@@ -1,5 +1,5 @@
 Name:                x509
-Version:             1.4.2
+Version:             1.4.3
 Description:         X509 reader and writer
 License:             BSD3
 License-file:        LICENSE
@@ -35,6 +35,7 @@
                      Data.X509.DistinguishedName
                      Data.X509.Cert
                      Data.X509.PublicKey
+                     Data.X509.PrivateKey
                      Data.X509.Ext
                      Data.X509.ExtensionRaw
                      Data.X509.CRL
@@ -62,3 +63,4 @@
 source-repository head
   type:     git
   location: git://github.com/vincenthz/hs-certificate
+  subdir:   x509
