1/* 2 * Copyright (C) 2020 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 */ 16syntax = "proto2"; 17package android.stats.tls; 18 19// Keep in sync with 20// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java 21enum Protocol { 22 UNKNOWN_PROTO = 0; 23 SSL_V3 = 1; 24 TLS_V1 = 2; 25 TLS_V1_1 = 3; 26 TLS_V1_2 = 4; 27 TLS_V1_3 = 5; 28 29 // Handshake failure. 30 TLS_PROTO_FAILED = 0xFFFF; 31} 32 33// Cipher suites' ids are based on IANA's database: 34// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4 35// 36// If you add new cipher suite, make sure id is the same as in IANA's database (see link above) 37// 38// Keep in sync with 39// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java 40enum CipherSuite { 41 UNKNOWN_CIPHER_SUITE = 0x0000; 42 43 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A; 44 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014; 45 TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035; 46 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009; 47 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013; 48 TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F; 49 TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A; 50 51 // TLSv1.2 cipher suites 52 TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C; 53 TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D; 54 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F; 55 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030; 56 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B; 57 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C; 58 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9; 59 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8; 60 61 // Pre-Shared Key (PSK) cipher suites 62 TLS_PSK_WITH_AES_128_CBC_SHA = 0x008C; 63 TLS_PSK_WITH_AES_256_CBC_SHA = 0x008D; 64 TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035; 65 TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036; 66 TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC; 67 68 // TLS 1.3 cipher suites 69 TLS_AES_128_GCM_SHA256 = 0x1301; 70 TLS_AES_256_GCM_SHA384 = 0x1302; 71 TLS_CHACHA20_POLY1305_SHA256 = 0x1303; 72 73 // Handshake failure. 74 TLS_CIPHER_FAILED = 0XFFFF; 75} 76 77// Log source: Which flavour of Conscrypt is being used 78// 79// Keep in sync with 80// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java 81enum Source { 82 // Unknown - could be either GMS or Mainline. 83 SOURCE_UNKNOWN = 0; 84 85 // Conscrypt Mainline module. 86 SOURCE_MAINLINE = 1; 87 88 // GMS Conscrypt, as installed by the Play ProviderInstaller API. 89 SOURCE_GMS = 2; 90 91 // Conscrypt unbundled from the platform and included 92 // by app developer from Maven Central. 93 SOURCE_UNBUNDLED = 3; 94} 95