Código
func main() { scmKey := decode(scmKey) salt := decode(salt) // AES-ECB-256_decrypt(k=maskkey, scm_key) = scr_key a, err := aes.NewCipher(maskkey) if err != nil { log.Fatal(err) } for i := 0; i < len(scmKey); i += a.BlockSize() { a.Decrypt(scmKey[i:i+a.BlockSize()], scmKey[i:i+a.BlockSize()]) } // HMAC-SHA1(k=maskkey, scm_key) == sch_mac h := sha1.Sum(maskkey) mac.Write(scmKey) expectedMAC := mac.Sum(nil) fmt.Print(hex.Dump(expectedMAC)) }
El link con la lectura completa en Ingles:
https://blog.filippo.io/so-i-lost-my-openbsd-fde-password/