Thread (1 message) 1 message, 1 author, 2011-11-12

Re: [PATCH v1] crypto: driver for tegra AES hardware

From: Varun Wadekar <hidden>
Date: 2011-11-12 10:22:32
Also in: linux-tegra

quoted
+	/* assign new context to device */
+	ctx->dd = dd;
+	dd->ctx = ctx;
+
+	if (ctx->flags & FLAGS_NEW_KEY) {
+		/* copy the key */
+		memset(dd->ivkey_base, 0, AES_HW_KEY_TABLE_LENGTH_BYTES);
+		memcpy(dd->ivkey_base, ctx->key, ctx->keylen);
these really should be writes to mutually exclusive addresses.
Why?
quoted
+	/* copy the key to the key slot */
+	memset(dd->ivkey_base, 0, AES_HW_KEY_TABLE_LENGTH_BYTES);
+	memcpy(dd->ivkey_base, seed + DEFAULT_RNG_BLK_SZ, AES_KEYSIZE_128);
should be to mutually exclusive addresses
Why?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help