All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzvi Chumash <tzvi@research.att.com>
To: linux-crypto@vger.kernel.org
Subject: Re: blowfish from openSSL to kernel cryptoAPI
Date: Tue, 03 May 2011 11:46:35 -0400	[thread overview]
Message-ID: <ipp84b$m6s$1@dough.gmane.org> (raw)
In-Reply-To: <4DC015AD.BA46DC3F@users.sourceforge.net>

Thanks for your response, Jari. I tried changing the byte ordering on 
the key,iv and the data(before and after decrypt) and the result is 
still wrong. Unless someone has another idea, I will have to change the 
user-space part to also encrypt in-kernel instead of using openSSL...

I was assuming that given the same parameters (e.g. encryption 
algorithm, CBC, key, iv), the cipher data would be equivalent between 
different implementations (in this case openSSL/cryptoapi). Was that a 
wrong assumption?

Thanks again,

Tzvi


On 5/3/2011 10:48 AM, Jari Ruusu wrote:
> Tzvi Chumash wrote:
>> I'm trying (without much success) to decrypt in-kernel
>> (2.6.18-194.el5PAE) a cipher that was created using openSSL
>> (0.9.8e-fips-rhel5) using blowfish with a 56-byte key/8-byte iv. Are the
>> implementations incompatible (i.e. can't encrypt in one and decrypt in
>> the other?) or am I doing something wrong?
>
> Check byte order of the two implementations. Many blowfish implementations
> got byte order wrong. Does it help if you swap byte order from
> 0-1-2-3-4-5-6-7 to 7-6-5-4-3-2-1-0 of key/data/IV before and after crypto
> operation?
>

  reply	other threads:[~2011-05-03 15:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02 22:34 blowfish from openSSL to kernel cryptoAPI Tzvi Chumash
2011-05-03 14:48 ` Jari Ruusu
2011-05-03 15:46   ` Tzvi Chumash [this message]
2011-05-03 16:19     ` Emanuele Cesena
2011-05-03 17:37       ` Tzvi Chumash
2011-05-04 22:45         ` Herbert Xu

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='ipp84b$m6s$1@dough.gmane.org' \
    --to=tzvi@research.att.com \
    --cc=linux-crypto@vger.kernel.org \
    /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.