× 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.



Just an off chance... Are the third party's you mention using ASCII whereas
you're using EBCDIC?

-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Carsten Flensburg
Sent: Thursday, July 21, 2005 3:23 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Encrypt with Qc3EncryptData Question.. Help requested

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


----- Original Message ----- 
From: "venkatreddy puram" <purumvenkat@xxxxxxxxxxx>
To: <RPG400-L@xxxxxxxxxxxx>
Sent: Thursday, July 21, 2005 1:02 AM
Subject: Encrypt with Qc3EncryptData Question.. Help requested


> Hello Everyone,
>                   Apologies for the lenghty email... Good afternoon, I am
> trying to encrypt data with RSA with public/private key provided by third
> party... I am using Qc3EncryptData and Qc3DecryptData APIs to do the
> encryption and decryption. The below code works fine for the for the
> public/private key created by cryptograhic service provider on the AS400
but
> not for the ones that are created by third party. I have all kinds of
> methods but no success... (I wonder why IBM makes it so difficult to use
> this APIs)...
>
> Just as note: My counterparts in Java world in the my company had same
issue
> with third party keys... They solved it by doing (In java ofcource)
>
> c = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
>
> Instead of
>
> c = Cipher.getInstance("RSA", "BC");



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.