How to create security mask for a customized attribute

I have create a extended type from VPMReference and add some attributes for it. I want to use mask to control the visibility and editability of these attribute. But I donot know how to create a mask for these attributes. Could you please help me on it?