Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.github/ | H | 09-Mar-2020 | - | 106 | 65 | |
sioutil/ | H | 09-Mar-2020 | - | 149 | 66 | |
.cirrus.yml | H A D | 09-Mar-2020 | 521 | 19 | 15 | |
.gitignore | H A D | 09-Mar-2020 | 192 | 13 | 10 | |
.golangci.yml | H A D | 09-Mar-2020 | 517 | 31 | 26 | |
LICENSE | H A D | 09-Mar-2020 | 1 KiB | 22 | 17 | |
README.md | H A D | 09-Mar-2020 | 2 KiB | 38 | 28 | |
benchmark_test.go | H A D | 09-Mar-2020 | 8.4 KiB | 282 | 248 | |
examples_test.go | H A D | 09-Mar-2020 | 10.3 KiB | 285 | 140 | |
fuzz-corpus.sh | H A D | 09-Mar-2020 | 694 | 22 | 16 | |
fuzz.go | H A D | 09-Mar-2020 | 10.2 KiB | 411 | 349 | |
fuzzbuzz.yaml | H A D | 09-Mar-2020 | 290 | 15 | 13 | |
go.mod | H A D | 09-Mar-2020 | 166 | 9 | 6 | |
go.sum | H A D | 09-Mar-2020 | 931 | 10 | 9 | |
helper_test.go | H A D | 09-Mar-2020 | 2.1 KiB | 107 | 92 | |
reader.go | H A D | 09-Mar-2020 | 12.6 KiB | 515 | 385 | |
reader_test.go | H A D | 09-Mar-2020 | 9.4 KiB | 290 | 233 | |
sio.go | H A D | 09-Mar-2020 | 11.5 KiB | 367 | 222 | |
sio_test.go | H A D | 09-Mar-2020 | 2.8 KiB | 114 | 104 | |
test_vectors.json | H A D | 09-Mar-2020 | 8.1 KiB | 33 | 30 | |
writer.go | H A D | 09-Mar-2020 | 13.1 KiB | 530 | 358 | |
writer_test.go | H A D | 09-Mar-2020 | 9 KiB | 303 | 256 |
README.md
1[![Godoc Reference](https://godoc.org/github.com/secure-io/sio-go?status.svg)](https://godoc.org/github.com/secure-io/sio-go) 2[![Build Status](https://api.cirrus-ci.com/github/secure-io/sio-go.svg?branch=master)](https://cirrus-ci.com/github/secure-io/sio-go) 3 4# Secure IO 5 6The `sio` package implements provable secure authenticated encryption for continuous byte streams. 7It splits a data stream into `L` bytes long fragments and en/decrypts each fragment with an unique 8key-nonce combination using an [AEAD](https://golang.org/pkg/crypto/cipher/#AEAD). For the last 9fragment the construction prefixes the associated data with the `0x80` byte (instead of `0x00`) 10to prevent truncation attacks. 11 12![`sio` encryption scheme](https://github.com/secure-io/sio/blob/master/img/channel_construction.svg) 13 14The `sio` package follows semantic versioning and hasn't reached a stable v1.0.0, yet. So 15newer versions may cause major breaking API changes. However, we try to avoid such changes - if not really 16needed. 17 18### How to use `sio`? 19 20``` 21import ( 22 "github.com/secure-io/sio-go" 23) 24``` 25 26The `sio` package provides APIs for en/decrypting an [`io.Reader`](https://golang.org/pkg/io#Reader) 27or an [`io.Writer`](https://golang.org/pkg/io/#Writer). First, you have to create a 28[`Stream`](https://godoc.org/github.com/secure-io/sio#Stream) instance from a 29[`cipher.AEAD`](https://golang.org/pkg/crypto/cipher/#AEAD) and a buffer size. 30(The buffer size determines the fragment size `L`). You may want to take a look at 31[this example](https://godoc.org/github.com/secure-io/sio-go#example-NewStream--AESGCM). 32 33Then you can use the `Stream` to encrypt resp. decrypt an `io.Reader` or `io.Writer` using 34e.g. the [`EncryptReader`](https://godoc.org/github.com/secure-io/sio-go#Stream.EncryptReader) 35or [`DecryptWriter`](https://godoc.org/github.com/secure-io/sio-go#Stream.DecryptWriter) methods. 36 37For a comprehensive overview of the API please take a look at [godoc.org](https://godoc.org/github.com/secure-io/sio-go). 38