All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Aurelien Jarno <aurelien@aurel32.net>, qemu-ppc@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-ppc: simplify AES emulation
Date: Mon, 03 Nov 2014 15:55:45 +0100	[thread overview]
Message-ID: <54579771.7000305@suse.de> (raw)
In-Reply-To: <1414427152-8715-1-git-send-email-aurelien@aurel32.net>



On 27.10.14 17:25, Aurelien Jarno wrote:
> This patch simplifies the AES code, by directly accessing the newly added
> S-Box, InvS-Box tables instead of recreating them by using the AES_Te and
> AES_Td tables.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Thanks, applied to ppc-next. It's great to see you back Aurelien!


Alex

PS: Please CC qemu-devel on patches, so that non-ppc interested people
have the chance to review as well ;).

> ---
>  target-ppc/int_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Note: This has been requested by Paolo Bonzini, but I have no way to
> test it, so it is only compile tested.
> 
> diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c
> index 713d777..e67a5ee 100644
> --- a/target-ppc/int_helper.c
> +++ b/target-ppc/int_helper.c
> @@ -2352,7 +2352,7 @@ void helper_vcipherlast(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
>      int i;
>  
>      VECTOR_FOR_INORDER_I(i, u8) {
> -        r->AVRB(i) = b->AVRB(i) ^ (AES_Te4[a->AVRB(AES_shifts[i])] & 0xFF);
> +        r->AVRB(i) = b->AVRB(i) ^ (AES_sbox[a->AVRB(AES_shifts[i])]);
>      }
>  }
>  
> @@ -2381,7 +2381,7 @@ void helper_vncipherlast(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
>      int i;
>  
>      VECTOR_FOR_INORDER_I(i, u8) {
> -        r->AVRB(i) = b->AVRB(i) ^ (AES_Td4[a->AVRB(AES_ishifts[i])] & 0xFF);
> +        r->AVRB(i) = b->AVRB(i) ^ (AES_isbox[a->AVRB(AES_ishifts[i])]);
>      }
>  }
>  
> 

           reply	other threads:[~2014-11-03 14:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1414427152-8715-1-git-send-email-aurelien@aurel32.net>]

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=54579771.7000305@suse.de \
    --to=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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.