-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance improvements and new sample apps.
This PR introduces two sample apps - `preconsent-mdl` and `age-verifier-mdl` - to help with pinpointing performance issues with the libraries. This helped identify two problems making both the reader and the holder feel sluggish. - Calling `BouncyCastle()` is extremely expensive and we were doing this in a number of utility functions, including `Util.coseKeyDecode()`. This is fixed by using variants that pass `BouncyCastle.PROVIDER_NAME` instead. This also requires fixing up apps and test cases to manually register BouncyCastle at startup. - Determining the EC curve for a `PublicKey` is very expensive and also potentially fragile. Instead, modify the whole library stack to pass the curve along the public key. This is possible because we always know the curve, either if we created the key ourselves or if we received it from the reader or issuer (through COSE_Key). There's still room for optimization but these two fixes already help a lot and the two new samples makes it easier to identify and fix other bottlenecks. Other changes: - Use version catalogs in identity and identity-android. - Introduce DataTransportUdp as a super-low-latency data transfer method. The goal of this is to be able to pinpoint bottlenecks in non-data-transfer related code. For example, prior to the performance fixes mentioned above, it would occasionally take almost 1000ms to process DeviceEngagement and send encrypted DeviceRequest. - Remove reportConnectionMethodReady() as it's not needed for any of the data transfer methods in ISO 18013-5. For our two proprietary data transfer methods (DataTransportTcp and DataTransportUdp), just have `connect()` block on a call to the kernel to get a port number assigned. - Have `Credential.findAuthenticationKey()` also take the domain. This was really just an oversight when we added started tying authentication keys to domains. - Add `onHandoverSelectMessageSent()` callback to `NfcEngagementHelper`. This gives the mdoc application an opportunity to signal to the user that it's now safe to remove the device from the NFC field, for example by vibration. Fixes Issue #387. Test: Manually tested and all unit tests pass. Signed-off-by: David Zeuthen <[email protected]>
- Loading branch information
Showing
124 changed files
with
4,344 additions
and
632 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.