Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe the procedure to derive the signature flags #121

Open
maxsharabayko opened this issue Jul 3, 2023 · 0 comments
Open

Describe the procedure to derive the signature flags #121

maxsharabayko opened this issue Jul 3, 2023 · 0 comments

Comments

@maxsharabayko
Copy link
Collaborator

Haivision has the PNP ID 'HAI'. The procedure for how it should be encoded to become 0x2029 is not clear.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |S|  V  |   PT  |              Sign             |   Resv1   | KK|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              KEKI                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Cipher    |      Auth     |       SE      |     Resv2     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Resv3             |     SLen/4    |     KLen/4    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              Salt                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                          Wrapped Key                          +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Figure 10: Key Material Message structure

   Sign: 16 bits, value = {0x2029}.  This is a fixed-width field that
      contains the signature 'HAI' encoded as a PnP Vendor ID [PNPID]
      (in big-endian order).

The procedure is borrowed from an ancient life of device-driver/kernel-programmer.
From an era where each bit was precious.
This is far from modern full-text-based protocols.
You concatenate the 5 last bits of the ascii codes, plus one leading 0:

lead      0
H=48h&1F-> 01000b
A=41h&1F->      00001b
I=49h&1F->           01001b
          0010000000101001b
             2   0   2   9h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant