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

Maybe add support for SHA2_512 in pubkey_authenticator.c ? #2012

Open
anyn99 opened this issue Nov 24, 2023 · 2 comments
Open

Maybe add support for SHA2_512 in pubkey_authenticator.c ? #2012

anyn99 opened this issue Nov 24, 2023 · 2 comments

Comments

@anyn99
Copy link

anyn99 commented Nov 24, 2023

Is your feature request related to a problem? Please describe.
When using strongswan with cisco servers, the authentication fails because cisco servers expect SHA2_512 as default.
Strongswan only has SHA1 as SHA authentication availiable.

Describe the solution you'd like
We just hacked/patched the source in /src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c (line 603 ff)
basically like this:

case AUTH_RSA:
			key_type = KEY_RSA;
-			params->scheme = SIGN_RSA_EMSA_PKCS1_SHA1;
+			params->scheme = SIGN_RSA_EMSA_PKCS1_SHA2_512;
			break;

Describe alternatives you've considered
None

Additional context
Maybe there is another configuration possibility to allow cisco device to work with strongswan, but we needed SHA authentication to work.

@tobiasbrunner
Copy link
Member

the authentication fails because cisco servers expect SHA2_512 as default.

I don't think that's the default. They might base their decision on some settings or other variables (e.g. PRF or the schemes used in the certificates).

The problem is that Cisco apparently still doesn't support RFC 7427, which adds proper support for signature schemes that aren't based on SHA-1.

@anyn99
Copy link
Author

anyn99 commented Nov 24, 2023

You are completly right of course, they should support RFC 7427. Cisco just doesn't care about being compatible, as always ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants