Documentation ¶
Index ¶
- func BreakRepeatingKeyXOR(input []byte) []byte
- func BruteForceXORCypher(input []byte) ([]byte, int)
- func DecryptAESinECB(input, key []byte) []byte
- func DetectAESinECB(input []byte, blockSize int) bool
- func DetectRuneXOR(filePath string) (string, error)
- func EstimateKeySize(input []byte) int
- func FixedXOR(a, b []byte) ([]byte, error)
- func HammingDistance(a, b []byte) int
- func HexToBase64(hexString string) ([]byte, error)
- func RepeatingKeyXOR(input, key []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakRepeatingKeyXOR ¶
BreakRepeatingKeyXOR deciphers a given input that has been XORed with a repeating key and returns the best result it finds
func BruteForceXORCypher ¶
BruteForceXORCypher takes an hex encoded string that has been XORed against a single character and tries to decypher it
func DecryptAESinECB ¶
DecryptAESinECB decyphers an input encrypted via AES-128 in ECB, according to the given key
func DetectAESinECB ¶
DetectAESinECB will return true if it encounters a block of the given size more than once
func DetectRuneXOR ¶
DetectRuneXOR reads every line from the given file path and XORs it against every possible character, returning the string with the highest score
func EstimateKeySize ¶
EstimateKeySize estimates the size of a repeating XOR key
func HammingDistance ¶
HammingDistance calculates the edit distance given two byte arrays of the same length
func HexToBase64 ¶
HexToBase64 takes an hex encoded string and transforms it to a base64 encoded byte array
func RepeatingKeyXOR ¶
RepeatingKeyXOR takes an input and XORs it with a repeating key
Types ¶
This section is empty.