bes

package
v0.0.0-...-b7fcb3c Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package bes implements the Big Encryption System, a variant of AES with more algebraic structure.

From the abstract of the source paper:

One difficulty in the cryptanalysis of the Advanced Encryption Standard (AES) is the tension between operations in
the two fields GF(2^8) and GF(2). ... We define a new block cipher, the BES, that uses only simple operations in
GF(2^8). Yet, the AES can be regarded as being identical to the BES with a restricted message space and key space,
thus enabling the AES to be realised solely using simple algebraic operations in one field GF(2^8). This permits
the exploration of the AES within a broad and rich setting.

"Essential Algebraic Structure Within the AES" by S. Murphy and M.J.B. Robshaw, http://www.isg.rhul.ac.uk/~sean/crypto.pdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contract

func Contract(in gfmatrix.Row) []byte

Contract takes a value from BES's space and compacts it into AES's space.

func Expand

func Expand(in []byte) gfmatrix.Row

Expand takes a value from AES's space and embeds it in BES's space.

Types

type Construction

type Construction struct {
	// A 128-byte BES key.
	Key gfmatrix.Row
}

func (Construction) BlockSize

func (constr Construction) BlockSize() int

BlockSize returns the block size of BES. (Necessary to implement cipher.Block.)

func (Construction) Decrypt

func (constr Construction) Decrypt(dst, src []byte)

Decrypt decrypts the first block in src into dst. Dst and src may point at the same memory.

func (Construction) Encrypt

func (constr Construction) Encrypt(dst, src []byte)

Encrypt encrypts the first block in src into dst. Dst and src may point at the same memory.

func (*Construction) StretchedKey

func (constr *Construction) StretchedKey() [11]gfmatrix.Row

StretchedKey implements BES' key schedule. It returns the 11 round keys derived from the master key.

Jump to

Keyboard shortcuts

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