X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/8362ac1c9b2fbf253b06a50639c57047d43a8fa2..0479da8e1fe09771cc528050d7e344a7747c42b6:/wireshark/tripe.lua diff --git a/wireshark/tripe.lua b/wireshark/tripe.lua index aab8e798..a3544e9d 100644 --- a/wireshark/tripe.lua +++ b/wireshark/tripe.lua @@ -57,7 +57,7 @@ local CONFIG = { -- order. { var = "bulk", name = "Bulk transform", - type = "enum", allowed = { "v0", "iiv", "naclbox" }, + type = "enum", allowed = { "v0", "iiv", "naclbox", "aead" }, descr = "Bulk cryptographic transform", default = "v0" }, { var = "hashsz", name = "Hash length", type = "int", min = 0, descr = "Hash length (bytes)", default = 20 }, @@ -184,6 +184,11 @@ end -- Dissect a ciphertext of some particular kind. local dissect_ct = { } +function dissect_ct.aead(buf, tree, pos, sz) + tree:add(PF["tripe.ciphertext.tag"], buf(pos, C.tagsz)); pos = pos + C.tagsz + tree:add(PF["tripe.ciphertext.seq"], buf(pos, 4)); pos = pos + 4 + tree:add(PF["tripe.ciphertext.body"], buf(pos, sz - pos)) +end function dissect_ct.naclbox(buf, tree, pos, sz) tree:add(PF["tripe.ciphertext.tag"], buf(pos, 16)); pos = pos + 16 tree:add(PF["tripe.ciphertext.seq"], buf(pos, 4)); pos = pos + 4 @@ -408,6 +413,8 @@ local PKTINFO = { dissect = { dissect_misc_ciphertext } }, [5] = { label = "MISC_GREET", info = "greeting", dissect = { dissect_misc_payload } }, + [6] = { label = "MISC_BYE", info = "disconnect notification", + dissect = { dissect_misc_ciphertext } }, } } }