IBM Crypto Education Community

IBM Crypto Education Community

IBM Crypto Education Community

Join the IBM Crypto Education community to explore and understand IBM cryptography technology. This community is operated and maintained by the IBM Crypto Development team.

 View Only
  • 1.  Generating Operational RSA Public Key

    Posted 02/09/18 01:17 PM

    Hi Group,

     

    I have an application that needs to verify a digital signature using an RSA public key. The portion of the application that generates the signature provides the modulus (N) and public exponent (E) so I'm trying to use PKA Key Token Build (CSNDPKB) with the RSA-PUBL option to build an operational public key token that can be used in Digital Signature Verify (CSNDDSV). I'm a little confused by the ICSF manual as to which values need to be concatenated to build the key structure. Here's a REXX snippet of the code that build key structure.....however with a 512 byte modulus the structure length is 521 bytes which exceeds the limit for RSA-PUBL option. Any thoughts on how to build the key structure with a 512 byte modulus?

    Keystruct      =  d2c(mod_len_in_bits,2), 
                   || d2c(mod_len_in_bytes,2),
                   || d2c(exp_len_in_bytes,2),
                   || '0000'x,                
                   || decoded_modulus,        
                   || decoded_exponent        

     

    Thanks,

    Larry

    Larry Shaw


  • 2.  Re: Generating Operational RSA Public Key

    Posted 02/12/18 04:50 PM

    Hi Larry,

    Apparently I missed the notification for this question. I'll post a general sample showing the kvs and share a link here for others.

    Eysha Shirrine


  • 3.  Re: Generating Operational RSA Public Key

    Posted 02/13/18 01:12 PM

    Here's a link to a Rexx sample showing how to import a 4096-bit RSA public key... https://www.ibm.com/developerworks/community/blogs/79c1eec4-00c4-48ef-ae2b-01bd8448dd6c/entry/Rexx_Sample_Import_a_4096_bit_RSA_Public_Key

    Eysha Shirrine