crypto-pubkey-openssh: OpenSSH keys decoder/encoder

[ cryptography, library, mit, parsing ] [ Propose Tags ]

OpenSSH keys decoder/encoder

[Skip to Readme]




Automatic Flags

Test with ssh-keygen


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.0.0, 0.1.0, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7
Dependencies asn1-encoding, asn1-types, attoparsec, base (>=4.5 && <5), base64-bytestring, bytestring, cereal, crypto-pubkey-types, pem [details]
License MIT
Copyright Fedor Gogolev <>
Author Fedor Gogolev <> Maxim Mitroshin <> Thomas DuBuisson <>
Maintainer Fedor Gogolev <>
Category Cryptography, Parsing
Home page
Bug tracker
Source repo head: git clone
Uploaded by FedorGogolev at 2015-01-21T07:19:54Z
Reverse Dependencies 3 direct, 0 indirect [details]
Downloads 8476 total (26 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-01-21 [all 1 reports]

Readme for crypto-pubkey-openssh-0.2.7

[back to package description]

crypto-pubkey-openssh Build Status

OpenSSH keys decoder/encoder, example.

import System.Environment (getArgs)
import qualified Data.ByteString as B

import Crypto.PubKey.OpenSsh (decodePrivate)

main :: IO ()
main = do
    fname <- fmap head getArgs
    content <- B.readFile fname
    case decodePrivate content of
        Left e -> error e
        Right key -> print key