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



Sounds like a CCSID/code page issue. Are you translating ASCII to
EBCDIC? The Java end is probably running ASCII. You may be decrypting
using an effectively different key due to translation.

Loyd Goodbar
Senior programmer/analyst
BorgWarner
TS Water Valley
662-473-5713
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Feddersen
Sent: Friday, September 21, 2007 10:03
To: midrange-l@xxxxxxxxxxxx
Subject: AES Decryption

I am working on decrypting data from a new version of our POS software.
The data is encrypted using AES, 256 bit, ECB, PKCS5 padding. Upon
closing they zip a series of files that we retrieve with our iSeries. I
then unzip these files, parse the data and use the Qc3DecryptData api to
decrypt credit card numbers. I am unable to decrypt the data, I receive
a CPF9DC3 in the error code. We both use the same 32 byte key string to
create the keys. I am able to use the Qc3EncryptData and Qc3DecryptData
apis on my iseries to encrypt and decrypt a string with the key I
create. I supplied the key string and the encrypted data to a java
developer on our team and he was able to decrypt the data with an
application he uses. The encrypted string I generate with my key is
different from the encrypted string created by the POS software. Some of
my parameters are as follows:

Decryption
QC3D0200
QC3BCA = 22; AES
QC3BL = 32; Block Length
QC3MODE = '0'; ECB
QC3PO = '1'; Remove Padding

The key was created in a Key Store with the Qc3WriteKeyRecord.
KEYSTRING =
x'E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF';
KEYSTRINGLEN = 32;
KEYFORMAT = '0'; Binary String
KEYTYPE = 22; AES
DISALLOWFUNC=0; No Disallowed functions
KEYFORM ='0'; Clear

Thanks in advance!

Scott Feddersen
Buckle, Inc.



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.