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



Rick,

You may want to try taking a look at the documentation for the CIPHER MI 
(http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/mi/CIPHER.htm -- you 
want the info for function id 0011). It goes into quite a bit of detail about 
what's required for each cipher. When I was working with AES, I also found it 
helpful to look at Scott Klement's RC4 example, look at C examples (I know 
enough C to be able to follow along for the most part), and to read up on the 
spec a little bit (these tend to be a little heady but generally have a high 
enough level summary that gives enough so you can follow along with what it's 
supposed to do).

Matt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Rick DuVall
Sent: Tuesday, March 22, 2005 2:17 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Qc3EncryptData and Qc3DecryptData Api Help


Hi Matt!

        Thanks for your reply!  It appears that my system does have Triple DES 
from
the list below.  The problem i have with AES is that my vb.net programmer
can't find anything on it but has triple-des ready to go.  I am still
hacking at it i have succeeded in getting a different error... <g>  Now I'm
getting         CPF9DDD0  which appears to mean 'Clear data format name not 
valid.'
but if that is what it means then DATAFORMATNAM = 'DATA0100'  is wrong?

        I confess to being a bit confused by the error messages because they 
don't
match exactly what is in the docs.  For instance,

CPF9DD0 E       Clear data format name not valid.

Is not the same as CPF9DDD0, ehich is what I got,  Nor is

CPF9DDD E       The key string length is not valid.????

So Is my Key String Length bad or is my format name?  -  <What Fun> <g>

Thanks again for your reply - If you think of anything let me know - Oh
yeah, My receiver var is 32767A for a 30 byte string.

Regards
Rick

DSPLY  1024-bit MAC - Message Authentication Code
DSPLY  0-bit MD5
DSPLY  0-bit SHA-1 - Secure Hash Algorithm
DSPLY  56-bit DES (one-way) - Data Encryption Standard
DSPLY  56-bit DES (two-way) - Data Encryption Standard
DSPLY  2048-bit RC4
DSPLY  1024-bit RC5
DSPLY  64-bit DESX
DSPLY  168-bit 3DES - Triple DES
DSPLY  2048-bit DSA - Digital Signature Algorithm
DSPLY  2048-bit RSA - Rivest/Shamir/Adleman
DSPLY  2048-bit Diffie-Hellman
DSPLY  1024-bit RC2
DSPLY  256-bit AES - Advanced Encryption Standard

[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Haas, Matt
Sent: Tuesday, March 22, 2005 12:29 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Qc3EncryptData and Qc3DecryptData Api Help


Rick,

That error message means that the cipher you're trying to use isn't
available (take a look at
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qc3enc
dt.htm for the error messages). If you go to
http://www.rpgiv.com/rpgivforum/view?SID=20041118023842270824, you'll find
an example of a program that lists out the available ciphers for your
system.

If you're willing to use AES, I posted code last year
(http://www.rpgiv.com/rpgivforum/view?SID=20041118023842270824 -- the key
length is wrong in the example, it should be 16 characters and use
KEYOPT_16BYTE for KeyOption). That example only does 32 bytes max but I can
post an example that does more if you're interested.

Also, you need to make sure that the receiver variable is big enough to hold
the results of the encryption since some ciphers add padding. For example,
AES always returns multiples of 32 bytes.

Matt


-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.