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

IDX10720: Unable to create KeyedHashAlgorithm for algorithm 'HS512' #26

Closed
CrushYar opened this issue Jul 26, 2023 · 4 comments
Closed

Comments

@CrushYar
Copy link

With Microsoft.IdentityModel.JsonWebTokens library version 6.32.0 and 6.31.0 , DuoUniversal produces following error:

IDX10720: Unable to create KeyedHashAlgorithm for algorithm 'HS512', the key size must be greater than: '512' bits, key has '320' bits.
Parameter name: keyBytes

<StackTrace> <Frame>at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.ValidateKeySize(Byte[] keyBytes, String algorithm, Int32 expectedNumberOfBytes)</Frame> <Frame>at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateKeyedHashAlgorithm(Byte[] keyBytes, String algorithm)/Frame> <Frame>at Microsoft.IdentityModel.Tokens.DisposableObjectPool1.Allocate()</Frame> <Frame>at Microsoft.IdentityModel.Tokens.SymmetricSignatureProvider.Sign(Byte[] input)</Frame> <Frame>at Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities.CreateEncodedSignature(String input, SigningCredentials signingCredentials)</Frame> <Frame>at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.CreateTokenPrivate(String payload, SigningCredentials signingCredentials, EncryptingCredentials encryptingCredentials, String compressionAlgorithm, IDictionary2 additionalHeaderClaims, IDictionary2 additionalInnerHeaderClaims, String tokenType)</Frame> <Frame>at Microsoft.IdentityModel.JsonWebTokens.JsonWebTokenHandler.CreateToken(String payload, SigningCredentials signingCredentials)</Frame> <Frame>at DuoUniversal.JwtUtils.CreateSignedJwt(String clientId, String clientSecret, String audience, IDictionary2 additionalClaims)</Frame> <Frame>at DuoUniversal.Client.&lt;DoHealthCheck&gt;d__35.MoveNext()</Frame> </StackTrace>

While with version 6.29.0 it works fine.

@AaronAtDuo
Copy link
Contributor

This looks to be #22 which was fixed by #23, but the fix hasn't been released yet.

@AaronAtDuo
Copy link
Contributor

I wanted to fix another issue before releasing, but it's taking longer than expected, and now that more people are hitting this error, I think it's best to release the fix. I should be able to get to that in a day or two.

@AaronAtDuo
Copy link
Contributor

@CrushYar The package has been updated on NuGet to version 1.2.1 which includes a fix for this, and the GitHub release will be done shortly. Thanks for using Duo!

@CrushYar
Copy link
Author

@CrushYar The package has been updated on NuGet to version 1.2.1 which includes a fix for this, and the GitHub release will be done shortly. Thanks for using Duo!

Thanks for quick fix!

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

No branches or pull requests

2 participants