Tookan internal representation of model of devices follows the following syntax:
PKCS11_CONFIG = Key_Types Functions Modes Attributes Attribute_Restrictions Flags Key_Types = supports_symmetric_keys(BOOL); supports_asymmetric_keys(BOOL); Functions = functions( FunctionList ); FunctionList = nil | 'Function' , FunctionList Function = wrap | unwrap | encrypt | decrypt | create_object Modes = wrap_modes( KeyTypePairList ); unwrap_modes( KeyTypePairList ); encrypt_modes( KeyTypeList ); decrypt_modes( KeyTypeList ); KeyTypePairList = nil | 'KeyType/KeyType' , KeyTypePairList KeyTypeList = nil | 'KeyType' , KeyTypelist KeyType = CryptoType , Sensitivity CryptoType = symmetric | asymmetric Sensitivity = sensitive | nonsensitive Attributes = attributes( AttributeList ); AttributeList = nil | 'Attribute' , AttributeList Attribute = sensitive | extract | always_sensitive | never_extract | wrap | unwrap | encrypt | decrypt Attribute_Restrictions = Sticky_On Sticky_Off Always_On Always_off Conflicts Tied Sticky_On = sticky_on_symmetric( AttributeList ); sticky_on_asymmetric( AttributeList ); Sticky_Off = sticky_off_symmetric( AttributeList ); sticky_off_asymmetric( AttributeList ); Always_On = always_on_symmetric( AttributeList ); always_on_asymmetric( AttributeList ); Always_Off = always_off_symmetric( AttributeList ); always_off_asymmetric( AttributeList ); Conflicts = conflict_symmteric( AttributePairList ); conflict_asymmteric( AttributePairList ); Tied = tied_symmetric( AttributePairList ); tied_asymmetric( AttributePairList ); AttributePairList = nil | ' Attribute,Attribute ' , AttributePairList Flags = sensitive_prevents_read(BOOL); unextractable_prevents_read(BOOL); BOOL = true | false Templates = generate_symtemplates(TemplateList); generate_asymtemplates(TemplateList); create_symtemplates(TemplateList); create_asymtemplates(TemplateList); unwrap_symtemplates(TemplateList); unwrap_asymtemplates(TemplateList); TemplateList = nil | (Template) , TemplateList Template = nil | ( 'Attribute' , BOOL ) , Template