set2

package
v0.0.0-...-7d67327 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreakECBCookie

func BreakECBCookie(encrypt func(email []byte) []byte) []byte

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

func DecryptAESinCBC(input, key, iv []byte) []byte

DecryptAESinCBC decyphers an input encrypted via AES-128 in CBC, according to the given key and IV

func DetectAESMode

func DetectAESMode(input []byte) string

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

func ECBSuffixDecryption(oracle func([]byte) []byte) []byte

ECBSuffixDecryption decrypts the secret appendend to a ECB encryption oracle

func EncryptAESinCBC

func EncryptAESinCBC(input, key, iv []byte) []byte

EncryptAESinCBC encrypts a plaintext input via AES-128 in CBC, according to the given key and IV

func EncryptAESinECB

func EncryptAESinECB(input, key []byte) []byte

EncryptAESinECB encrypts a plaintext input via AES-128 in ECB, according to the given key

func EncryptionOracle

func EncryptionOracle(input []byte) []byte

EncryptionOracle randomly encrypts the input with either CBC or ECB with random key and IV

func PadRight

func PadRight(input []byte, length int) []byte

PadRight fills the input array with \x04 up until the desired length

Types

This section is empty.

Jump to

Keyboard shortcuts

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