norx

package
v0.0.0-...-0b3308b Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MPL-2.0, BSD-3-Clause Imports: 3 Imported by: 0

README

Go Implementation of NORX

NORX is a parallel and scalable authenticated encryption algorithm and was designed by:

This implementation currently supports only NORX64 in sequential mode.

####Installation

go get https://github.com/Daeinar/norx-go

####Usage The following command installs norx-go and runs the test vectors from test.go:

go install && norx-go

####License This software package is released under the BSD (3-Clause) license. See the file LICENSE for more details.

Documentation

Overview

Package NORX implements the experimental NORX cipher. For details on the NORX cipher see https://norx.io This package is very experimental and NOT for use in prodution systems.

This is a fork of the NORX implementation in Go by Philipp Jovanovic, from http://github.com/daeinar/norx-go

Index

Constants

View Source
const (
	NORX_W         = 64                                     // wordsize
	NORX_R         = 4                                      // number of rounds
	NORX_D         = 1                                      // parallelism degree
	NORX_A         = NORX_W * 4                             // tag size
	WORDS_RATE     = 10                                     // number of words in the rate
	WORDS_STATE    = 16                                     // ... in the state
	BYTES_WORD     = NORX_W / 8                             // byte size of a word
	BYTES_RATE     = WORDS_RATE * BYTES_WORD                // ... of the rate
	BYTES_TAG      = NORX_A / 8                             // ... of the tag
	HEADER_TAG     = 1 << 0                                 // domain separation constant for header
	PAYLOAD_TAG    = 1 << 1                                 // ... for payload
	TRAILER_TAG    = 1 << 2                                 // ... for trailer
	FINAL_TAG      = 1 << 3                                 // ... for finalisation
	BRANCH_TAG     = 1 << 4                                 // ... for branching
	MERGE_TAG      = 1 << 5                                 // ... for merging
	R0, R1, R2, R3 = 8, 19, 40, 63                          // rotation offsets
	U0, U1         = 0x243F6A8885A308D3, 0x13198A2E03707344 // initialisation constants
	U2, U3         = 0xA4093822299F31D0, 0x082EFA98EC4E6C89 // ...
	U4, U5         = 0xAE8858DC339325A1, 0x670A134EE52D7FA6 // ...
	U6, U7         = 0xC4316D80CD967541, 0xD21DFBF8B630B762 // ...
	U8, U9         = 0x375A18D261E7F892, 0x343D1F187D92285B // ...
)

Variables

This section is empty.

Functions

func AEAD_decrypt

func AEAD_decrypt(
	m []uint8, mlen *uint64,
	h []uint8, hlen uint64,
	c []uint8, clen uint64,
	t []uint8, tlen uint64,
	nonce []uint8,
	key []uint8) int

func AEAD_encrypt

func AEAD_encrypt(
	c []uint8, clen *uint64,
	h []uint8, hlen uint64,
	m []uint8, mlen uint64,
	t []uint8, tlen uint64,
	nonce []uint8,
	key []uint8)

func BURN64

func BURN64(x []uint64, xlen uint64)

func BURN8

func BURN8(x []uint8, xlen uint64)

func F

func F(s []uint64)

func G

func G(a, b, c, d uint64) (uint64, uint64, uint64, uint64)

func H

func H(x, y uint64) uint64

func LOAD64

func LOAD64(x []uint8) uint64

func NewCipher

func NewCipher(key []byte, options ...interface{}) abstract.Cipher

NewCipher creates a Cipher implementing the 64-4-1 mode of NORX.

func ROTR

func ROTR(x, c uint64) uint64

func STORE64

func STORE64(out []uint8, v uint64)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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