On Tue, 25 Jun 2002, John Larmouth wrote: > Yes. But your example is a bit ... well ... (I won't be more > explicit!). > > Constraining an open type to be a single fixed type is not really > useful in terms of abstract values. It is, however, often done in > security-related specifications as a means of getting a length wrapper > round your "X" so that the code handling the outer level stuff does > not need to know anything about X. This is a fudge!
The reason why an open type is constrained to a single fixed type in security-related protocols is not simply to get a length wrapper around the fixed type ("X"). It is a way of expressing and ensuring that "X" first be encoded, after which cryptographic enhancements can be performed on the encoded values, and finally that the already encoded value can be transferred to the encoded output stream without re-encoding. This use of the constrained open type that Phil Griffin came up with several years ago is particularly good when it comes to encoding rules such as PER, for it results in higher-performing security-related protocols than if this notation were not used. ------------------------------------------------------------------------- Bancroft Scott Toll Free :1-888-OSS-ASN1 OSS Nokalva International:1-732-302-0750 [EMAIL PROTECTED] Tech Support :1-732-302-9669 x-1 1-732-302-9669 x-200 Fax :1-732-302-0023 http://www.oss.com > A much more common (and respectable!) use is when the open-type is > constrained to be one of a set of types specified in an Information > Object Set, and there is a component relation cosntraint pointing to > another field that says which type has in fact been encoded into the > open type field. > > John L > > > Paul Long wrote: > > > > I've put it off too long. Now it's time for me learn this ".&" stuff. Is y, > > below, encoded in PER as an open type that contains an encoding of X? Is > > that all there is to it? Also, what syntactical role does the "(X)" play? Is > > this a constraint and otherwise y could be encoded as an open type of any > > type? > > > > X ::= SEQUENCE { > > a INTEGER, -- stuff... > > b BOOLEAN > > } > > > > Z ::= SEQUENCE { > > y TYPE-IDENTIFIER.&Type (X) > > } > > > > Paul Long > > ipDialog, Inc. > > -- > Prof John Larmouth > Larmouth T&PDS Ltd > (Training and Protocol Development Services) > 1 Blueberry Road > Bowdon [EMAIL PROTECTED] > Cheshire WA14 3LS Tel: +44 161 928 1605 > England Fax: +44 161 928 8069 >