spritz

package module
v0.0.0-...-b2bf188 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2014 License: MIT Imports: 3 Imported by: 0

README

spritz

Build Status

A pure Go implementation of the Spritz stream cipher.

For documentation, check godoc.

Documentation

Overview

Package spritz provides a pure Go implementation of the Spritz stream cipher and hash.

More details on the Spritz family of algorithms can be found here: http://people.csail.mit.edu/rivest/pubs/RS14.pdf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsecurePasswordHash

func InsecurePasswordHash(password, salt []byte, m, t, n uint) []byte

InsecurePasswordHash calculates a CPU- and memory-hard hash of the given password and salt. It takes two exponential parameters, M and T, which determine the memory and CPU costs. It also takes the length of the hash in bytes.

N.B.: THIS IS A TOTALLY EXPERIMENTAL ALGORITHM WHICH I WROTE BEFORE I'D HAD ANY COFFEE. DO NOT USE HACKY ALGORITHMS DESIGNED BY UNCAFFEINATED NON-CRYPTOGRAPHERS.

func NewHash

func NewHash(size int) hash.Hash

NewHash returns a new instance of the Spritz hash with the given output size.

func NewMAC

func NewMAC(key []byte, size int) hash.Hash

NewMAC returns a new instance of the Spritz MAC with the given key and output size.

func NewStream

func NewStream(key []byte) cipher.Stream

NewStream returns a new instance of the Spritz cipher using the given key.

func NewStreamWithIV

func NewStreamWithIV(key, iv []byte) cipher.Stream

NewStreamWithIV returns a new instance of the Spritz cipher using the given key and initialization vector.

Types

This section is empty.

Jump to

Keyboard shortcuts

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