Hi all,
I'm trying to integrate a new cipher (aes-ccm) into the crypto lib. I want to have the new algorithm available from every application linking the library but we have not found where we have to add the cipher definition to have it listed among the available ones.
Kentlinux was very kind and told me to take a look at this files:


crypto/evp/evp.h
crypto/evp/evp_locl.h
crypto/evp/c_allc.c
crypto/evp/e_aes.c - as an example
crytpo/objects/obj_dat.num
crypto/objects/objects.txt
crypto/aes/* - as an example
crypto/evp/Makefile.ssl
apps/progs.pl
Makefile.org
config
crypto/Makefile.ssl


I don't need to have "cbc, ofc, ecb, ..." so I added in /crypto/evp/evp_locl.h this lines:
#define BLOCK_CIPHER_func_ccm(cname, cprefix, kstruct, ksched)
#define BLOCK_CIPHER_def_ccm(cname, kstruct, nid, block_size, key_len, iv_len, flags,init_key, cleanup, set_asn1, get_asn1, ctrl)


and I use them from the file /crypto/evp/e-aes.c in this way:
BLOCK_CIPHER_func_ccm(aes_ccm, AES, EVP_AES_KEY, ks)
BLOCK_CIPHER_def_ccm(aes_ccm, EVP_AES_KEY, NID_aes_ccm, 16, 16,16/*lung_nonce*/, 0,aes_init_key, NULL, EVP_CIPHER_set_asn1_iv,EVP_CIPHER_get_asn1_iv,NULL)


in the file /crypto/evp/c_allc.c, in the function OpenSSL_add_all_ciphers I added this lines
...
EVP_add_cipher(EVP_aes_ccm());
#if 0
EVP_add_cipher(EVP_aes_ccm());
#endif
EVP_add_cipher_alias(SN_aes_ccm,"AESCCM");
EVP_add_cipher_alias(SN_aes_ccm,"aesccm");
...


and now, if I edit from the shell the command "make" it compiles a few seconds and answers this lines:

../libcrypto.a(c_allc.o): In function `OpenSSL_add_all_ciphers':
c_allc.o(.text+0x39d): undefined reference to `EVP_aes_ccm'
collect2: ld returned 1 exit status
make[1]: *** [openssl] Error 1
make[1]: Leaving directory `/home/paolo/openssl/apps'
make: *** [sub_all] Error 1

Is there anyone who can help me to overcome this error and address me how to continue my integration of this new cipher (which files to modify, ecc)

Tanks so much
Have a nice day

Paolo SERRA


______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]

Reply via email to