Sample C routine: Generating a MAC
To illustrate the practical application of CCA verb calls, this topic describes one of the sample C programming language routine included with the CCA Cryptographic Coprocessor Support Program.
There are also sample programs on the product web site. One of the sample programs can help you understand the performance of the CCA implementation.
That sample routine generates a message authentication code (MAC) on a text string and then
verifies the MAC. To generate and verify the MAC, the routine:
- Calls the Key_Generate (CSNBKGN) verb to create a MAC and MACVER key pair.
- Calls the MAC_Generate (CSNBMGN) verb to generate a MAC on a text string with the MAC key.
- Calls the MAC_Verify (CSNBMVR) verb to verify the text string MAC with the MACVER key.
Verb | Entry-point name |
---|---|
Key_Generate | CSNBKGN |
MAC_Generate | CSNBMGN |
MAC_Verify | CSNBMVR |