Documentation ¶
Index ¶
- func BreakECBCookie(encrypt func(email []byte) []byte) []byte
- func DecryptAESinCBC(input, key, iv []byte) []byte
- func DetectAESMode(input []byte) string
- func ECBSuffixDecryption(oracle func([]byte) []byte) []byte
- func EncryptAESinCBC(input, key, iv []byte) []byte
- func EncryptAESinECB(input, key []byte) []byte
- func EncryptionOracle(input []byte) []byte
- func PadRight(input []byte, length int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakECBCookie ¶
BreakECBCookie given an encrypt cookie oracle that generates cookie profile in the format: `email=foo@bar.me&role=user&uid=99<padding>`, this function will forge an encrypted admin cookie.
func DecryptAESinCBC ¶
DecryptAESinCBC decyphers an input encrypted via AES-128 in CBC, according to the given key and IV
func DetectAESMode ¶
DetectAESMode will return "ECB" is the given string is encrypted in ECB mode, CBC otherwise. Input must be at least 32 byte long
func ECBSuffixDecryption ¶
ECBSuffixDecryption decrypts the secret appendend to a ECB encryption oracle
func EncryptAESinCBC ¶
EncryptAESinCBC encrypts a plaintext input via AES-128 in CBC, according to the given key and IV
func EncryptAESinECB ¶
EncryptAESinECB encrypts a plaintext input via AES-128 in ECB, according to the given key
func EncryptionOracle ¶
EncryptionOracle randomly encrypts the input with either CBC or ECB with random key and IV
Types ¶
This section is empty.