The VPN mechanism is adapted to be suitable for implementation in hardware at relatively low cost thus enabling cost effective incorporation of the invention in to portable electronic communications device such as cellular telephones, personal digital assistants (PDAs), laptop computers, etc. in connecting to the Internet or other wide area network.