I thank Steven & David for taking their time in explaining the concept
of tagging.
now with david's mail, i am almost near the point(thanks again, david)
if possible please point me to one practical situation(like x509 cert,
ocsp format...) where in this explicit vs implict tagging matters.
let me be clear - Say in the ASN.1 notation of a praticular rfc(say x509
or ocsp) explicit tagging is used; why not implicit tagging is used
there. i need the explaination from a designer's perspective(this i can
get only from ppl like u who have been here around for a while).
- Sravan
David Schwartz wrote:
By using explicit tagging the underlying object is encoded as it
would be if
standalone. Implict tagging avoids adding a wrapper around the object but
results in the underlying object being slightly altered.
And it results in it being impossible to tell the type of the object
unless
you understand the format. Imagine if you have an object that can contain
either a maximum or a minimum. Maximum is of type 0 and minimum is of type
1.
If you use implicit tagging, a decoder looking at an object containing a
minimum and see an object of type zero. It will have no idea (from just the
data sent) that it's an integer. It will be unable to decode its integral
value.
If you use explicit tagging, an object of type integer is put into a
container of type 0. A decoder that doesn't know the object format will not
know that 0 means minimum, but it will know that the object of type 0 is an
integer and it will be able to decode its integral value.
It's kind of the difference between, sending a maximum of 7:
Explicit:
[ 0 [INTEGER 7] ]
Implicit:
[ 0 7 ]
With explicit coding, it's obvious that the '7' is an integer. With
implicit coding, it's not clear what that 7 is. it could be an integer, a
bit string, or anything. You would have to know the protocol for this object
to know that if you see a zero, it means the value is of type integer.
I hope that's clear. It's a simple concept that seems hard to express.
DS
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]