AnsweredAssumed Answered

LTI Advantage 1.3 (POC) - Private key is not getting validated. Does any cryptography create any problem if its specific to some group, viz RSA or BSA etc. ?

Question asked by lbmankala on Jun 11, 2019
Latest reply on Jun 11, 2019 by Peter Love

LTI Advantage 1.3 (POC) - Private key is not getting validated. Does any cryptography create any problem if its specific to some group, viz RSA or BSA etc. ?

 

I dont know if its the right place to post this question here, please excuse me if its not!

I have been working on this POC for couple of weeks. We have developed a sample tool that takes private key as RSA private key as it can be generated on IMS global site.

 

However I am getting the following error while reading the private key using Bouncy Castle dll. Has anyone faced this issue? Or anybody has any insights on this?

 


Exception : System.InvalidCastException: Unable to cast object of type 'Org.BouncyCastle.Crypto.Parameters.RsaPrivateCrtKeyParameters' to type 'Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair'.
at AdvantageTool.Utility.PemHelper.SigningCredentialsFromPemString(String privateKey) in ..\src\Utility\PemHelper.cs:line 92
at AdvantageTool.Utility.PemHelper.SigningCredentialsFromPemString(String privateKey) in ..\src\Utility\PemHelper.cs:line 112
at AdvantageTool.Utility.AccessTokenService.GetAccessTokenAsync(String issuer, String scope) in ..\src\Utility\AccessTokenService.cs:line 67
at AdvantageTool.Pages.Components.LineItems.LineItemsViewComponent.InvokeAsync(String idToken) in ..\src\Pages\Components\LineItems\LineItemsViewComponent.cs:line 51
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsyncCore(ObjectMethodExecutor executor, ViewComponentContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, Object arguments)
at AdvantageTool.Pages.Pages_Tool.<ExecuteAsync>b__35_1() in ..\src\Pages\Tool.cshtml:line 189
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
at AdvantageTool.Pages.Pages_Tool.ExecuteAsync() in ..\src\Pages\Tool.cshtml:line 5
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)

 

Any help in this would be appreciated!

Outcomes