salsa20s

package
v0.0.0-...-7b7a036 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Implements the cipher.Stream version of salsa20 ontop of "golang.org/x/crypto/salsa20".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ctri

func Ctri(ctr *[16]byte)

Increments a Salsa20 counter

func KeyShedule

func KeyShedule(nonce []byte, key *[32]byte) (*[16]byte, *[32]byte)

func MakeSalsaCipher

func MakeSalsaCipher(nonce []byte, key *[32]byte) (ciph cipher.Stream, err error)

Types

type SalsaCipher

type SalsaCipher struct {
	Counter *[16]byte
	Key     *[32]byte
	Buffer  []byte //64 bytes
	Pos     int
}

func (*SalsaCipher) XORKeyStream

func (s *SalsaCipher) XORKeyStream(dst, src []byte)

Jump to

Keyboard shortcuts

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