From: Evgeniy Polyakov <zbr@ioremap.net>
To: Shasi Pulijala <spulijala@amcc.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: Updated Openssl Patch to support Linux CryptoAPI v3
Date: Tue, 2 Dec 2008 14:04:40 +0300 [thread overview]
Message-ID: <20081202110440.GA5496@ioremap.net> (raw)
In-Reply-To: <DB599F406D04E34389140B7D99C71B1B068407A2@SDCEXCHANGE01.ad.amcc.com>
On Mon, Dec 01, 2008 at 04:28:49PM -0800, Shasi Pulijala (spulijala@amcc.com) wrote:
> This Openssl patch is the version 3 which incorporates some changes suggested by the Linux Crypto Maintainer. Openssl still needs to be patched with OCF first to use the linux cryptodev interface. The major changes in this patch include:
>
> 1) Addition of a header file that defines the crypto and hash algorithm/modes as a bitmap.
> 2) The structures session_op and crypt_op need to be included from the linux kernel headers.
There are other problems mentioned prviously which were not included
here: http://marc.info/?l=linux-crypto-vger&m=122727693310351&w=2
> /* NB: deprecated */
> +#ifndef CRYPTODEV_LINUX
> struct session_op {
> u_int32_t cipher; /* ie. CRYPTO_DES_CBC */
> u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */
> @@ -187,8 +189,9 @@
> int mackeylen; /* mac key */
> caddr_t mackey;
If this strcuture is shared between kernelspace and userspace things are
very broken: pointer types may have different sizes in kernel and
userspace.
> - u_int32_t ses; /* returns: session # */
> + u_int32_t ses; /* returns: session # */
> };
> +#endif
>
> struct session2_op {
> u_int32_t cipher; /* ie. CRYPTO_DES_CBC */
> @@ -199,11 +202,12 @@
> int mackeylen; /* mac key */
> caddr_t mackey;
The same.
> - u_int32_t ses; /* returns: session # */
> + u_int32_t ses; /* returns: session # */
> int crid; /* driver id + flags (rw) */
> int pad[4]; /* for future expansion */
> };
>
> +#ifndef CRYPTODEV_LINUX
> struct crypt_op {
> u_int32_t ses;
> u_int16_t op; /* i.e. COP_ENCRYPT */
> @@ -217,7 +221,7 @@
> caddr_t mac; /* must be big enough for chosen MAC */
> caddr_t iv;
The same.
Please provide full patch next time, it is hard to tell if there are
other problem places without looking at the code.
--
Evgeniy Polyakov
prev parent reply other threads:[~2008-12-02 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-02 0:28 Updated Openssl Patch to support Linux CryptoAPI v3 Shasi Pulijala
2008-12-02 11:04 ` Evgeniy Polyakov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081202110440.GA5496@ioremap.net \
--to=zbr@ioremap.net \
--cc=linux-crypto@vger.kernel.org \
--cc=spulijala@amcc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.