Key Transparency provides a lookup service for generic records and a public,
tamper-proof audit log of all record changes. While being publicly auditable,
individual records are only revealed in response to queries for specific IDs.
Key Transparency can be used as a public key discovery service to authenticate
users and provides a mechanism to keep the service accountable.
Key Transparency empowers account owners to reliably see what public keys have been
associated with their account, and it can be used by senders to see how long an
account has been active and stable before trusting it.
GO111MODULE=on go get github.com/google/keytransparency/cmd/keytransparency-client
Client operations
View a Directory’s Public Keys
The Key Transparency server publishes a separate set of public keys for each directory that it hosts.
By hosting multiple directories, a single domain can host directories for multiple apps or customers.
A standardized pattern for discovering domains and directories is a TODO in issue #389.
Within a directory the server uses the following public keys to sign its responses:
log.public_key signs the top-most Merkle tree root, covering the ordered list of map roots.
map.public_key signs each snapshot of the key-value database in the form of a sparse Merkle tree.
vrf.der signs outputs of the Verifiable Random Function
which obscures the key values in the key-value database.
A directory’s public keys can be retrieved over HTTPS/JSON with curl
or over gRPC with grpcurl.
The sandboxserver has been initialized with a domain named default.
Every update to a user record in key transparency must be signed by an authorized-key.
Update signatures are saved in the Merkle tree data structure, producing a record of who made each change to a user’s
account, allowing products to distinguish between changes signed by a user key, the provider’s key, or a reset-provider’s key.
Each account has an updatable policy that lists the current set of authorized public keys that are allowed to make updates to the user’s record.
To create an initial set of update signing keys, run the authorized-keys create-keyset command.
Keys will be saved in a .keyset file in the current working directory.
Any number of protocols may be used to prove to the server that a client owns a userID.
The sandbox server supports a fake authentication string and OAuth.
Create or fetch the public key for your specific application.
openssl genpkey -algorithm X25519 -out xkey.pem
openssl pkey -in xkey.pem -pubout
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VuAyEAtCAsIMDyVUUooA5yhgRefcEr7edVOmyNCUaN1LCYl3s=
-----END PUBLIC KEY-----
keytransparency-client post user@domain.com \
--kt-url sandbox.keytransparency.dev:443 \
--fake-auth-userid user@domain.com \
--password=${PASSWORD} \
--verbose \
--logtostderr \
--data='MCowBQYDK2VuAyEAtCAsIMDyVUUooA5yhgRefcEr7edVOmyNCUaN1LCYl3s=' #Your public key in base64
Get and verify a public key
keytransparency-client get <email> --kt-url sandbox.keytransparency.dev:443 --verbose
✓ Commitment verified.
✓ VRF verified.
✓ Sparse tree proof verified.
✓ Signed Map Head signature verified.
CT ✓ STH signature verified.
CT ✓ Consistency proof verified.
CT New trusted STH: 2016-09-12 15:31:19.547 -0700 PDT
CT ✓ SCT signature verified. Saving SCT for future inclusion proof verification.
✓ Signed Map Head CT inclusion proof verified.
keys:<key:"app1" value:"test" >
Verify key history
keytransparency-client history user@domain.com --kt-url sandbox.keytransparency.dev:443
Revision |Timestamp |Profile
4 |Mon Sep 12 22:23:54 UTC 2016 |keys:<key:"app1" value:"test" >
Docker Engine 1.17.6+ docker version -f '{{.Server.APIVersion}}'
Docker Compose 1.11.0+ docker-compose --version
Deploy the KeyTransparency service
Run the deployment script
# Download the latest version of keytransparency
git clone https://github.com/google/keytransparency.git
cd keytransparency
# Run the deployment script for local environment
./scripts/deploy_local.sh deploy
Key Transparency
Key Transparency provides a lookup service for generic records and a public, tamper-proof audit log of all record changes. While being publicly auditable, individual records are only revealed in response to queries for specific IDs.
Key Transparency can be used as a public key discovery service to authenticate users and provides a mechanism to keep the service accountable.
Key Transparency empowers account owners to reliably see what public keys have been associated with their account, and it can be used by senders to see how long an account has been active and stable before trusting it.
Key Transparency can add verifiable and user-friendly auditing to any scenario that involves authenticating users with public keys, including Universal Second Factor Security Keys and end-to-end encryption.
Project Status
Key Transparency is a work-in-progress with the following milestones under development.
Key Transparency Client
Setup
GO111MODULE=on go get github.com/google/keytransparency/cmd/keytransparency-clientClient operations
View a Directory’s Public Keys
The Key Transparency server publishes a separate set of public keys for each directory that it hosts. By hosting multiple directories, a single domain can host directories for multiple apps or customers. A standardized pattern for discovering domains and directories is a TODO in issue #389.
Within a directory the server uses the following public keys to sign its responses:
log.public_keysigns the top-most Merkle tree root, covering the ordered list of map roots.map.public_keysigns each snapshot of the key-value database in the form of a sparse Merkle tree.vrf.dersigns outputs of the Verifiable Random Function which obscures the key values in the key-value database.A directory’s public keys can be retrieved over HTTPS/JSON with curl or over gRPC with grpcurl. The sandboxserver has been initialized with a domain named
default.Show output
Generate Update Signing Keys
Every update to a user record in key transparency must be signed by an
authorized-key.Update signatures are saved in the Merkle tree data structure, producing a record of who made each change to a user’s account, allowing products to distinguish between changes signed by a user key, the provider’s key, or a reset-provider’s key.
Each account has an updatable policy that lists the current set of authorized public keys that are allowed to make updates to the user’s record.
To create an initial set of update signing keys, run the
authorized-keys create-keysetcommand. Keys will be saved in a.keysetfile in the current working directory.Show output
Publish the public key
Any number of protocols may be used to prove to the server that a client owns a userID. The sandbox server supports a fake authentication string and OAuth.
Create or fetch the public key for your specific application.
Get and verify a public key
Verify key history
Checks
Running the server locally with Docker Compose
Prerequisites
docker version -f '{{.Server.APIVersion}}'docker-compose --versionDeploy the KeyTransparency service
Run the deployment script
Check Docker’s running containers
You should see 8 new running containers:
Watch it Run
Terminate the KeyTransparency service
The script will remove all the containers and their networks.
Development and Testing
Key Transparency and its Trillian backend use a MySQL database, which must be setup in order for the Key Transparency tests to work.
docker-compose up -d dbwill launch the database in the background.Directory structure
The directory structure of Key Transparency is as follows:
Support
Acknowledgements
Key Transparency would not have been possible without a whole host of collaborators including researchers, interns, and open source contributors.
Key Transparency was inspired by CONIKS and Certificate Transparency.
Related