[64] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

ASN.1/ISODE encoding of bit fields

jtkohl@ATHENA.MIT.EDU (jtkohl@ATHENA.MIT.EDU)
Wed Jan 17 13:23:57 1990

The ASN.1 & ISODE encoding of bit fields is fairly compact; the first
octet [excluding tags & length] indicates how many left over bits in the
last octet, and the rest of the octets contain the bits, in order.

So, for a bit field 0x3fab2, it would be encoded as (0x) 04 3f ab 20

The specs talk about "first bit" and "last bit"; the ISODE conversion
goes from integer to string to bitfield, and to keep bit numbering in
the ASN.1 spec consistent with bit numbering of the protocol spec and
header files, the bits are reversed by a conversion routine before
passing to the ISODE functions.


home help back first fref pref prev next nref lref last post