Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

2

Found in

5.3.2f1

Issue ID

766839

Regression

No

RSACryptoServiceProvider poor performance in Unity compared with Visual Studio

Mono

-

Steps to reproduce:
1. Download and in Unity open project named "RSAPerformanceIssue".
2. Open scene named "test" and press Play button.
3. In console window should appear message: "Test starts...".
4. Wait for some time until you will see this message: "Test finished: 8570ms"
(numbers can be different)
5. Download project named "RSAPerformanceIssueVS" and in Visual Studio 2015 open script named "RSATest.cs".
6. In Visual Studio 2015 click Start button and notice message "Test starts..."
7. After some time message this appears: "Test finished: 197ms".
(numbers can be different)
Actual result:
Number is quite small in Visual Studio compared to the number in Unity's console window.

Expected result:
Unity in play mode should not by slowed down by "ExportCspBlob()" method of assymetric encryption algorithm (RSA) and work as fast as Visual Studio.

Reproduced on:
5.1.0f3, 5.2.4f1, 5.3.4f1, 5.4.0b11

The issue will be addressed as part of Mono Runtime upgrade effort.

Comments (1)

  1. bkesecker2

    Apr 11, 2021 16:54

    Could not locate RSAPerformanceIssue open project to check details, but I am experiencing this issue using Unity 2020.3.3f1. However, I was able to partially overcome the delay by setting the static field RSACryptoServiceProvider.UseMachineKeyStore to true and setting the related CspParameters.KeyContainerName to a constant value. The first time the code loads, the delay exists, but no delay for subsequent loads using the same KeyContainerName.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.