-
Josh Nohle authored
The private and public certificates store encrypted user and device metadata. Private certificates are for the local device and are only stored locally. Public certificates are uploaded to the Nearby Share server and distributed to user's whitelisted contacts. Certificates are used to authenticate a channel between the local device and a remote device before the actual payload is exchanged. These classes handle all of the crypto operations surrounding certificates: * Private cert: signing a token * Private cert: encrypting the metadata key before advertising it * Private cert: encrypting the device metadata * Private cert: converting to a public certificate * Private cert: managing the set of consumed salts * Public cert: verifying a signed token * Public cert: decrypting an advertised metadata key * Public cert: decrypting its metadata See http://go/nearby-chrome-cert for more details. The test vectors from that document are used in the unit tests here, as well as in the GmsCore implementation, to ensure cross-platform consistency. Fixed: b/154862766 Change-Id: Ifd24decf4e896667797add3c292c69ebd312f232 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2157285 Commit-Queue: Josh Nohle <nohle@chromium.org> Reviewed-by:
David Benjamin <davidben@chromium.org> Reviewed-by:
Alex Chau <alexchau@chromium.org> Reviewed-by:
James Vecore <vecore@google.com> Cr-Commit-Position: refs/heads/master@{#782118}
8f9edb1a