linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/crypto/nx: saves chaining value from co-processor
@ 2013-08-02 20:58 Fionnuala Gunter
  2013-08-02 21:09 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Fionnuala Gunter @ 2013-08-02 20:58 UTC (permalink / raw)
  To: linuxppc-dev

The chaining value from co-processor was not being saved. This value is
needed because it is used as the IV, for example by cts i.e.
cts(cbc(aes)).

Signed-off-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
---
 drivers/crypto/nx/nx-aes-cbc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/nx/nx-aes-cbc.c
b/drivers/crypto/nx/nx-aes-cbc.c
index 35d483f..a2f99a9 100644
--- a/drivers/crypto/nx/nx-aes-cbc.c
+++ b/drivers/crypto/nx/nx-aes-cbc.c
@@ -95,6 +95,7 @@ static int cbc_aes_nx_crypt(struct blkcipher_desc
*desc,
        if (rc)
                goto out;

+       memcpy(desc->info, csbcpb->cpb.aes_cbc.cv, AES_BLOCK_SIZE);
        atomic_inc(&(nx_ctx->stats->aes_ops));
        atomic64_add(csbcpb->csb.processed_byte_count,
                     &(nx_ctx->stats->aes_bytes));
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-05  2:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 20:58 [PATCH] drivers/crypto/nx: saves chaining value from co-processor Fionnuala Gunter
2013-08-02 21:09 ` Benjamin Herrenschmidt
2013-08-02 21:55   ` Fionnuala Gunter
2013-08-02 21:59     ` Benjamin Herrenschmidt
2013-08-02 22:16       ` Fionnuala Gunter
2013-08-05  2:21         ` Michael Ellerman

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).