The basic principles of OSPF authentication are as follows:
If authentication is configured on the interface, use the authentication on the interface. If null is configured on the interface, no authentication is performed on the interface.
If no authentication is performed on the interface (Null does not mean that no authentication is configured), the authentication configured on the area is used. If no authentication is configured on the area, either, no authentication will be performed.
Authentication commands in the area view:
authentication-mode simple [ plain plain-text | [ cipher ] cipher-text ]
authentication-mode { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-text | [ cipher ] cipher-text } ]
authentication-mode keychain keychain-nameAuthentication commands on a common OSPF interface:
ospf authentication-mode simple [ plain plain-text | [ cipher ] cipher-text ]
ospf authentication-mode { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-text | [ cipher ] cipher-text } ]
ospf authentication-mode null
ospf authentication-mode keychain keychain-name