1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.federatedcompute.services.data;
18 
19 public final class FederatedComputeEncryptionKeyContract {
20     public static final String ENCRYPTION_KEY_TABLE = "encryption_keys";
21 
FederatedComputeEncryptionKeyContract()22     private FederatedComputeEncryptionKeyContract() {}
23 
24     public static final class FederatedComputeEncryptionColumns {
FederatedComputeEncryptionColumns()25         private FederatedComputeEncryptionColumns() {}
26 
27         /**
28          * A unique identifier of the key, in thd form of UUID. FCP server uses key_identifier to
29          * get private key.
30          */
31         public static final String KEY_IDENTIFIER = "key_identifier";
32 
33         /** The public key base64 encoded. */
34         public static final String PUBLIC_KEY = "public_key";
35 
36         /**
37          * The type of the key in @link {com.android.federatedcompute.services.data.fbs.KeyType}
38          * Currently only encryption key is allowed.
39          */
40         public static final String KEY_TYPE = "key_type";
41 
42         /** Creation instant of the key in the database in milliseconds. */
43         public static final String CREATION_TIME = "creation_time";
44 
45         /** Expiry time of the key in milliseconds. */
46         public static final String EXPIRY_TIME = "expiry_time";
47     }
48 }
49