blob: 001e697bd804db6f84d260cc17d16f82828c77e8 [file] [log] [blame]
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
syntax = "proto2";
package android_backup_crypto;
option java_package = "com.android.server.backup.encryption.protos";
option java_outer_classname = "KeyValueListingProto";
// An entry of a key-value pair.
message KeyValueEntry {
// Plaintext key of the key-value pair.
optional string key = 1;
// SHA-256 MAC of the plaintext of the chunk containing the pair
optional bytes hash = 2;
}
// Describes the key/value pairs currently in the backup blob, mapping from the
// plaintext key to the hash of the chunk containing the pair.
//
// This is local state stored on the device. It is never sent to the
// backup server. See ChunkOrdering for how the device restores the
// key-value pairs in the correct order.
message KeyValueListing {
repeated KeyValueEntry entries = 1;
}