From: Zilvinas Valinskas <zilvinas@gemtek.lt>
To: James Morris <jmorris@redhat.com>
Cc: netdev@oss.sgi.com
Subject: Re: Crypto tests via tcrypt.o modules failes
Date: Fri, 17 Sep 2004 10:49:25 +0300 [thread overview]
Message-ID: <1095407364.4174.6.camel@swoop.gemtek.lt> (raw)
In-Reply-To: <Xine.LNX.4.44.0409161524190.4676-100000@thoron.boston.redhat.com>
On Thu, 2004-09-16 at 22:25, James Morris wrote:
> On Thu, 16 Sep 2004, Zilvinas Valinskas wrote:
>
> > Details are here,http://www.gemtek.lt/~zilvinas/crypto/tcrypt-tests
>
> AES is failing, but it has proven to be endian safe on other
> architectures.
>
>
> Where does the 'fig' come from in:
>
> <4>decrypt: fig
that's my printk ... here goes diff :
--- aes.c (revision 1164)
+++ aes.c (working copy)
@@ -344,11 +344,22 @@
u32 b0[4], b1[4];
const u32 *kp = E_KEY + 4;
+ int i;
+
+ printk("encrypt: fig\n");
+
+ printk("encrypting block: ");
+ for (i=0; i<16; i++)
+ printk("%02X ", in[i]);
+ printk("\n");
+
b0[0] = u32_in (in) ^ E_KEY[0];
b0[1] = u32_in (in + 4) ^ E_KEY[1];
b0[2] = u32_in (in + 8) ^ E_KEY[2];
b0[3] = u32_in (in + 12) ^ E_KEY[3];
+
if (ctx->key_length > 24) {
f_nround (b1, b0, kp);
f_nround (b0, b1, kp);
@@ -397,12 +408,17 @@
u32 b0[4], b1[4];
const int key_len = ctx->key_length;
const u32 *kp = D_KEY + key_len + 20;
+ int i;
+ printk("decrypt: fig\n");
+
b0[0] = u32_in (in) ^ E_KEY[key_len + 24];
b0[1] = u32_in (in + 4) ^ E_KEY[key_len + 25];
b0[2] = u32_in (in + 8) ^ E_KEY[key_len + 26];
b0[3] = u32_in (in + 12) ^ E_KEY[key_len + 27];
+
if (key_len > 24) {
i_nround (b1, b0, kp);
i_nround (b0, b1, kp);
@@ -428,6 +444,11 @@
u32_out (out + 4, b0[1]);
u32_out (out + 8, b0[2]);
u32_out (out + 12, b0[3]);
+
+ printk("decrypted block: ");
+ for (i=0; i<16; i++)
+ printk("%02X ", out[i]);
+ printk("\n");
I've tried to check/make sure - when two boards Xscale <-> Xscale
encrypts and decrypts data the same. Although it matches - content
print exactly the same - ping gets no echo-reply ... :( No clue where
to start looking.
>
> Can you try a completely unpatched kernel?
>
>
> - James
next prev parent reply other threads:[~2004-09-17 7:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-16 18:11 Crypto tests via tcrypt.o modules failes Zilvinas Valinskas
2004-09-16 19:25 ` James Morris
2004-09-17 7:49 ` Zilvinas Valinskas [this message]
2004-09-16 19:29 ` James Morris
2004-09-17 7:43 ` Zilvinas Valinskas
2004-09-17 7:56 ` Zilvinas Valinskas
2004-09-17 14:58 ` James Morris
2004-09-17 15:21 ` Zilvinas Valinskas
2004-09-17 16:09 ` James Morris
2004-09-28 9:37 ` Zilvinas Valinskas
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=1095407364.4174.6.camel@swoop.gemtek.lt \
--to=zilvinas@gemtek.lt \
--cc=jmorris@redhat.com \
--cc=netdev@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).