X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/b2177d0418407afaf5fbabe7d5d9b19ce6fb9105..e53273effe4843c10e8ac6b6490b6a32ff856f0f:/wireshark/tripe.lua diff --git a/wireshark/tripe.lua b/wireshark/tripe.lua index 5c6d7ba9..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