Ask Your Question

Dissector preferences with alternative representations

asked 2019-01-24 03:52:13 +0000

cmcqueen1975 gravatar image

updated 2019-01-24 07:29:25 +0000

Jaap gravatar image

I've got a custom dissector written in Lua. The protocol has encryption, which needs a 16-byte encryption key to decode, so I've made that a protocol preference, with the key entered as 32 hex digits. That's working fine.

I'd like to have the possibility of entering a protocol encryption key as a keyphrase instead, where the encryption key is a hash output from the keyphrase (and non-reversible).

How could dissector preferences be set up so that a user could enter either an encryption key as 32 hex digits, or enter a passphrase that is converted to 32 hex digits? Could it be:

  1. two separate text fields (and the key as 32 hex digits is automatically updated when the user types a keyphrase)
  2. one text field plus an enum box to choose whether it's a hex key vs keyphrase
  3. some other strategy?
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-01-24 07:37:26 +0000

Jaap gravatar image

To go trough the list:

  1. Two fields is possible, of course. The update otoh will only happen when you apply the preference, when the dissector gets the chance to process the keyphrase into the key value. So not during typing. Also it may not be clear from the UI that a key phrase overrides a hex key.
  2. This is also possible, the dissector would have to verify during application of the preference if it's valid though.
  3. Since there is no 'combinatory logic' in the preferences user interface your options are somewhat limited.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-01-24 03:52:13 +0000

Seen: 139 times

Last updated: Jan 24 '19