× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Carsten Flensburg <flensburg@...> writes:

> 
> Hello Venkat,
> 
> As Vengoal mentions you need to verify that your cipher key has the exact
> same binary value as your counterpart is using in the decryption process. -
> But apart from that: You're specifying a PKA block format of '0' -- PKCS #1
> block type 00.
> 
> Is that block type verified with your third party counterpart? - Here's an
> excerpt from the manual regarding the PKA block format:
> 
> PKA block format
> The public key algorithm block format. Following are the valid values. 0
> PKCS #1 block type 00
>       1 PKCS #1 block type 01
>       2 PKCS #1 block type 02
>       This format is recommended when encrypting non-hash items (such as
> keys). The other formats are normally used in sign and verify functions.
>       4 Zero pad
>       The clear data is placed in the low-order bit positions of a string of
> the same bit-length as the key modulus. All leading bits are set to zero.
> 
> - Given the relatively few alternatives, you could also simply run a series
> of tests specifying the PKA block formats one after the other and see if
> that makes any difference.
> 
> Best regards,
> Carsten Flensburg
> 


Thank You Carsten !!!! I get the base64 value of public/private key from the 
third party and unbase64 that one and use it in my example... May be it is not 
the same binary value as third party uses... Like you mentioned I have used 
all types PKA block formats... 
     The third party uses "RSA/ECB/PKCS1Padding" to instantiate their cipher 
object in their java code... I do not know how to co relate this one to PKA 
block format... 
       Before I forget....Thank You  !!! Thank You !!! for the source code 
that you provided today thru Iseries Tips today...

Here is base64 version of the test public/private key....

-----BEGIN RSA PUBLIC KEY-----

MIGJAoGBAOrbfN6Alxf6ntrHbUKuDqd27k/Z27/XDl/o2npSt95RDXx2nGleeXKP
8mDcX2pevR0qQOHDLKLMQM5f+3MGUXltQCJXEMR1PMccT8PuesfcfmYyhlDW1Tg9
ZTHzzgyCxzMxjDesFdsWDib83IkOyRw/MlK3y+KJDhv2kP8kKCZNAgMBAAE=

-----END RSA PUBLIC KEY-----

-----BEGIN RSA PRIVATE KEY-----

MIICXQIBAAKBgQDq23zegJcX+p7ax21Crg6ndu5P2du/1w5f6Np6UrfeUQ18dpxp
Xnlyj/Jg3F9qXr0dKkDhwyyizEDOX/tzBlF5bUAiVxDEdTzHHE/D7nrH3H5mMoZQ
1tU4PWUx884MgsczMYw3rBXbFg4m/NyJDskcPzJSt8viiQ4b9pD/JCgmTQIDAQAB
AoGBAKRYxa/aYmE4UxOb/Jxtuvl7Y1bjiEBd2MRK6SAyZFKhe4N+aQPfRbNigeVA
MVD5TPNszwxtDP47WppQVmBuqnGsUWBnQeH6/F7JaOw3NQgUg/ANjoESQPWFJl/E
KfY7Ds2XeroEcbHb8Zbsxd1TtcObJVSCS3qMyxYGUGHhmvUtAkEA9jxTRGpoacVz
KQdeb2JRgO+iu6C4witTjY2IEGr+9sOWO7S8NijD9SkcQe6cavQab3Nb3Ig/p0vC
VKE8pPKNZwJBAPQrp8V8sYvbkoEgDR7Dnl3yWx2i3i6QeUgIcijGFR26ij30dMLd
mS6S6dapkMtylmsUOK1NJ5J03y6E47/cqisCQAZ9GnigETZQVLONFSj8P0eViQVG
u/ep6p69TwuXtjZMeyYBokAPHPLV7X+zSP3shtHPCWmrUXoYHfva790s4xsCQGlf
qbDNxmWgJdK5/U+IhoDuxam9jvszeFPA6Vt1WMmSpnRkWjt6nM//sRDl7soOMqIV
gPwxbuGCtIqD6TH0zi8CQQCQ++hfXiIdwRJAYxSHSlhw2n+i5VnOp5O06JEsZ0hx
eNTG5G62d7q0EddBfNIGUxMx+FbcI+EJUeB9Nlb38lPN

-----END RSA PRIVATE KEY-----





 



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.