summaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_cex2a.h
diff options
context:
space:
mode:
authorFelix Beck2011-01-05 12:47:45 +0100
committerMartin Schwidefsky2011-01-05 12:47:27 +0100
commit3e309a66f52e042881f76cbfb9b6c2aa70163e02 (patch)
tree50633ef9552e511be7ff113d6b2bc77f3f67d549 /drivers/s390/crypto/zcrypt_cex2a.h
parent[S390] zcrypt: Introduce check for 4096 bit support. (diff)
downloadkernel-qcow2-linux-3e309a66f52e042881f76cbfb9b6c2aa70163e02.tar.gz
kernel-qcow2-linux-3e309a66f52e042881f76cbfb9b6c2aa70163e02.tar.xz
kernel-qcow2-linux-3e309a66f52e042881f76cbfb9b6c2aa70163e02.zip
[S390] zcrypt: support for 4096 bit keys for cex3a
Definitions for CEX3 card types are changed to support 4096 bit RSA keys. Also new structs for the accelerator mode are needed. Additionaly when checking the length of key parts, the case for bigger (4096 bit) keys is needed. Signed-off-by: Felix Beck <felix.beck@de.ibm.com> Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_cex2a.h')
-rw-r--r--drivers/s390/crypto/zcrypt_cex2a.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_cex2a.h b/drivers/s390/crypto/zcrypt_cex2a.h
index 8f69d1dacab8..0350665810cf 100644
--- a/drivers/s390/crypto/zcrypt_cex2a.h
+++ b/drivers/s390/crypto/zcrypt_cex2a.h
@@ -51,8 +51,10 @@ struct type50_hdr {
#define TYPE50_MEB1_FMT 0x0001
#define TYPE50_MEB2_FMT 0x0002
+#define TYPE50_MEB3_FMT 0x0003
#define TYPE50_CRB1_FMT 0x0011
#define TYPE50_CRB2_FMT 0x0012
+#define TYPE50_CRB3_FMT 0x0013
/* Mod-Exp, with a small modulus */
struct type50_meb1_msg {
@@ -74,6 +76,16 @@ struct type50_meb2_msg {
unsigned char message[256];
} __attribute__((packed));
+/* Mod-Exp, with a larger modulus */
+struct type50_meb3_msg {
+ struct type50_hdr header;
+ unsigned short keyblock_type; /* 0x0003 */
+ unsigned char reserved[6];
+ unsigned char exponent[512];
+ unsigned char modulus[512];
+ unsigned char message[512];
+} __attribute__((packed));
+
/* CRT, with a small modulus */
struct type50_crb1_msg {
struct type50_hdr header;
@@ -100,6 +112,19 @@ struct type50_crb2_msg {
unsigned char message[256];
} __attribute__((packed));
+/* CRT, with a larger modulus */
+struct type50_crb3_msg {
+ struct type50_hdr header;
+ unsigned short keyblock_type; /* 0x0013 */
+ unsigned char reserved[6];
+ unsigned char p[256];
+ unsigned char q[256];
+ unsigned char dp[256];
+ unsigned char dq[256];
+ unsigned char u[256];
+ unsigned char message[512];
+} __attribute__((packed));
+
/**
* The type 80 response family is associated with a CEX2A card.
*