Code Monkey home page Code Monkey logo

btls's Introduction

yellow submarine This package implements TLS protocol (SSL 3.0 and TLS 1.0, 1.1 and 1.2).

**Currently early WIP**

Goals

  • highly modular to enable use of different cryptographic modules, certificate stores, session caches, etc
  • well factored and documented for clarity and suitability for future development (new protocol versions, extensions, experiments, etc.)
  • scalable (buffer management, minimize garbage, minimize number of external calls, etc)

Features

Record Layer

  • Reader and Writer interface
  • HMAC & SSL 3.0 MAC (MD5, SHA, SHA256)
  • StreamCipher (NULL, RC4_128)
  • BlockCipher, implicit & explicit IV (3DES_EDE_CBC, AES_128_CBC, AES_256_CBC)
  • AEADCipher

Handshake

  • RSA Key Exchange
  • DHE Key Exchange
  • ECDHE Key Exchange
  • Certificate Store
  • Session Cache
  • Session Resumption
  • Renegotiation

Handshake Extensions

  • Signature Algorithms, TLS 1.2
  • Server Name, RFC#6066
  • Renegotiation Info, RFC#5746
  • Session Tickets, RFC#5077

Status

Currently it is possible to exercise the records package (tests or benchmarks) with either the native Go crypto library or with OpenSSL's libcrypto. Which one is used is controlled via imports (okapi/gocrypto or okapi/libcrypto). The tests are set up to use libcrypto by default, but can be easily switched to gocrypto with GOCRYPTO build tag.

$ go test -bench=RW
PASS
BenchmarkRW_NULL_NULL_TLS10	  500000	      5750 ns/op
BenchmarkRW_NULL_MD5_SSL30	   10000	    105334 ns/op
BenchmarkRW_NULL_SHA_TLS11	  200000	     14569 ns/op
BenchmarkRW_RC4_128_MD5_SSL30	   10000	    210437 ns/op
BenchmarkRW_RC4_128_SHA_TSL12	   10000	    117597 ns/op
BenchmarkRW_3DES_EDE_CBC_SHA_SSL30	    2000	   1417936 ns/op
BenchmarkRW_AES_128_CBC_SHA_TLS10	   50000	     51434 ns/op
BenchmarkRW_AES_256_CBC_SHA256_TLS12	   20000	     87873 ns/op
ok  	_/Users/martin/go/tls/records	19.122s
$ go test -bench=RW -tags=GOCRYPTO
PASS
BenchmarkRW_NULL_NULL_TLS10	  500000	      5776 ns/op
BenchmarkRW_NULL_MD5_SSL30	   20000	     86158 ns/op
BenchmarkRW_NULL_SHA_TLS11	   10000	    112762 ns/op
BenchmarkRW_RC4_128_MD5_SSL30	   10000	    136175 ns/op
BenchmarkRW_RC4_128_SHA_TSL12	   10000	    162692 ns/op
BenchmarkRW_3DES_EDE_CBC_SHA_SSL30	     200	   7550312 ns/op
BenchmarkRW_AES_128_CBC_SHA_TLS10	    5000	    340585 ns/op
BenchmarkRW_AES_256_CBC_SHA256_TLS12	    5000	    699540 ns/op
ok  	_/Users/martin/go/tls/records	17.306s

btls's People

Contributors

mkobetic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.