aes

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package aes implements AES utilities for CryptoNight usage.

Most files are ported from Go's crypto/aes package.

Since CryptoNight's use of AES is quite non-standard and not intended for encryption, you must use this package this package with care for project that's not CryptoNight associated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CnExpandKey

func CnExpandKey(key []uint64, rkeys *[40]uint32)

CnExpandKey expands exactly 10 round keys.

key must have at least 2 elements.

The result may vary from different architecture, but the output parameter rkeys is guranteed to give correct result when used as input in CnRounds.

Note that this is CryptoNight specific. This is non-standard AES!

func CnExpandKeyAsm added in v0.2.0

func CnExpandKeyAsm(src *uint64, rkey *[40]uint32)

func CnExpandKeyGo added in v0.2.1

func CnExpandKeyGo(key []uint64, rkeys *[40]uint32)

func CnRounds

func CnRounds(dst, src []uint64, rkeys *[40]uint32)

CnRounds = (SubBytes, ShiftRows, MixColumns, AddRoundKey) * 10,

dst and src must have at least 2 elements.

Note that this is CryptoNight specific. This is non-standard AES!

func CnRoundsAsm added in v0.2.0

func CnRoundsAsm(dst, src *uint64, rkeys *[40]uint32)

func CnRoundsGo added in v0.2.1

func CnRoundsGo(dst, src []uint64, rkeys *[40]uint32)

func CnSingleRound

func CnSingleRound(dst, src []uint64, rkey *[2]uint64)

CnSingleRound performs exactly one AES round, i.e. one (SubBytes, ShiftRows, MixColumns, AddRoundKey).

dst and src must have at least 2 elements.

Note that this is CryptoNight specific. CnSingleRound * 10 might not be equivalent to one CnRounds.

func CnSingleRoundGo added in v0.2.1

func CnSingleRoundGo(dst, src []uint64, rkey *[2]uint64)

Types

This section is empty.

Jump to

Keyboard shortcuts

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