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 ¶
- func CnExpandKey(key []uint64, rkeys *[40]uint32)
- func CnExpandKeyAsm(src *uint64, rkey *[40]uint32)
- func CnExpandKeyGo(key []uint64, rkeys *[40]uint32)
- func CnRounds(dst, src []uint64, rkeys *[40]uint32)
- func CnRoundsAsm(dst, src *uint64, rkeys *[40]uint32)
- func CnRoundsGo(dst, src []uint64, rkeys *[40]uint32)
- func CnSingleRound(dst, src []uint64, rkey *[2]uint64)
- func CnSingleRoundGo(dst, src []uint64, rkey *[2]uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CnExpandKey ¶
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 CnExpandKeyGo ¶ added in v0.2.1
func CnRounds ¶
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 CnRoundsGo ¶ added in v0.2.1
func CnSingleRound ¶
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
Types ¶
This section is empty.