aes

package
v0.0.0-...-c9cf022 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 4 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

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

func CnExpandKeyGo

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

func CnExpandKeyGoSoft

func CnExpandKeyGoSoft(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

func CnRoundsAsm(dst, src *uint64, rkeys *uint32)

func CnRoundsGo

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

func CnRoundsGoSoft

func CnRoundsGoSoft(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 CnSingleRoundAsm

func CnSingleRoundAsm(dst, src *uint64, rkeys *uint64)

func CnSingleRoundGo

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

func CnSingleRoundGoSoft

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

func CnSingleRoundHeavyGo

func CnSingleRoundHeavyGo(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