CryptoProject

Current specification and documentation: https://github.com/emboss/krypt/wiki

A project for new ruby crypto library.

Status: project building

Motivation

From implementation point of view.

  • crypto primitives independence of OpenSSL
  • more code in Ruby for flexibility

Martin Boßlet is going to talk about this project as a part of his presentation at RubyConf 2011. http://rubyconf.org/presentations/38

Ruby OpenSSL: Present, Future and why it matters
30 Sep 11:15 (2nd day)

Goals

  • keep the good parts, improve the rest
  • specification for the "minimal API"
  • documentation
  • ideally just replace 'OpenSSL::' by 'Crypto::'
  • security by default
  • K I S S - simple default, but fully configurable
  • forbid dangerous configuration (well, not really)

other useful additions (if-possible)

  • integration of “secure storage”
  • engine integration (PKCS#11, ...)

Strategy

  • Take existing implementation
    • Iterate API (API for user) design through 2 implementations
    • An implementation based on ossl+OpenSSL
    • An implementation based on jruby-ossl+JCE (for JRuby)
    • Design SPI (API for engine; NSS, PKCS#11) later
    • Make it work and release as soon as possible
  • Replace it step by step
    • Graceful migration from ossl
    • Existing scripts which use basic ossl feature should work with just replacing OpenSSL -> Crypto
    • [1] is what I and gotoyuzo talked about the hierarchy in August.
  • Using DER as universal serialization format
  • release as a gem first
    • gem name? (crypt and crypto are not available on rubygems.org)

Implementation

  • Asn1::Template
    • > 50% of current ext/openssl is about ASN.1
    • use Asn1::Template by emboss
    • more code in Ruby
  • crypto primitives

    • flesh out minimal API to support crypto primitives: Cipher / Digest / ASN1 / RSA / DSA / ECC
      class ASN1
      def self.decode(der)
      end

      def self.to_der
      end

      ...
      end

    • multiple implementations of this minimal API possible

    • OpenSSL

    • jruby-ossl/JCE

    • Mozilla NSS ?

    • GNU gcrypt ?

    • CAPI (Windows) ?

    • CommonCrypto (OS X) ?

  • use Asn1::Template and the minimal API to implement the rest

Class hierarchy

  • Crypto
    • ASN1
    • Cipher
    • CMS
    • EncryptedData
    • SignedData
    • Digest
    • HMAC
    • OCSP
    • PKey
    • RSA
    • DSA
    • DH
    • PKCS7 (-> CMS::SignedData)
    • PKCS12
    • Random
    • SSL
    • SSLSocket
    • SSLServer
    • Timestamp
    • X509
    • Certificate
    • CRL
    • Name
    • Request

Who?

Those who are interested in participating, please contact us.

QQ截图20120507010458.jpg - Asics Gel Kayano 17 http://www.asicsrunningfr.com/asics-gel-kayano-17-running-shoes-c-3.html asics france http://www.asicsrunningfr.com/ chaussure asics running http://www.asicsrunningfr.com/ Asics Gel 3 http://www.asicsrunningfr.com/womens-asics-gel-lyte (56.7 KB) ergo cca, 10/31/2012 04:54 PM

66.jpg - ergo baby carrier http://www.ergobabycarrier-nz.com/ ergo baby carrier nz http://www.ergobabycarrier-nz.com/ ergo baby carrier http://www.ergobabycarrierca.ca/ ergo baby carrier canada http://www.ergobabycarrierca.ca/ ergo baby carrier http://www.ergobab (8.89 KB) ergo cca, 10/31/2012 04:55 PM

88.jpg - mulberry outlet http://www.mulberryfashion.eu/ mulberry bags outlet http://www.mulberryfashion.eu/ mulberry outlet shop http://www.mulberryfashion.eu/ mulberry outlet shop uk http://www.mulberryfashion.eu/ mulberryfashion.eu http://www.mulberryfashion.eu/ (48.2 KB) ergo cca, 10/31/2012 04:55 PM

99.jpg - Isabel Marant Sneakers http://www.isabelmarantuksale.co.uk/ isabel marant boots http://www.isabelmarantuksale.co.uk/isabel-marant-boots-c-2.html isabel marant uk sale http://www.isabelmarantuksale.co.uk/ sneakers isabel marant uk http://www.isabelmarantuk (136 KB) ergo cca, 10/31/2012 04:55 PM

55.jpg - hermes bags http://www.hermeshandbaguk.co.uk hermes birkin bags http://www.hermeshandbaguk.co.uk/birkin-bags-c-13.html hermes handbags http://www.hermeshandbaguk.co.uk hermes purses http://www.hermeshandbaguk.co.uk/beant-c-15_16.html www.hermeshandbaguk.c (47.8 KB) ergo cca, 10/31/2012 04:55 PM

ergo1.jpg - Sneakers isabel marant http://www.isabelmarantreduction.com/isabel-marant-sneakers-c-1.html acheter isabel marant http://www.isabelmarantreduction.com/ Bottes isabel marant http://www.isabelmarantreduction.com/ Isabel Marant http://www.isabelmarantreducti (168 KB) ergo cca, 10/31/2012 04:56 PM