aes

package
Version: v0.0.0-...-808d020 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CBCPaddingOracleCipherBytes = []string{
	"MDAwMDAwTm93IHRoYXQgdGhlIHBhcnR5IGlzIGp1bXBpbmc=",
	"MDAwMDAxV2l0aCB0aGUgYmFzcyBraWNrZWQgaW4gYW5kIHRoZSBWZWdhJ3MgYXJlIHB1bXBpbic=",
	"MDAwMDAyUXVpY2sgdG8gdGhlIHBvaW50LCB0byB0aGUgcG9pbnQsIG5vIGZha2luZw==",
	"MDAwMDAzQ29va2luZyBNQydzIGxpa2UgYSBwb3VuZCBvZiBiYWNvbg==",
	"MDAwMDA0QnVybmluZyAnZW0sIGlmIHlvdSBhaW4ndCBxdWljayBhbmQgbmltYmxl",
	"MDAwMDA1SSBnbyBjcmF6eSB3aGVuIEkgaGVhciBhIGN5bWJhbA==",
	"MDAwMDA2QW5kIGEgaGlnaCBoYXQgd2l0aCBhIHNvdXBlZCB1cCB0ZW1wbw==",
	"MDAwMDA3SSdtIG9uIGEgcm9sbCwgaXQncyB0aW1lIHRvIGdvIHNvbG8=",
	"MDAwMDA4b2xsaW4nIGluIG15IGZpdmUgcG9pbnQgb2g=",
	"MDAwMDA5aXRoIG15IHJhZy10b3AgZG93biBzbyBteSBoYWlyIGNhbiBibG93",
}

Functions

func CheckCBCPadding

func CheckCBCPadding(cipherBytes []byte, key []byte, iv []byte) bool

func DecryptCBC

func DecryptCBC(cipherBytes []byte, key []byte, iv []byte, size int) ([]byte, error)

func DecryptECB

func DecryptECB(cipherBytes []byte, key []byte, size int) ([]byte, error)

func EncryptCBC

func EncryptCBC(plainBytes []byte, key []byte, iv []byte, size int) []byte

func EncryptECB

func EncryptECB(plainBytes []byte, key []byte, size int) []byte

func EncryptionOracle

func EncryptionOracle(plainBytes []byte, ecb bool) []byte

func MakeCBCEncryptionOracle

func MakeCBCEncryptionOracle(aesKey []byte, iv []byte, blockSize int) func(plainBytes []byte) []byte

func MakeCBCPaddingOracle

func MakeCBCPaddingOracle(aesKey []byte, num int) func() (cipherBytes []byte, iv []byte)

func MakeECBEncryptionOracle

func MakeECBEncryptionOracle(aesKey []byte, prefix []byte) func(plainBytes []byte) []byte

func MakeStreamFunc

func MakeStreamFunc(aesKey []byte, nonce uint64) func() []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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