Documentation
¶
Index ¶
- func BreakRepeatingXOR(input []byte) ([][]byte, error)
- func DecryptAES128ECB(data, key []byte) ([]byte, error)
- func DecryptXOR(cipher []byte) [][]byte
- func DetectAES128ECB(ciphers [][]byte) int
- func DetectXORCipher(ciphers [][]byte) [][]byte
- func EncryptRXOR(msg, key []byte) error
- func FindKeySizes(from, to int, input []byte) ([]int, error)
- func FixedXor(upper []byte, lower []byte) ([]byte, error)
- func HammingDistance(first, second []byte) (uint64, error)
- func HexToBase64(b []byte) []byte
- type XORDecrypt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakRepeatingXOR ¶
BreakRepeatingXOR returns the top keys for the given input. The input is expected to be encrypted using the 'repeating-key XOR'
func DecryptAES128ECB ¶
DecryptAES128ECB decrypts the data encoded with AES128 in ECB.
func DecryptXOR ¶
func DetectAES128ECB ¶
DetectAES128ECB detects if some cipher was encoded using aes 128 ecb. If found returns the index of the ciper, -1 otherwise.
func DetectXORCipher ¶
func EncryptRXOR ¶
func FindKeySizes ¶
FindKeySize tries keysizes from the given range. Returns all keysizes sorted from the best score to the lowest score.
func HammingDistance ¶
HammingDistance returns the number of different bits of the two byte slices. Returns an error if their lengths don't match.
func HexToBase64 ¶
HexToBase64 converts the bytes b in hex to base64.
Types ¶
type XORDecrypt ¶
func DecryptXORKey ¶
func DecryptXORKey(cipher []byte) []XORDecrypt
Click to show internal directories.
Click to hide internal directories.