Hello,

I am trying to write a C program for wrapping & unwrapping 128-bit key using
AES implementation available in freebl library. I could find aeskeywrap.c
rijndael.c and rijndael.h in security/nss/lib/freebl, but not able to find
exactly which sequence I need to invoke these routines, which all the header
files to include and which libraries to link with. I just tried the
following steps, but does give a list of errors.

/***********************/
#include <stdio.h>
#include "blapi.h"
int main()
{
        const unsigned char KEK[] = "000102030405060708090A0B0C0D0E0F";
        const unsigned char iv[] = "A6A6A6A6A6A6A6A6";
        AESKeyWrapContext *con = NULL;
        con = AESKeyWrap_CreateContext(KEK, iv, 1, 16)
        return 0;
}
/*********************/

Can somebody please help ? Thanks in advance.

Regards
Mehul


_______________________________________________
mozilla-crypto mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-crypto

Reply via email to