Hi @Rahul Gollapalli ,
According to my research ,please try to rebuild the Secure Store Service Application and generate a new master key.
You can refer to the similar issue in this document: https://social.technet.microsoft.com/wiki/contents/articles/52430.sharepoint-2016-exception-of-type-microsoft-office-securestoreservice-server-keymanagement-invalidmasterkeyexception-was-thrown.aspx
More information for reference: Configure the Secure Store Service in SharePoint Server
Hope it can help you. Thanks for your understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.