Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing GCM troubles at HP-UX/IA64 #100

Closed
wants to merge 1 commit into from
Closed

fixing GCM troubles at HP-UX/IA64 #100

wants to merge 1 commit into from

Conversation

karel-m
Copy link
Member

@karel-m karel-m commented Jan 11, 2016

I have experienced GCM failures on:

  • HP-UX 11.31 / 64bit
  • CPU: Itanium 2 / IA64
  • Compiler: HP C/aC++ B3910B A.06.26 [Apr 12 2011]

It compiled fine but GCM gives wrong results. Interesting is that all other test vectors (for hashes, ciphers, macs, rsa, dsa, ecc ..) passed, just GCM was failing.

After some experimenting I have come to the enclosed patch. I admit that it seems a bit unbelievable that this might be the cause of the failure. But according my empirical observations this change fixed it.

@sjaeckel
Copy link
Member

wouldn't it make sense to leave x and y unsigned and only make z an unsigned char?
I think in the direction of compilers always truncating the counter variables to 8bit where it wouldn't be required.
can you test that please?

@karel-m
Copy link
Member Author

karel-m commented Jan 22, 2016

This:

   unsigned x, y;
   unsigned char z;

fails as well.

Unfortunately I do not have permanent access to a HP-UX/IA64 machine, so experimenting is a bit complicated.

@sjaeckel
Copy link
Member

Alright, no worries, then we'll leave it like that

@sjaeckel sjaeckel closed this in 3184c6d Jan 23, 2016
@sjaeckel sjaeckel modified the milestone: v2.0.0 Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants