Add DNC-based implementation, update tests and overrides #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main purpose of this PR is to add a second implementation of
CryptoInterface
based on the DockNetwork crypto (DNC) library, thus evaluating the ability of our abstraction to be supported over another library. It is mostly successful, in that almost all features can be supported by both the cryptography library for AnonCreds v2 (AC2C) and DNC (exceptions noted below).We also override some tests (more detail below) due to differences between the
CryptoInterface
s implemented over AC2C and DNC, respectively:Fail
for now. Although the tests would fail even if not overridden, overriding them saves testing time, and enables us to filter out expected test failures and provide tailored explanation about the reason for failure in test output.Skip
.n
ton+1
is now considered to include onlyn
. This caused DNC tests to fail because it refuses to create a range proof for such intervals. This highlights that our original abstraction is not sufficiently flexible to accommodate underlying cryptographic libraries that interpret ranges differently. We plan to address this in future work. In the meantime, the relevant test is overridden toSkip
.This PR also includes: