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 CnExpandKeyGoSoft(key []uint64, rkeys *[40]uint32)
- func CnRounds(dst, src []uint64, rkeys *[40]uint32)
- func CnRoundsAsm(dst, src *uint64, rkeys *uint32)
- func CnRoundsGo(dst, src []uint64, rkeys *[40]uint32)
- func CnRoundsGoSoft(dst, src []uint64, rkeys *[40]uint32)
- func CnSingleRound(dst, src []uint64, rkey *[2]uint64)
- func CnSingleRoundAsm(dst, src *uint64, rkeys *uint64)
- func CnSingleRoundGo(dst, src []uint64, rkey *[2]uint64)
- func CnSingleRoundGoSoft(dst, src []uint64, rkey *[2]uint64)
- func CnSingleRoundHeavyGo(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 ¶
func CnExpandKeyGo ¶
func CnExpandKeyGoSoft ¶
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 ¶
func CnRoundsGo ¶
func CnRoundsGoSoft ¶
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 CnSingleRoundAsm ¶
func CnSingleRoundGo ¶
func CnSingleRoundGoSoft ¶
func CnSingleRoundHeavyGo ¶
Types ¶
This section is empty.