[Ocf-linux-users] minor issues to be fixed in OCF openssl interface
Brought to you by:
david-m
From: V Jyothi-B. <B2...@fr...> - 2010-03-19 12:47:25
|
Hi, I am trying to use OCF openssl interface with openssl1.0beta versions for DH operations. This framework is very much useful to make use of HW acceleration through openssl. There are two minor issues we found in cryptodev_dh_compute_key() function definition: 1) keylen assignment to crypt_kop structure: keylen is computed using BN_num_bits() which returns the key size in number of bits. While assigning keylen to kop.crk_param[3].crp_nbits is again multiplied by 8, which not required: kop.crk_param[3].crp_nbits = keylen * 8; keylen variable already containing the length of key in bits, so this statement should be like: kop.crk_param[3].crp_nbits = keylen; /* keylen is containing the number of bits, so we should not again multiply with 8 */ 2) In case of "ioctl(fd, CIOCKEY, &kop)" returning success, 'dhret' value is not filled but the return value is expected by the caller as the length of key in bytes: "dhret = (keylen+7)/8;" statement may be required after ioctl condition. if (ioctl(fd, CIOCKEY, &kop) == -1) { const DH_METHOD *meth = DH_OpenSSL(); dhret = (meth->compute_key)(key, pub_key, dh); } else dhret = (keylen+7)/8; I hope these issues get fixed in the next version. Thanks Jyothi -----Original Message----- From: ocf...@li... [mailto:ocf...@li...] Sent: Friday, March 19, 2010 5:50 PM To: V Jyothi-B22245 Subject: confirm 1ef0c65cf0f2a60548df99b6c2c94792e0eb3850 Mailing list subscription confirmation notice for mailing list Ocf-linux-users We have received a request from 172.29.29.1 for subscription of your email address, "jyo...@fr...", to the ocf...@li... mailing list. To confirm that you want to be added to this mailing list, simply reply to this message, keeping the Subject: header intact. Or visit this web page: https://lists.sourceforge.net/lists/confirm/ocf-linux-users/1ef0c65cf0f2 a60548df99b6c2c94792e0eb3850 Or include the following line -- and only the following line -- in a message to ocf...@li...: confirm 1ef0c65cf0f2a60548df99b6c2c94792e0eb3850 Note that simply sending a `reply' to this message should work from most mail readers, since that usually leaves the Subject: line in the right form (additional "Re:" text in the Subject: is okay). If you do not wish to be subscribed to this list, please simply disregard this message. If you think you are being maliciously subscribed to the list, or have any other questions, send them to ocf...@li.... |