Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to generate a 1152 length RSA Key.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: How to generate a 1152 length RSA Key.
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

Site Director


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

PostPosted: Tue Mar 18, 2008 7:18 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us