In most cases, it is easier to understand how NTP can be secured with the help of md5 by means of a configuration example. Please note that the use of md5 is no longer recommended from a security point of view.

A manageable number of NTP peers can be secured with md5. It is recommended to create a separate key for each peer. But beware, only 8 characters are possible.

! NTP authentication configuration
ntp authenticate
! enable NTP authentication
ntp authentication-key [key-id] md5 [hash]
! define a NTP authentication key
ntp trusted-key [key-id]
! mark a NTP authentication key as trusted
ntp peer [peer_address] key [key-id]
! form a authenticated session with a peer
ntp server [server_address] key [key-id]
! form a authenticated session with a server