The U-Prove Crypto SDK V1.1 (C# Edition) implements the U-Prove Cryptographic Specification V1.1 Revision 5 [UPCS]. This SDK was developed by Microsoft to support experimentation with the foundational features of the U-Prove technology. It is made available under the Apache 2.0 open-source license, with patent rights granted under the Open Specification Promise.
For an overview of the U-Prove technology, see the technology overview. For more information about U-Prove, visit http://www.microsoft.com/u-prove.
- LICENSE: The license and patent grant under which this package is distributed
- docs: documentation and test vectors
- ThirdParty: Bouncy Castle library files
- UProveCrypto.sln: Visual Studio solution file
- UProveCrypto: SDK project
- UProveParams: Recommended parameters generation project (not included in solution by default)
- UProveSample: Sample project
- UProveTestVectors: Test vectors generation project (not included in solution by default)
- UProveUnitTest: Unit test project
- .NET SDK 6.0.x or 7.0.x https://dotnet.microsoft.com/en-us/download/dotnet/6.0
- C#
Open the solution file (UProveCrypto.sln) in Visual Studio 2022 and select Build Solution from the Build menu.
Open the project folder with VS Code. Select the Terminal menu; select Run Build Task... (Ctrl+Shift+b)_ to perform a build. For a Debug build, select the Terminal menu; select Run Task...; select build Debug from the command menu.
One a command line with dotnet (6.0.x+) available, run dotnet build
. You can specifiy the build config with the additional -c Debug
or -c Release
parameters.
Recommended parameters [UPRP] and test vectors [UPTV] used by the U-Prove SDK can be re-generated for validation purposes by loading and running the UProveParams and UProveTestVectors projects, respectively. The projects depend on the full BouncyCastle library, and are therefore not included in the UProveCrypto.sln file by default. BouncyCastle must be obtained from http://www.bouncycastle.org/csharp/, the compiled DLL must be placed under "ThirdParty\BouncyCastle\bc\BouncyCastle.dll", and the two projects must be added to the solution before compiling it.
In the Test menu of Visual Studio, select the Run All Tests (Ctrl+R,A). Note that a complete test run takes some time to complete.
Select the Terminal menu; select Run Task...; select test from the command menu.
One a command line with dotnet (6.0.x) available, run dotnet test -v n
.
Add the UProveCrypto assembly to the set of References for a project.
This code was formerly hosted on CodePlex (https://uprovecsharp.codeplex.com). The following changes have been made to the original code:
- The solution has been updated to Visual Studio 2022.
- The Bouncy Castle patch (https://uprovecsharp.codeplex.com/SourceControl/list/patches) has been applied, improving efficiency of math operations.
[UPCS] Christian Paquin, Greg Zaverucha. U-Prove Cryptographic Specification V1.1 Revision 5. Microsoft Corporation, March 2023. (link)
[UPTV] U-Prove Cryptographic Test Vectors V1.1 Revision 3 docs/testvectors
[UPRP] U-Prove Recommended Parameters Profile V1.1 Revision 3 (link)