IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to generate a 1152 length RSA Key.


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
borja

New User


Joined: 11 Mar 2008
Posts: 2
Location: spain

PostPosted: Wed Mar 12, 2008 9:28 pm
Reply with quote

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
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 18, 2008 7:18 am
Reply with quote

Hello,

You might try 2048.
Back to top
View user's profile Send private message
borja

New User


Joined: 11 Mar 2008
Posts: 2
Location: spain

PostPosted: Tue Mar 18, 2008 5:35 pm
Reply with quote

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
icon_redface.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top