Skip to content
/ mskeyblob Public

Exchange RSA keys between Microsoft CSP blob and ruby openssl (ExportCspBlob of RSACryptoServiceProvider)

License

Notifications You must be signed in to change notification settings

Ziaw/mskeyblob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft RSA key blob

Exchange RSA keys between Microsoft CSP blob format (ExportCspBlob, ImportCspBlob of RSACryptoServiceProvider) and ruby openssl key OpenSSL::PKey::RSA

Usage

Create key from blob created by ExportCspBlob

    blob = File.binread 'msblob.bin'

    key = OpenSSL::PKey::RSA.from_mskeyblob blob

Create blob for ExportCspBlob

    key = OpenSSL::PKey::RSA.new 2048

    blob = key.to_mskeyblob
    public_blob = key.to_mskeyblob(include_private: false)

Installation

Add this line to your application's Gemfile:

gem 'mskeyblob'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mskeyblob

Contributing

  1. Fork it ( https://github.com/Ziaw/mskeyblob/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Links

  1. MSDN Enhanced Provider Key BLOBs

  2. Ruby and OpenSSL

About

Exchange RSA keys between Microsoft CSP blob and ruby openssl (ExportCspBlob of RSACryptoServiceProvider)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages