borja
New User
Joined: 11 Mar 2008 Posts: 2 Location: spain
|
|
|
|
Hello!
I need to generate a 1152 bits length RSA 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.
Any help will be highly appreciated |
|
borja
New User
Joined: 11 Mar 2008 Posts: 2 Location: spain
|
|
|
|
Hello Dick,
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:procedure
arg x
if datatype(x)=='NUM' then y=right(x2c(d2x(x)),4,'0'x)
else y=-1
return y
decimal:procedure
arg x
return x2d(c2x(x))
Thank you very much for your help...
Borja
|
|