summaryrefslogtreecommitdiff
path: root/ondevice-signing/KeyConstants.h
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2021-02-04 13:18:29 +0100
committerMartijn Coenen <maco@google.com>2021-03-08 16:31:53 +0100
commitba1c9dc8a432050e13e8bbd90b51cad1cd982752 (patch)
tree51a2cbd300d206f1b69e3a07424f98dd35037c5b /ondevice-signing/KeyConstants.h
parent5588e4958bfda09dcbe4b441af262ebbbd48b1af (diff)
downloadsecurity-ba1c9dc8a432050e13e8bbd90b51cad1cd982752.tar.gz
On-device signing: Support keystore2 for keys.
Add code to support Keystore2. Keystore2 will offer a feature similar to EARLY_BOOT_KEYS in Keymaster 4.1, but it will also be hardware-enforced in older Keymaster versions. For now, have the code support both paths, and stick with Keymaster 4.1 until Keystore2 is merged. Bug: 165630556 Test: Local Change-Id: If62837bf6fb1398bd30ce9422cbf3082a5cbf1e2
Diffstat (limited to 'ondevice-signing/KeyConstants.h')
-rw-r--r--ondevice-signing/KeyConstants.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ondevice-signing/KeyConstants.h b/ondevice-signing/KeyConstants.h
new file mode 100644
index 00000000..9e1a5137
--- /dev/null
+++ b/ondevice-signing/KeyConstants.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2020 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.
+ */
+
+static constexpr int kRsaKeySize = 2048;
+static constexpr int kRsaKeyExponent = 65537;