BGP supports authentication mechanism using MD5 mechanism. When authentication is enabled every TCP segment belonging to BGP session is verified and accepted only if the authentication match. If authentication fails, the BGP relationship is not established.
You may configure BGP authentication with the command #neighbor {IP address | peer group name} password {XXX}