[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>
This commit is contained in:
committed by
Heiko Carstens
parent
893f112866
commit
2f7c8bd6dc
@@ -100,6 +100,13 @@ struct ica_z90_status {
|
||||
#define ZCRYPT_CEX2C 5
|
||||
#define ZCRYPT_CEX2A 6
|
||||
|
||||
/**
|
||||
* Large random numbers are pulled in 4096 byte chunks from the crypto cards
|
||||
* and stored in a page. Be carefull when increasing this buffer due to size
|
||||
* limitations for AP requests.
|
||||
*/
|
||||
#define ZCRYPT_RNG_BUFFER_SIZE 4096
|
||||
|
||||
struct zcrypt_device;
|
||||
|
||||
struct zcrypt_ops {
|
||||
@@ -107,6 +114,7 @@ struct zcrypt_ops {
|
||||
long (*rsa_modexpo_crt)(struct zcrypt_device *,
|
||||
struct ica_rsa_modexpo_crt *);
|
||||
long (*send_cprb)(struct zcrypt_device *, struct ica_xcRB *);
|
||||
long (*rng)(struct zcrypt_device *, char *);
|
||||
};
|
||||
|
||||
struct zcrypt_device {
|
||||
|
Reference in New Issue
Block a user