|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
How to generate a 1152 RSA length key
Hello!
I need to generate a 1152 bits length RSA in a Z/OS system key but i don't know how to do it. I've tried to generate it using the TKE but it only allows to generate a length key up to 1024 bits. It i try to generate a 1152 it returns an error. Is it possible to do it through TKE?? I've tried another method: I am calling CSNDPKG service which is an ICSF callable service from a rexx program to generate the key But I am getting return code 8 with reason code 11000 which is 'The value specified for length parameter for a key token, key, or text field is not valid.' I am not sure about the values to be given. I generate the token with this rexx. It ends wit rc=0 return_code='FFFFFFFF'x reason_code='FFFFFFFF'x exit_data_length='00000000'x exit_data='00000000'x rule_array_count=int(1) rule_array=left('RSA-CRT',8,' ') key_value_structure='04800000000000000000000000000000'x||, '0000'x key_value_structure_length=int(length(key_value_structure)) private_key_name=left('RSA.BORJA.PRIVATE',64) private_key_name_length=int(length(private_key_name)) reserved_1_length=int(0) reserved_2_length=reserved_1_length reserved_3_length=reserved_1_length reserved_4_length=reserved_1_length reserved_5_length=reserved_1_length reserved_1='' reserved_2='' reserved_3='' reserved_4='' reserved_5='' key_token=copies('FF'x,2500) key_token_length=int(length(key_token)) say length(key_token) parm='return_code reason_code exit_data_length exit_data '||, 'rule_array_count rule_array '||, 'key_value_structure_length key_value_structure '||, 'private_key_name_length private_key_name '||, 'reserved_1_length reserved_1 reserved_2_length reserved_2 '||, 'reserved_3_length reserved_3 reserved_4_length reserved_4 '||, 'reserved_5_length reserved_5 key_token_length key_token' address linkpgm CSNDPKB parm say 'CSNDPKB' say 'return_code='c2x(return_code) say 'reason_code='c2x(reason_code) but when i try to generate the key with this rexx, i get a rc=8 and i don't know whats wrong return_code='FFFFFFFF'x reason_code='FFFFFFFF'x exit_data_length='00000000'x exit_data='00000000'x rule_array_count=int(1) rule_array=left('MASTER',8,' ') regeneration_data='ESTA ES LA TIPICA PASSPHRASE' regeneration_data_length=int(length(regeneration_data)) skeleton_key_identifier_length= key_token_length skeleton_key_identifier= key_token transport_key_identifier=copies('0'x,64) generated_key_token_length= int(length(key_token)) generated_key_token= 'RSA.BORJA.CLAVE' parm='return_code reason_code exit_data_length exit_data '||, 'rule_array_count rule_array regeneration_data_length '||, 'regeneration_data skeleton_key_indentifier_length '||, 'skeleton_key_identifier transport_key_identifier '||, 'generated_key_token_length generated_key_token' address linkpgm CSNDPKG parm say 'CSNDPKG' say 'return_code='c2x(return_code) say 'reason_code='c2x(reason_code) SAY C2X(generated_key_token_length) exit int rocedurearg x if datatype(x)=='NUM' then y=right(x2c(d2x(x)),4,'0'x) else y=-1 return y decimal rocedurearg x return x2d(c2x(x)) Thank you very much for your help... Borja |
|
#2
|
||||
|
||||
|
I'm missing something.
Why not generate the key on some system and transfer the file? For example, use OpenSSL, generate it, and export it to any format you like. Usually folks use PKCS #1 and #12, which require ASN.1 format, but OpenSSL handles all that ugly stuff. You may want to use some other format, especially if you want to read it on a more limited system, as ASN.1 can be painful. Is it really required that you generate the keys on the Z/OS |
![]() |
| Viewing: Dev Shed Forums > System Administration > Security and Cryptography > How to generate a 1152 RSA length key |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|