Home | History | Annotate | Download | only in keystore
      1 /*
      2  * Copyright (C) 2013 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 
     18 #ifndef KEYSTORE_DEFAULTS_H_
     19 #define KEYSTORE_DEFAULTS_H_
     20 
     21 /*
     22  * These must be kept in sync with
     23  * frameworks/base/keystore/java/android/security/KeyPairGeneratorSpec.java
     24  */
     25 
     26 /* DSA */
     27 #define DSA_DEFAULT_KEY_SIZE 1024
     28 #define DSA_MIN_KEY_SIZE 512
     29 #define DSA_MAX_KEY_SIZE 8192
     30 
     31 /* EC */
     32 #define EC_DEFAULT_KEY_SIZE 256
     33 #define EC_MIN_KEY_SIZE 192
     34 #define EC_MAX_KEY_SIZE 521
     35 
     36 /* RSA */
     37 #define RSA_DEFAULT_KEY_SIZE 2048
     38 #define RSA_DEFAULT_EXPONENT 0x10001
     39 #define RSA_MIN_KEY_SIZE 512
     40 #define RSA_MAX_KEY_SIZE 8192
     41 
     42 #endif /* KEYSTORE_DEFAULTS_H_ */
     43