xstream

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2018 License: Apache-2.0, MIT Imports: 7 Imported by: 0

README

xstream.go Build Status GoDoc Go Report Card MIT licensed Gitter Chat

XSTREAM (pronounced "extreme!") is a public key encryption system combining X25519 Elliptic Curve Diffie-Hellman (RFC 7748) with the STREAM construction.

The implementations in this repository are built on top of the Miscreant misuse-resistant symmetric encryption library, which provides the AES-SIV and AES-PMAC-SIV algorithms.

More information on XSTREAM is available in the Wiki.

Help and Discussion

Have questions? Want to suggest a feature or change?

Security Notice

Though this library is written by cryptographic professionals, it has not undergone a thorough security audit, and cryptographic professionals are still humans that make mistakes.

Use this library at your own risk.

Documentation

Please see the XSTREAM Wiki for API documentation.

Code of Conduct

We abide by the Contributor Covenant and ask that you do as well.

For more information, please see CODE_OF_CONDUCT.md.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/miscreant/xstream.

License

Copyright (c) 2017-2018 The Miscreant Developers.

All XSTREAM libraries are licensed under either of:

at your option.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDecryptor

func NewDecryptor(alg string, privateKey, ephemeralPub *[x25519KeySize]byte, salt []byte) (*miscreant.StreamDecryptor, error)

NewDecryptor returns a miscreant.StreamDecryptor encryptor instance with the given cipher, nonce, and a key which must be twice as long as an AES key, either 32 or 64 bytes to select AES-128 (AES-SIV-256) or AES-256 (AES-SIV-512).

func NewEncryptor

func NewEncryptor(
	alg string,
	publicKey *[x25519KeySize]byte,
	salt []byte,
) (*miscreant.StreamEncryptor, *[x25519KeySize]byte, error)

NewEncryptor uses X25519 and HKDF to derive a symmetric encryption key and returns a miscreant.StreamEncryptor instance initialized with that key

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL