Closed fyziktom closed 2 years ago
I did some progress yesterday. I have created branch 104 for it.
The first part of the update was the implementation of new system o the signatures of messages and its verification. The new version of this feature in NBitcoin works with CompactSignatures. Here is the example.
The second part was use of BouncyCastle library for implementing AES encryption in the SymetricProvider. It is not the best option and also implementation. It does not use salt, hash of pass, etc. We need to update it complexly with some expert for the security. Thats why we keep it simple now. When we will do it we need to migrate the stored pass in VENFT App Blazor for all users. Now it works as before, without any improvements.
Based on the research I found that the BouncyCastle has trouble with BigInteger in WASM. So it is "working" in this case, but not good solution. I hope it will be solved in .NET 7.0 soon. I think it worth to wait for it. Here is also description about future updates in .NET 7.0.
Third part was use of the different kind of encryption on SubAccounts. It uses now the AES same as main pass. The migration is automatic if you already have some SubAccounts in Blazor app.
Then I was able to move VENFT App Blazor to .NET 6.0 and VEDriversLite to .NET Core 3.1. The difference in speed is amazing :)
Now I will clean some mess which is not necessary in the .NET 6.0 app and update all other Blazor Apps.
It means you can test Hot Reload now. It needs Visual Studio 2022. You can publish the changes during run of the App :) We can also explore the components libraries such as Blazorise.
I fixed the encoding of the hash in the Security Utils.
It works now same as before. I have published new version of VENFT App to test and beta. After some test also to the main domain.
We should update NBitcoin library. This will bring new version which should be able to run on .NET 6.0. We need to remove System.Security.Cryptography in the SymetricProvider and SecurityUtils and replace it with BouncyCastle which is used in NBitcoin also.
The NBitcoin changed signature of messages and its verification. It must be updated to keep the functions. These functions are wrapped so it will not affect the use of VEDriversLite as before.
Based on NBitcoin repo I expect we will need to migrate project at least to .NET Core 3.1. I will try to update it to .NET 6.0 and test it in Blazor WebAssembly also.