Go Cipher
Crypto, 1000 points
Description of the algorithm
func encrypt(plaintext []byte, key []byte) string {
x := uint64(binary.LittleEndian.Uint64(key[0:]))
y := uint64(binary.LittleEndian.Uint64(key[8:]))
z := uint64(binary.LittleEndian.Uint64(key[16:]))
keyid := md5.Sum(key)
r := keyid[:]
for _, e := range plaintext {
t := (e - byte(x)) ^ byte(y) ^ byte(z)
r = append(r, t)
x = bits.RotateLeft64(x, -1)
y = bits.RotateLeft64(y, 1)
z = bits.RotateLeft64(z, 1)
}
return hex.EncodeToString(r)
}Exploitation of the algorithm
Conclusion
Last updated