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 30// Cipher suites' ids are based on IANA's database: 31// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4 32// 33// If you add new cipher suite, make sure id is the same as in IANA's database (see link above) 34// 35// Keep in sync with 36// external/conscrypt/{android,platform}/src/main/java/org/conscrypt/Platform.java 37enum CipherSuite { 38 UNKNOWN_CIPHER_SUITE = 0x0000; 39 40 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A; 41 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014; 42 TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035; 43 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009; 44 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013; 45 TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F; 46 TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A; 47 48 // TLSv1.2 cipher suites 49 TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C; 50 TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D; 51 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F; 52 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030; 53 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B; 54 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C; 55 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9; 56 TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8; 57 58 // Pre-Shared Key (PSK) cipher suites 59 TLS_PSK_WITH_AES_128_CBC_SHA = 0x008C; 60 TLS_PSK_WITH_AES_256_CBC_SHA = 0x008D; 61 TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035; 62 TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036; 63 TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC; 64 65 // TLS 1.3 cipher suites 66 TLS_AES_128_GCM_SHA256 = 0x1301; 67 TLS_AES_256_GCM_SHA384 = 0x1302; 68 TLS_CHACHA20_POLY1305_SHA256 = 0x1303; 69} 70 71