-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Mac algorithm DESEDE ANSI X9.19 #77
Comments
@mehrdad2000 |
@tilln Yes, Sorry it’s typo, I mean DESEDE. |
@mehrdad2000 |
@tilln Thanks, try these but neither generate hash that match with ANSI X9.19: • DES9797Alg3 https://stackoverflow.com/questions/39187598/java-c-implementation-of-ansi-x9-19-retail-mac |
@mehrdad2000 |
@tilln |
16 bytes or 16 hex digits?
If you could share your Java code and your JMeter script then I may be able to debug why they produce different results? |
Please also confirm what JMeter and plugin versions you are using. |
@tilln mac key length are 32 hex, jmeter-5.6.2, jmeter-iso8583-1.3 |
@tilln here is the java calculator that i use:
|
Thanks, @mehrdad2000. Can you just confirm one thing quickly for me, then perhaps I won't need to see your script: If so, I suspect you may be using random or dynamically changing values in some message field e.g. via the |
@tilln Try 5.5 and not generate correct mac. |
@mehrdad2000 I have tried running code similar to your snippet above but I get the same value as with this plugin. I have attached a sample script: issue77.jmx
The sample script also demonstrates how you can use your calculation result instead of the Crypto PreProcessor's result. |
@tilln Thanks but still not match: expected result that calculated by calculator: 6d3b4c1ef5af47b0, current result of jmeter with jrs223 that you mentioned: 02237F5FAF64E63E calculator + jmx file with sample message here: mysample.zip |
The packed message bytes in your JMeter script and Python script don't match if I use the jPOS packager iso93ascii.xml: DE12 is 12 vs 6 digits. Also, between your Java and Python code, which one is the reference implementation with the correct results? Is the server you are testing accepting the manually calculated MAC value if you add that to the message? Have you ruled out a packager related error, where the fields are packed in a different way by the script than they are unpacked by the server and therefore they result in different MAC values? |
@tilln 2-both do the same thing, and generate same result, I just rewrite it in python so you can run it in bash without any dependency. java code is a part of larger code that has UI. so, python code is reference code. 3-yes but code of this server that calculate mac has legacy code. but it except same mac as python calculator created for message sample i put in python code. Any idea? |
@mehrdad2000 |
@tilln Thanks, do i still need to use JRS223 script that exist in issue77.jmx or it should work with "ISO8583 Crypto PreProcessor"? |
@mehrdad2000 It should now work with the "ISO8583 Crypto PreProcessor" and your |
@tilln Thank you so much, work like charm! :) |
Thanks for reporting this. |
Hi
need to use mac algorithm DESEDE ANSI X9.19 in jmeter-iso8583
Any idea?
Thanks
The text was updated successfully, but these errors were encountered: