diff options
author | Ralph Wuerthner <rwuerthn@de.ibm.com> | 2008-04-17 01:46:15 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-17 01:47:02 -0400 |
commit | 2f7c8bd6dc6540aa3275c0ad9f657401985c00e9 (patch) | |
tree | 12cb12d661424d332ad960113c8849b3579e7e6a /drivers/s390/crypto/zcrypt_api.h | |
parent | 893f11286644780fc7d6d415e537644da7bdaaf8 (diff) |
[S390] zcrypt: add support for large random numbers
This patch allows user space applications to access large amounts of
truly random data. The random data source is the build-in hardware
random number generator on the CEX2C cards.
Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.h')
-rw-r--r-- | drivers/s390/crypto/zcrypt_api.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.h b/drivers/s390/crypto/zcrypt_api.h index de4877ee618f..0e948528a73a 100644 --- a/drivers/s390/crypto/zcrypt_api.h +++ b/drivers/s390/crypto/zcrypt_api.h | |||
@@ -100,6 +100,13 @@ struct ica_z90_status { | |||
100 | #define ZCRYPT_CEX2C 5 | 100 | #define ZCRYPT_CEX2C 5 |
101 | #define ZCRYPT_CEX2A 6 | 101 | #define ZCRYPT_CEX2A 6 |
102 | 102 | ||
103 | /** | ||
104 | * Large random numbers are pulled in 4096 byte chunks from the crypto cards | ||
105 | * and stored in a page. Be carefull when increasing this buffer due to size | ||
106 | * limitations for AP requests. | ||
107 | */ | ||
108 | #define ZCRYPT_RNG_BUFFER_SIZE 4096 | ||
109 | |||
103 | struct zcrypt_device; | 110 | struct zcrypt_device; |
104 | 111 | ||
105 | struct zcrypt_ops { | 112 | struct zcrypt_ops { |
@@ -107,6 +114,7 @@ struct zcrypt_ops { | |||
107 | long (*rsa_modexpo_crt)(struct zcrypt_device *, | 114 | long (*rsa_modexpo_crt)(struct zcrypt_device *, |
108 | struct ica_rsa_modexpo_crt *); | 115 | struct ica_rsa_modexpo_crt *); |
109 | long (*send_cprb)(struct zcrypt_device *, struct ica_xcRB *); | 116 | long (*send_cprb)(struct zcrypt_device *, struct ica_xcRB *); |
117 | long (*rng)(struct zcrypt_device *, char *); | ||
110 | }; | 118 | }; |
111 | 119 | ||
112 | struct zcrypt_device { | 120 | struct zcrypt_device { |