I want to know the specific difference between simple TLV and BER TLV
Why the BER TLV 5F05 05 48656C6C6F is Invalid as in BER TLV the tag can have one or more consecutive bytes???
Please give some examples also ..
The BER means bearer which allows the carriying of other TLV's within
BER-TLV data object contains (TL (TLV) (TLV) with a tag field followed by a length field encoding a number. The template, consists of one or more BER-TLV data objects, each one consisting of a tag field, a length field encoding a number and if the number is not zero, a value field.
In case its not clear feel free to contact me.
Regards Anup
I would like to add one more thing which is related to my question -
Why the BER TLV 5F05 05 48656C6C6F is Invalid as in BER TLV the tag can have one or more consecutive bytes???
Answer is -
As in BER TLV the Tag field can be structured in following manner : (ISO/IEC 7816 supports length fields of one, two, … up to five bytes)
In case when length of tag is 1 byte then the valid values can be - "00" to "7F"
In case when length of tag is 2 bytes then the valid values can be - "81" (for 1st byte) and "00" to "FF" (for 2nd byte)
In case when length of tag is 3 bytes then the valid values can be - "82" (for 1st byte) and "0000" to "FFFF" (for 2nd + 3rd bytes)
In case when length of tag is 4 bytes then the valid values can be - "83" (for 1st byte) and "000000" to "FFFFFF" (for 2nd + 3rd + 4th bytes)
In case when length of tag is 5 bytes then the valid values can be - "84" (for 1st byte) and "00000000" to "FFFFFFFF" (for 2nd + 3rd + 4th + 5th bytes)
So, in BER TLV 5F05 05 48656C6C6F -> The tag is of 2 bytes length (5F05) which is wrong because if the tag is of 2 bytes length then its first byte must be "81" and 2nd byte can be any in range "00" to "FF.
Feel free to ask in case of confusion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With