109 KiB
SRS-008 ClickHouse AES Encryption Functions
Software Requirements Specification
Table of Contents
- 1 Revision History
- 2 Introduction
- 3 Terminology
- 4 Requirements
- 4.1 Generic
- 4.1.1 RQ.SRS008.AES.Functions
- 4.1.2 RQ.SRS008.AES.Functions.Compatability.MySQL
- 4.1.3 RQ.SRS008.AES.Functions.Compatability.Dictionaries
- 4.1.4 RQ.SRS008.AES.Functions.Compatability.Engine.Database.MySQL
- 4.1.5 RQ.SRS008.AES.Functions.Compatability.Engine.Table.MySQL
- 4.1.6 RQ.SRS008.AES.Functions.Compatability.TableFunction.MySQL
- 4.1.7 RQ.SRS008.AES.Functions.DifferentModes
- 4.1.8 RQ.SRS008.AES.Functions.DataFromMultipleSources
- 4.1.9 RQ.SRS008.AES.Functions.SuppressOutputOfSensitiveValues
- 4.1.10 RQ.SRS008.AES.Functions.InvalidParameters
- 4.1.11 RQ.SRS008.AES.Functions.MismatchedKey
- 4.1.12 RQ.SRS008.AES.Functions.Check.Performance
- 4.1.13 RQ.SRS008.AES.Function.Check.Performance.BestCase
- 4.1.14 RQ.SRS008.AES.Function.Check.Performance.WorstCase
- 4.1.15 RQ.SRS008.AES.Functions.Check.Compression
- 4.1.16 RQ.SRS008.AES.Functions.Check.Compression.LowCardinality
- 4.2 Specific
- 4.2.1 RQ.SRS008.AES.Encrypt.Function
- 4.2.2 RQ.SRS008.AES.Encrypt.Function.Syntax
- 4.2.3 RQ.SRS008.AES.Encrypt.Function.NIST.TestVectors
- 4.2.4 RQ.SRS008.AES.Encrypt.Function.Parameters.PlainText
- 4.2.5 RQ.SRS008.AES.Encrypt.Function.Parameters.Key
- 4.2.6 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode
- 4.2.7 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.ValuesFormat
- 4.2.8 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.Invalid
- 4.2.9 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-ECB
- 4.2.10 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-ECB
- 4.2.11 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-ECB
- 4.2.12 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CBC
- 4.2.13 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CBC
- 4.2.14 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CBC
- 4.2.15 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB1
- 4.2.16 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB1
- 4.2.17 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB1
- 4.2.18 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB8
- 4.2.19 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB8
- 4.2.20 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB8
- 4.2.21 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB128
- 4.2.22 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB128
- 4.2.23 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB128
- 4.2.24 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-OFB
- 4.2.25 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-OFB
- 4.2.26 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-OFB
- 4.2.27 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-GCM
- 4.2.28 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-GCM
- 4.2.29 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-GCM
- 4.2.30 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CTR
- 4.2.31 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CTR
- 4.2.32 RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CTR
- 4.2.33 RQ.SRS008.AES.Encrypt.Function.Parameters.InitializationVector
- 4.2.34 RQ.SRS008.AES.Encrypt.Function.Parameters.AdditionalAuthenticatedData
- 4.2.35 RQ.SRS008.AES.Encrypt.Function.Parameters.ReturnValue
- 4.2.36 RQ.SRS008.AES.Encrypt.Function.Key.Length.InvalidLengthError
- 4.2.37 RQ.SRS008.AES.Encrypt.Function.InitializationVector.Length.InvalidLengthError
- 4.2.38 RQ.SRS008.AES.Encrypt.Function.InitializationVector.NotValidForMode
- 4.2.39 RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.NotValidForMode
- 4.2.40 RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.Length
- 4.2.41 RQ.SRS008.AES.Encrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
- 4.2.42 RQ.SRS008.AES.Encrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
- 4.2.43 RQ.SRS008.AES.Encrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
- 4.2.44 RQ.SRS008.AES.Encrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
- 4.2.45 RQ.SRS008.AES.Encrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
- 4.2.46 RQ.SRS008.AES.Encrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
- 4.2.47 RQ.SRS008.AES.Encrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
- 4.2.48 RQ.SRS008.AES.Encrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
- 4.2.49 RQ.SRS008.AES.Encrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
- 4.2.50 RQ.SRS008.AES.Encrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
- 4.2.51 RQ.SRS008.AES.Encrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
- 4.2.52 RQ.SRS008.AES.Encrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
- 4.2.53 RQ.SRS008.AES.Encrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
- 4.2.54 RQ.SRS008.AES.Encrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
- 4.2.55 RQ.SRS008.AES.Encrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
- 4.2.56 RQ.SRS008.AES.Encrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
- 4.2.57 RQ.SRS008.AES.Encrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
- 4.2.58 RQ.SRS008.AES.Encrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
- 4.2.59 RQ.SRS008.AES.Encrypt.Function.AES-128-GCM.KeyAndInitializationVector.Length
- 4.2.60 RQ.SRS008.AES.Encrypt.Function.AES-192-GCM.KeyAndInitializationVector.Length
- 4.2.61 RQ.SRS008.AES.Encrypt.Function.AES-256-GCM.KeyAndInitializationVector.Length
- 4.2.62 RQ.SRS008.AES.Encrypt.Function.AES-128-CTR.KeyAndInitializationVector.Length
- 4.2.63 RQ.SRS008.AES.Encrypt.Function.AES-192-CTR.KeyAndInitializationVector.Length
- 4.2.64 RQ.SRS008.AES.Encrypt.Function.AES-256-CTR.KeyAndInitializationVector.Length
- 4.2.65 RQ.SRS008.AES.Decrypt.Function
- 4.2.66 RQ.SRS008.AES.Decrypt.Function.Syntax
- 4.2.67 RQ.SRS008.AES.Decrypt.Function.Parameters.CipherText
- 4.2.68 RQ.SRS008.AES.Decrypt.Function.Parameters.Key
- 4.2.69 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode
- 4.2.70 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.ValuesFormat
- 4.2.71 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.Invalid
- 4.2.72 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-ECB
- 4.2.73 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-ECB
- 4.2.74 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-ECB
- 4.2.75 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CBC
- 4.2.76 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CBC
- 4.2.77 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CBC
- 4.2.78 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB1
- 4.2.79 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB1
- 4.2.80 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB1
- 4.2.81 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB8
- 4.2.82 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB8
- 4.2.83 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB8
- 4.2.84 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB128
- 4.2.85 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB128
- 4.2.86 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB128
- 4.2.87 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-OFB
- 4.2.88 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-OFB
- 4.2.89 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-OFB
- 4.2.90 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-GCM
- 4.2.91 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-GCM
- 4.2.92 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-GCM
- 4.2.93 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CTR
- 4.2.94 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CTR
- 4.2.95 RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CTR
- 4.2.96 RQ.SRS008.AES.Decrypt.Function.Parameters.InitializationVector
- 4.2.97 RQ.SRS008.AES.Decrypt.Function.Parameters.AdditionalAuthenticatedData
- 4.2.98 RQ.SRS008.AES.Decrypt.Function.Parameters.ReturnValue
- 4.2.99 RQ.SRS008.AES.Decrypt.Function.Key.Length.InvalidLengthError
- 4.2.100 RQ.SRS008.AES.Decrypt.Function.InitializationVector.Length.InvalidLengthError
- 4.2.101 RQ.SRS008.AES.Decrypt.Function.InitializationVector.NotValidForMode
- 4.2.102 RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.NotValidForMode
- 4.2.103 RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.Length
- 4.2.104 RQ.SRS008.AES.Decrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
- 4.2.105 RQ.SRS008.AES.Decrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
- 4.2.106 RQ.SRS008.AES.Decrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
- 4.2.107 RQ.SRS008.AES.Decrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
- 4.2.108 RQ.SRS008.AES.Decrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
- 4.2.109 RQ.SRS008.AES.Decrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
- 4.2.110 RQ.SRS008.AES.Decrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
- 4.2.111 RQ.SRS008.AES.Decrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
- 4.2.112 RQ.SRS008.AES.Decrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
- 4.2.113 RQ.SRS008.AES.Decrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
- 4.2.114 RQ.SRS008.AES.Decrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
- 4.2.115 RQ.SRS008.AES.Decrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
- 4.2.116 RQ.SRS008.AES.Decrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
- 4.2.117 RQ.SRS008.AES.Decrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
- 4.2.118 RQ.SRS008.AES.Decrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
- 4.2.119 RQ.SRS008.AES.Decrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
- 4.2.120 RQ.SRS008.AES.Decrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
- 4.2.121 RQ.SRS008.AES.Decrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
- 4.2.122 RQ.SRS008.AES.Decrypt.Function.AES-128-GCM.KeyAndInitializationVector.Length
- 4.2.123 RQ.SRS008.AES.Decrypt.Function.AES-192-GCM.KeyAndInitializationVector.Length
- 4.2.124 RQ.SRS008.AES.Decrypt.Function.AES-256-GCM.KeyAndInitializationVector.Length
- 4.2.125 RQ.SRS008.AES.Decrypt.Function.AES-128-CTR.KeyAndInitializationVector.Length
- 4.2.126 RQ.SRS008.AES.Decrypt.Function.AES-192-CTR.KeyAndInitializationVector.Length
- 4.2.127 RQ.SRS008.AES.Decrypt.Function.AES-256-CTR.KeyAndInitializationVector.Length
- 4.3 MySQL Specific Functions
- 4.3.1 RQ.SRS008.AES.MySQL.Encrypt.Function
- 4.3.2 RQ.SRS008.AES.MySQL.Encrypt.Function.Syntax
- 4.3.3 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.PlainText
- 4.3.4 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Key
- 4.3.5 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode
- 4.3.6 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.ValuesFormat
- 4.3.7 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.Invalid
- 4.3.8 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-ECB
- 4.3.9 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-ECB
- 4.3.10 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-ECB
- 4.3.11 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CBC
- 4.3.12 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CBC
- 4.3.13 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CBC
- 4.3.14 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB1
- 4.3.15 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB1
- 4.3.16 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB1
- 4.3.17 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB8
- 4.3.18 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB8
- 4.3.19 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB8
- 4.3.20 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB128
- 4.3.21 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB128
- 4.3.22 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB128
- 4.3.23 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-OFB
- 4.3.24 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-OFB
- 4.3.25 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-OFB
- 4.3.26 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-GCM.Error
- 4.3.27 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-GCM.Error
- 4.3.28 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-GCM.Error
- 4.3.29 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CTR.Error
- 4.3.30 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CTR.Error
- 4.3.31 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CTR.Error
- 4.3.32 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.InitializationVector
- 4.3.33 RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.ReturnValue
- 4.3.34 RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooShortError
- 4.3.35 RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooLong
- 4.3.36 RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooShortError
- 4.3.37 RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooLong
- 4.3.38 RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.NotValidForMode
- 4.3.39 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
- 4.3.40 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
- 4.3.41 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
- 4.3.42 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
- 4.3.43 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
- 4.3.44 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
- 4.3.45 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
- 4.3.46 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
- 4.3.47 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
- 4.3.48 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
- 4.3.49 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
- 4.3.50 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
- 4.3.51 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
- 4.3.52 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
- 4.3.53 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
- 4.3.54 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
- 4.3.55 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
- 4.3.56 RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
- 4.3.57 RQ.SRS008.AES.MySQL.Decrypt.Function
- 4.3.58 RQ.SRS008.AES.MySQL.Decrypt.Function.Syntax
- 4.3.59 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.CipherText
- 4.3.60 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Key
- 4.3.61 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode
- 4.3.62 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.ValuesFormat
- 4.3.63 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.Invalid
- 4.3.64 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-ECB
- 4.3.65 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-ECB
- 4.3.66 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-ECB
- 4.3.67 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CBC
- 4.3.68 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CBC
- 4.3.69 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CBC
- 4.3.70 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB1
- 4.3.71 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB1
- 4.3.72 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB1
- 4.3.73 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB8
- 4.3.74 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB8
- 4.3.75 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB8
- 4.3.76 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB128
- 4.3.77 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB128
- 4.3.78 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB128
- 4.3.79 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-OFB
- 4.3.80 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-OFB
- 4.3.81 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-OFB
- 4.3.82 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-GCM.Error
- 4.3.83 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-GCM.Error
- 4.3.84 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-GCM.Error
- 4.3.85 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CTR.Error
- 4.3.86 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CTR.Error
- 4.3.87 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CTR.Error
- 4.3.88 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.InitializationVector
- 4.3.89 RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.ReturnValue
- 4.3.90 RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooShortError
- 4.3.91 RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooLong
- 4.3.92 RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooShortError
- 4.3.93 RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooLong
- 4.3.94 RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.NotValidForMode
- 4.3.95 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
- 4.3.96 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
- 4.3.97 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
- 4.3.98 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
- 4.3.99 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
- 4.3.100 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
- 4.3.101 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
- 4.3.102 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
- 4.3.103 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
- 4.3.104 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
- 4.3.105 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
- 4.3.106 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
- 4.3.107 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
- 4.3.108 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
- 4.3.109 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
- 4.3.110 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
- 4.3.111 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
- 4.3.112 RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
- 4.1 Generic
- 5 References
Revision History
This document is stored in an electronic form using Git source control management software hosted in a GitHub Repository. All the updates are tracked using the Revision History.
Introduction
Users need an ability to encrypt and decrypt column data with tenant specific keys. Use cases include protection of sensitive column values and GDPR right to forget policies. The implementation will support capabilities of the MySQL aes_encrypt and MySQL aes_decrypt functions which encrypt and decrypt values using the AES (Advanced Encryption Standard) algorithm. This functionality will enable encryption and decryption of data accessed on remote MySQL servers via MySQL Dictionary or MySQL Database Engine, MySQL Table Engine, or MySQL Table Function.
Terminology
- AES - Advanced Encryption Standard (AES)
Requirements
Generic
RQ.SRS008.AES.Functions
version: 1.0
ClickHouse SHALL support AES encryption functions to encrypt and decrypt data.
RQ.SRS008.AES.Functions.Compatability.MySQL
version: 1.0
ClickHouse SHALL support AES encryption functions compatible with MySQL 5.7.
RQ.SRS008.AES.Functions.Compatability.Dictionaries
version: 1.0
ClickHouse SHALL support encryption and decryption of data accessed on remote MySQL servers using MySQL Dictionary.
RQ.SRS008.AES.Functions.Compatability.Engine.Database.MySQL
version: 1.0
ClickHouse SHALL support encryption and decryption of data accessed using MySQL Database Engine,
RQ.SRS008.AES.Functions.Compatability.Engine.Table.MySQL
version: 1.0
ClickHouse SHALL support encryption and decryption of data accessed using MySQL Table Engine.
RQ.SRS008.AES.Functions.Compatability.TableFunction.MySQL
version: 1.0
ClickHouse SHALL support encryption and decryption of data accessed using MySQL Table Function.
RQ.SRS008.AES.Functions.DifferentModes
version: 1.0
ClickHouse SHALL allow different modes to be supported in a single SQL statement using explicit function parameters.
RQ.SRS008.AES.Functions.DataFromMultipleSources
version: 1.0
ClickHouse SHALL support handling encryption and decryption of data from multiple sources
in the SELECT
statement, including ClickHouse MergeTree table as well as MySQL Dictionary,
MySQL Database Engine, MySQL Table Engine, and MySQL Table Function
with possibly different encryption schemes.
RQ.SRS008.AES.Functions.SuppressOutputOfSensitiveValues
version: 1.0
ClickHouse SHALL suppress output of AES string
and key
parameters to the system log,
error log, and query_log
table to prevent leakage of sensitive values.
RQ.SRS008.AES.Functions.InvalidParameters
version: 1.0
ClickHouse SHALL return an error when parameters are invalid.
RQ.SRS008.AES.Functions.Mismatched.Key
version: 1.0
ClickHouse SHALL return garbage for mismatched keys.
RQ.SRS008.AES.Functions.Mismatched.IV
version: 1.0
ClickHouse SHALL return garbage for mismatched initialization vector for the modes that use it.
RQ.SRS008.AES.Functions.Mismatched.AAD
version: 1.0
ClickHouse SHALL return garbage for mismatched additional authentication data for the modes that use it.
RQ.SRS008.AES.Functions.Mismatched.Mode
version: 1.0
ClickHouse SHALL return an error or garbage for mismatched mode.
RQ.SRS008.AES.Functions.Check.Performance
version: 1.0
Performance of AES encryption functions SHALL be measured.
RQ.SRS008.AES.Function.Check.Performance.BestCase
version: 1.0
Performance of AES encryption functions SHALL be checked for the best case scenario where there is one key, one initialization vector, and one large stream of data.
RQ.SRS008.AES.Function.Check.Performance.WorstCase
version: 1.0
Performance of AES encryption functions SHALL be checked for the worst case
where there are N
keys, N
initialization vectors and N
very small streams of data.
RQ.SRS008.AES.Functions.Check.Compression
version: 1.0
Effect of AES encryption on column compression SHALL be measured.
RQ.SRS008.AES.Functions.Check.Compression.LowCardinality
version: 1.0
Effect of AES encryption on the compression of a column with LowCardinality data type SHALL be measured.
Specific
RQ.SRS008.AES.Encrypt.Function
version: 1.0
ClickHouse SHALL support aes_encrypt
function to encrypt data using AES.
RQ.SRS008.AES.Encrypt.Function.Syntax
version: 1.0
ClickHouse SHALL support the following syntax for the aes_encrypt
function
aes_encrypt(plaintext, key, mode, [iv, aad])
RQ.SRS008.AES.Encrypt.Function.NIST.TestVectors
version: 1.0
ClickHouse aes_encrypt
function output SHALL produce output that matches NIST test vectors.
RQ.SRS008.AES.Encrypt.Function.Parameters.PlainText
version: 1.0
ClickHouse SHALL support plaintext
accepting any data type as
the first parameter to the aes_encrypt
function that SHALL specify the data to be encrypted.
RQ.SRS008.AES.Encrypt.Function.Parameters.Key
version: 1.0
ClickHouse SHALL support key
with String
or FixedString
data types
as the second parameter to the aes_encrypt
function that SHALL specify the encryption key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode
version: 1.0
ClickHouse SHALL support mode
with String
or FixedString
data types as the third parameter
to the aes_encrypt
function that SHALL specify encryption key length and block encryption mode.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
ClickHouse SHALL support values of the form aes-[key length]-[mode]
for the mode
parameter
of the aes_encrypt
function where
the key_length
SHALL specifies the length of the key and SHALL accept
128
, 192
, or 256
as the values and the mode
SHALL specify the block encryption
mode and SHALL accept ECB, CBC, CFB1, CFB8, CFB128, or OFB as well as
CTR and GCM as the values. For example, aes-256-ofb
.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
ClickHouse SHALL return an error if the specified value for the mode
parameter of the aes_encrypt
function is not valid with the exception where such a mode is supported by the underlying
OpenSSL implementation.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-ECB
version: 1.0
ClickHouse SHALL support aes-128-ecb
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the ECB block mode encryption with a 128 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-ECB
version: 1.0
ClickHouse SHALL support aes-192-ecb
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the ECB block mode encryption with a 192 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-ECB
version: 1.0
ClickHouse SHALL support aes-256-ecb
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the ECB block mode encryption with a 256 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CBC
version: 1.0
ClickHouse SHALL support aes-128-cbc
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CBC block mode encryption with a 128 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CBC
version: 1.0
ClickHouse SHALL support aes-192-cbc
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CBC block mode encryption with a 192 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CBC
version: 1.0
ClickHouse SHALL support aes-256-cbc
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CBC block mode encryption with a 256 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB1
version: 1.0
ClickHouse SHALL support aes-128-cfb1
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 128 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB1
version: 1.0
ClickHouse SHALL support aes-192-cfb1
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 192 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB1
version: 1.0
ClickHouse SHALL support aes-256-cfb1
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 256 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB8
version: 1.0
ClickHouse SHALL support aes-128-cfb8
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 128 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB8
version: 1.0
ClickHouse SHALL support aes-192-cfb8
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 192 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB8
version: 1.0
ClickHouse SHALL support aes-256-cfb8
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 256 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB128
version: 1.0
ClickHouse SHALL support aes-128-cfb128
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 128 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB128
version: 1.0
ClickHouse SHALL support aes-192-cfb128
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 192 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB128
version: 1.0
ClickHouse SHALL support aes-256-cfb128
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 256 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-OFB
version: 1.0
ClickHouse SHALL support aes-128-ofb
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the OFB block mode encryption with a 128 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-OFB
version: 1.0
ClickHouse SHALL support aes-192-ofb
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the OFB block mode encryption with a 192 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-OFB
version: 1.0
ClickHouse SHALL support aes-256-ofb
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the OFB block mode encryption with a 256 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-GCM
version: 1.0
ClickHouse SHALL support aes-128-gcm
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the GCM block mode encryption with a 128 bit key.
An AEAD
16-byte tag is appended to the resulting ciphertext according to
the RFC5116.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-GCM
version: 1.0
ClickHouse SHALL support aes-192-gcm
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the GCM block mode encryption with a 192 bit key.
An AEAD
16-byte tag is appended to the resulting ciphertext according to
the RFC5116.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-GCM
version: 1.0
ClickHouse SHALL support aes-256-gcm
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the GCM block mode encryption with a 256 bit key.
An AEAD
16-byte tag is appended to the resulting ciphertext according to
the RFC5116.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-128-CTR
version: 1.0
ClickHouse SHALL support aes-128-ctr
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CTR block mode encryption with a 128 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-192-CTR
version: 1.0
ClickHouse SHALL support aes-192-ctr
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CTR block mode encryption with a 192 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.Mode.Value.AES-256-CTR
version: 1.0
ClickHouse SHALL support aes-256-ctr
as the value for the mode
parameter of the aes_encrypt
function
and AES algorithm SHALL use the CTR block mode encryption with a 256 bit key.
RQ.SRS008.AES.Encrypt.Function.Parameters.InitializationVector
version: 1.0
ClickHouse SHALL support iv
with String
or FixedString
data types as the optional fourth
parameter to the aes_encrypt
function that SHALL specify the initialization vector for block modes that require
it.
RQ.SRS008.AES.Encrypt.Function.Parameters.AdditionalAuthenticatedData
version: 1.0
ClickHouse SHALL support aad
with String
or FixedString
data types as the optional fifth
parameter to the aes_encrypt
function that SHALL specify the additional authenticated data
for block modes that require it.
RQ.SRS008.AES.Encrypt.Function.Parameters.ReturnValue
version: 1.0
ClickHouse SHALL return the encrypted value of the data
using String
data type as the result of aes_encrypt
function.
RQ.SRS008.AES.Encrypt.Function.Key.Length.InvalidLengthError
version: 1.0
ClickHouse SHALL return an error if the key
length is not exact for the aes_encrypt
function for a given block mode.
RQ.SRS008.AES.Encrypt.Function.InitializationVector.Length.InvalidLengthError
version: 1.0
ClickHouse SHALL return an error if the iv
length is specified and not of the exact size for the aes_encrypt
function for a given block mode.
RQ.SRS008.AES.Encrypt.Function.InitializationVector.NotValidForMode
version: 1.0
ClickHouse SHALL return an error if the iv
is specified for the aes_encrypt
function for a mode that does not need it.
RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.NotValidForMode
version: 1.0
ClickHouse SHALL return an error if the aad
is specified for the aes_encrypt
function for a mode that does not need it.
RQ.SRS008.AES.Encrypt.Function.AdditionalAuthenticationData.Length
version: 1.0
ClickHouse SHALL not limit the size of the aad
parameter passed to the aes_encrypt
function.
RQ.SRS008.AES.Encrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-ecb
and key
is not 16 bytes
or iv
or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-ecb
and key
is not 24 bytes
or iv
or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-ecb
and key
is not 32 bytes
or iv
or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-cbc
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-cbc
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-cbc
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-cfb1
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-cfb1
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-cfb1
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-cfb8
and key
is not 16 bytes
and if specified iv
is not 16 bytes.
RQ.SRS008.AES.Encrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-cfb8
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-cfb8
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-cfb128
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-cfb128
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-cfb128
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-ofb
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-ofb
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-ofb
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Encrypt.Function.AES-128-GCM.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-gcm
and key
is not 16 bytes
or iv
is not specified or is less than 8 bytes.
RQ.SRS008.AES.Encrypt.Function.AES-192-GCM.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-gcm
and key
is not 24 bytes
or iv
is not specified or is less than 8 bytes.
RQ.SRS008.AES.Encrypt.Function.AES-256-GCM.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-gcm
and key
is not 32 bytes
or iv
is not specified or is less than 8 bytes.
RQ.SRS008.AES.Encrypt.Function.AES-128-CTR.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-128-ctr
and key
is not 16 bytes
or if specified iv
is not 16 bytes.
RQ.SRS008.AES.Encrypt.Function.AES-192-CTR.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-192-ctr
and key
is not 24 bytes
or if specified iv
is not 16 bytes.
RQ.SRS008.AES.Encrypt.Function.AES-256-CTR.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt
function is set to aes-256-ctr
and key
is not 32 bytes
or if specified iv
is not 16 bytes.
RQ.SRS008.AES.Decrypt.Function
version: 1.0
ClickHouse SHALL support aes_decrypt
function to decrypt data using AES.
RQ.SRS008.AES.Decrypt.Function.Syntax
version: 1.0
ClickHouse SHALL support the following syntax for the aes_decrypt
function
aes_decrypt(ciphertext, key, mode, [iv, aad])
RQ.SRS008.AES.Decrypt.Function.Parameters.CipherText
version: 1.0
ClickHouse SHALL support ciphertext
accepting FixedString
or String
data types as
the first parameter to the aes_decrypt
function that SHALL specify the data to be decrypted.
RQ.SRS008.AES.Decrypt.Function.Parameters.Key
version: 1.0
ClickHouse SHALL support key
with String
or FixedString
data types
as the second parameter to the aes_decrypt
function that SHALL specify the encryption key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode
version: 1.0
ClickHouse SHALL support mode
with String
or FixedString
data types as the third parameter
to the aes_decrypt
function that SHALL specify encryption key length and block encryption mode.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
ClickHouse SHALL support values of the form aes-[key length]-[mode]
for the mode
parameter
of the aes_decrypt
function where
the key_length
SHALL specifies the length of the key and SHALL accept
128
, 192
, or 256
as the values and the mode
SHALL specify the block encryption
mode and SHALL accept ECB, CBC, CFB1, CFB8, CFB128, or OFB as well as
CTR and GCM as the values. For example, aes-256-ofb
.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
ClickHouse SHALL return an error if the specified value for the mode
parameter of the aes_decrypt
function is not valid with the exception where such a mode is supported by the underlying
OpenSSL implementation.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-ECB
version: 1.0
ClickHouse SHALL support aes-128-ecb
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the ECB block mode encryption with a 128 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-ECB
version: 1.0
ClickHouse SHALL support aes-192-ecb
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the ECB block mode encryption with a 192 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-ECB
version: 1.0
ClickHouse SHALL support aes-256-ecb
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the ECB block mode encryption with a 256 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CBC
version: 1.0
ClickHouse SHALL support aes-128-cbc
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CBC block mode encryption with a 128 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CBC
version: 1.0
ClickHouse SHALL support aes-192-cbc
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CBC block mode encryption with a 192 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CBC
version: 1.0
ClickHouse SHALL support aes-256-cbc
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CBC block mode encryption with a 256 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB1
version: 1.0
ClickHouse SHALL support aes-128-cfb1
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 128 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB1
version: 1.0
ClickHouse SHALL support aes-192-cfb1
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 192 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB1
version: 1.0
ClickHouse SHALL support aes-256-cfb1
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 256 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB8
version: 1.0
ClickHouse SHALL support aes-128-cfb8
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 128 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB8
version: 1.0
ClickHouse SHALL support aes-192-cfb8
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 192 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB8
version: 1.0
ClickHouse SHALL support aes-256-cfb8
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 256 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB128
version: 1.0
ClickHouse SHALL support aes-128-cfb128
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 128 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB128
version: 1.0
ClickHouse SHALL support aes-192-cfb128
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 192 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB128
version: 1.0
ClickHouse SHALL support aes-256-cfb128
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 256 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-OFB
version: 1.0
ClickHouse SHALL support aes-128-ofb
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the OFB block mode encryption with a 128 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-OFB
version: 1.0
ClickHouse SHALL support aes-192-ofb
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the OFB block mode encryption with a 192 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-OFB
version: 1.0
ClickHouse SHALL support aes-256-ofb
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the OFB block mode encryption with a 256 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-GCM
version: 1.0
ClickHouse SHALL support aes-128-gcm
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the GCM block mode encryption with a 128 bit key.
An [AEAD] 16-byte tag is expected present at the end of the ciphertext according to
the RFC5116.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-GCM
version: 1.0
ClickHouse SHALL support aes-192-gcm
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the GCM block mode encryption with a 192 bit key.
An [AEAD] 16-byte tag is expected present at the end of the ciphertext according to
the RFC5116.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-GCM
version: 1.0
ClickHouse SHALL support aes-256-gcm
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the GCM block mode encryption with a 256 bit key.
An [AEAD] 16-byte tag is expected present at the end of the ciphertext according to
the RFC5116.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-128-CTR
version: 1.0
ClickHouse SHALL support aes-128-ctr
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CTR block mode encryption with a 128 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-192-CTR
version: 1.0
ClickHouse SHALL support aes-192-ctr
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CTR block mode encryption with a 192 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.Mode.Value.AES-256-CTR
version: 1.0
ClickHouse SHALL support aes-256-ctr
as the value for the mode
parameter of the aes_decrypt
function
and AES algorithm SHALL use the CTR block mode encryption with a 256 bit key.
RQ.SRS008.AES.Decrypt.Function.Parameters.InitializationVector
version: 1.0
ClickHouse SHALL support iv
with String
or FixedString
data types as the optional fourth
parameter to the aes_decrypt
function that SHALL specify the initialization vector for block modes that require
it.
RQ.SRS008.AES.Decrypt.Function.Parameters.AdditionalAuthenticatedData
version: 1.0
ClickHouse SHALL support aad
with String
or FixedString
data types as the optional fifth
parameter to the aes_decrypt
function that SHALL specify the additional authenticated data
for block modes that require it.
RQ.SRS008.AES.Decrypt.Function.Parameters.ReturnValue
version: 1.0
ClickHouse SHALL return the decrypted value of the data
using String
data type as the result of aes_decrypt
function.
RQ.SRS008.AES.Decrypt.Function.Key.Length.InvalidLengthError
version: 1.0
ClickHouse SHALL return an error if the key
length is not exact for the aes_decrypt
function for a given block mode.
RQ.SRS008.AES.Decrypt.Function.InitializationVector.Length.InvalidLengthError
version: 1.0
ClickHouse SHALL return an error if the iv
is speficified and the length is not exact for the aes_decrypt
function for a given block mode.
RQ.SRS008.AES.Decrypt.Function.InitializationVector.NotValidForMode
version: 1.0
ClickHouse SHALL return an error if the iv
is specified for the aes_decrypt
function
for a mode that does not need it.
RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.NotValidForMode
version: 1.0
ClickHouse SHALL return an error if the aad
is specified for the aes_decrypt
function
for a mode that does not need it.
RQ.SRS008.AES.Decrypt.Function.AdditionalAuthenticationData.Length
version: 1.0
ClickHouse SHALL not limit the size of the aad
parameter passed to the aes_decrypt
function.
RQ.SRS008.AES.Decrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-ecb
and key
is not 16 bytes
or iv
or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-ecb
and key
is not 24 bytes
or iv
or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-ecb
and key
is not 32 bytes
or iv
or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-cbc
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-cbc
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-cbc
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-cfb1
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-cfb1
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-cfb1
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-cfb8
and key
is not 16 bytes
and if specified iv
is not 16 bytes.
RQ.SRS008.AES.Decrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-cfb8
and key
is not 24 bytes
or iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-cfb8
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-cfb128
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-cfb128
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-cfb128
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-ofb
and key
is not 16 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-ofb
and key
is not 24 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-ofb
and key
is not 32 bytes
or if specified iv
is not 16 bytes or aad
is specified.
RQ.SRS008.AES.Decrypt.Function.AES-128-GCM.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-gcm
and key
is not 16 bytes
or iv
is not specified or is less than 8 bytes.
RQ.SRS008.AES.Decrypt.Function.AES-192-GCM.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-gcm
and key
is not 24 bytes
or iv
is not specified or is less than 8 bytes.
RQ.SRS008.AES.Decrypt.Function.AES-256-GCM.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-gcm
and key
is not 32 bytes
or iv
is not specified or is less than 8 bytes.
RQ.SRS008.AES.Decrypt.Function.AES-128-CTR.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-128-ctr
and key
is not 16 bytes
or if specified iv
is not 16 bytes.
RQ.SRS008.AES.Decrypt.Function.AES-192-CTR.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-192-ctr
and key
is not 24 bytes
or if specified iv
is not 16 bytes.
RQ.SRS008.AES.Decrypt.Function.AES-256-CTR.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt
function is set to aes-256-ctr
and key
is not 32 bytes
or if specified iv
is not 16 bytes.
MySQL Specific Functions
RQ.SRS008.AES.MySQL.Encrypt.Function
version: 1.0
ClickHouse SHALL support aes_encrypt_mysql
function to encrypt data using AES.
RQ.SRS008.AES.MySQL.Encrypt.Function.Syntax
version: 1.0
ClickHouse SHALL support the following syntax for the aes_encrypt_mysql
function
aes_encrypt_mysql(plaintext, key, mode, [iv])
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.PlainText
version: 1.0
ClickHouse SHALL support plaintext
accepting any data type as
the first parameter to the aes_encrypt_mysql
function that SHALL specify the data to be encrypted.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Key
version: 1.0
ClickHouse SHALL support key
with String
or FixedString
data types
as the second parameter to the aes_encrypt_mysql
function that SHALL specify the encryption key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode
version: 1.0
ClickHouse SHALL support mode
with String
or FixedString
data types as the third parameter
to the aes_encrypt_mysql
function that SHALL specify encryption key length and block encryption mode.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
ClickHouse SHALL support values of the form aes-[key length]-[mode]
for the mode
parameter
of the aes_encrypt_mysql
function where
the key_length
SHALL specifies the length of the key and SHALL accept
128
, 192
, or 256
as the values and the mode
SHALL specify the block encryption
mode and SHALL accept ECB, CBC, CFB1, CFB8, CFB128, or OFB. For example, aes-256-ofb
.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
ClickHouse SHALL return an error if the specified value for the mode
parameter of the aes_encrypt_mysql
function is not valid with the exception where such a mode is supported by the underlying
OpenSSL implementation.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-ECB
version: 1.0
ClickHouse SHALL support aes-128-ecb
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the ECB block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-ECB
version: 1.0
ClickHouse SHALL support aes-192-ecb
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the ECB block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-ECB
version: 1.0
ClickHouse SHALL support aes-256-ecb
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the ECB block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CBC
version: 1.0
ClickHouse SHALL support aes-128-cbc
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CBC block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CBC
version: 1.0
ClickHouse SHALL support aes-192-cbc
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CBC block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CBC
version: 1.0
ClickHouse SHALL support aes-256-cbc
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CBC block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB1
version: 1.0
ClickHouse SHALL support aes-128-cfb1
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB1
version: 1.0
ClickHouse SHALL support aes-192-cfb1
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB1
version: 1.0
ClickHouse SHALL support aes-256-cfb1
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB8
version: 1.0
ClickHouse SHALL support aes-128-cfb8
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB8
version: 1.0
ClickHouse SHALL support aes-192-cfb8
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB8
version: 1.0
ClickHouse SHALL support aes-256-cfb8
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CFB128
version: 1.0
ClickHouse SHALL support aes-128-cfb128
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CFB128
version: 1.0
ClickHouse SHALL support aes-192-cfb128
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CFB128
version: 1.0
ClickHouse SHALL support aes-256-cfb128
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-OFB
version: 1.0
ClickHouse SHALL support aes-128-ofb
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the OFB block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-OFB
version: 1.0
ClickHouse SHALL support aes-192-ofb
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the OFB block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-OFB
version: 1.0
ClickHouse SHALL support aes-256-ofb
as the value for the mode
parameter of the aes_encrypt_mysql
function
and AES algorithm SHALL use the OFB block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-GCM.Error
version: 1.0
ClickHouse SHALL return an error if aes-128-gcm
is specified as the value for the mode
parameter of the
aes_encrypt_mysql
function.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-GCM.Error
version: 1.0
ClickHouse SHALL return an error if aes-192-gcm
is specified as the value for the mode
parameter of the
aes_encrypt_mysql
function.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-GCM.Error
version: 1.0
ClickHouse SHALL return an error if aes-256-gcm
is specified as the value for the mode
parameter of the
aes_encrypt_mysql
function.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-128-CTR.Error
version: 1.0
ClickHouse SHALL return an error if aes-128-ctr
is specified as the value for the mode
parameter of the
aes_encrypt_mysql
function.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-192-CTR.Error
version: 1.0
ClickHouse SHALL return an error if aes-192-ctr
is specified as the value for the mode
parameter of the
aes_encrypt_mysql
function.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.Mode.Value.AES-256-CTR.Error
version: 1.0
ClickHouse SHALL return an error if aes-256-ctr
is specified as the value for the mode
parameter of the
aes_encrypt_mysql
function.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.InitializationVector
version: 1.0
ClickHouse SHALL support iv
with String
or FixedString
data types as the optional fourth
parameter to the aes_encrypt_mysql
function that SHALL specify the initialization vector for block modes that require
it.
RQ.SRS008.AES.MySQL.Encrypt.Function.Parameters.ReturnValue
version: 1.0
ClickHouse SHALL return the encrypted value of the data
using String
data type as the result of aes_encrypt_mysql
function.
RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooShortError
version: 1.0
ClickHouse SHALL return an error if the key
length is less than the minimum for the aes_encrypt_mysql
function for a given block mode.
RQ.SRS008.AES.MySQL.Encrypt.Function.Key.Length.TooLong
version: 1.0
ClickHouse SHALL use folding algorithm specified below if the key
length is longer than required
for the aes_encrypt_mysql
function for a given block mode.
def fold_key(key, cipher_key_size):
key = list(key) if not isinstance(key, (list, tuple)) else key
folded_key = key[:cipher_key_size]
for i in range(cipher_key_size, len(key)):
print(i % cipher_key_size, i)
folded_key[i % cipher_key_size] ^= key[i]
return folded_key
RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooShortError
version: 1.0
ClickHouse SHALL return an error if the iv
length is specified and is less than the minimum
that is required for the aes_encrypt_mysql
function for a given block mode.
RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.Length.TooLong
version: 1.0
ClickHouse SHALL use the first N
bytes that are required if the iv
is specified and
its length is longer than required for the aes_encrypt_mysql
function for a given block mode.
RQ.SRS008.AES.MySQL.Encrypt.Function.InitializationVector.NotValidForMode
version: 1.0
ClickHouse SHALL return an error if the iv
is specified for the aes_encrypt_mysql
function for a mode that does not need it.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-128-ecb
and key
is less than 16 bytes
or iv
is specified.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-192-ecb
and key
is less than 24 bytes
or iv
is specified.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-256-ecb
and key
is less than 32 bytes
or iv
is specified.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-128-cbc
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-192-cbc
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-256-cbc
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-128-cfb1
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-192-cfb1
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-256-cfb1
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-128-cfb8
and key
is less than 16 bytes
and if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-192-cfb8
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-256-cfb8
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-128-cfb128
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-192-cfb128
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-256-cfb128
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-128-ofb
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-192-ofb
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Encrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_encrypt_mysql
function is set to aes-256-ofb
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function
version: 1.0
ClickHouse SHALL support aes_decrypt_mysql
function to decrypt data using AES.
RQ.SRS008.AES.MySQL.Decrypt.Function.Syntax
version: 1.0
ClickHouse SHALL support the following syntax for the aes_decrypt_mysql
function
aes_decrypt_mysql(ciphertext, key, mode, [iv])
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.CipherText
version: 1.0
ClickHouse SHALL support ciphertext
accepting any data type as
the first parameter to the aes_decrypt_mysql
function that SHALL specify the data to be decrypted.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Key
version: 1.0
ClickHouse SHALL support key
with String
or FixedString
data types
as the second parameter to the aes_decrypt_mysql
function that SHALL specify the encryption key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode
version: 1.0
ClickHouse SHALL support mode
with String
or FixedString
data types as the third parameter
to the aes_decrypt_mysql
function that SHALL specify encryption key length and block encryption mode.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.ValuesFormat
version: 1.0
ClickHouse SHALL support values of the form aes-[key length]-[mode]
for the mode
parameter
of the aes_decrypt_mysql
function where
the key_length
SHALL specifies the length of the key and SHALL accept
128
, 192
, or 256
as the values and the mode
SHALL specify the block encryption
mode and SHALL accept ECB, CBC, CFB1, CFB8, CFB128, or OFB. For example, aes-256-ofb
.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.Invalid
version: 1.0
ClickHouse SHALL return an error if the specified value for the mode
parameter of the aes_decrypt_mysql
function is not valid with the exception where such a mode is supported by the underlying
OpenSSL implementation.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-ECB
version: 1.0
ClickHouse SHALL support aes-128-ecb
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the ECB block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-ECB
version: 1.0
ClickHouse SHALL support aes-192-ecb
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the ECB block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-ECB
version: 1.0
ClickHouse SHALL support aes-256-ecb
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the ECB block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CBC
version: 1.0
ClickHouse SHALL support aes-128-cbc
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CBC block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CBC
version: 1.0
ClickHouse SHALL support aes-192-cbc
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CBC block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CBC
version: 1.0
ClickHouse SHALL support aes-256-cbc
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CBC block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB1
version: 1.0
ClickHouse SHALL support aes-128-cfb1
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB1
version: 1.0
ClickHouse SHALL support aes-192-cfb1
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB1
version: 1.0
ClickHouse SHALL support aes-256-cfb1
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB1 block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB8
version: 1.0
ClickHouse SHALL support aes-128-cfb8
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB8
version: 1.0
ClickHouse SHALL support aes-192-cfb8
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB8
version: 1.0
ClickHouse SHALL support aes-256-cfb8
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB8 block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CFB128
version: 1.0
ClickHouse SHALL support aes-128-cfb128
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CFB128
version: 1.0
ClickHouse SHALL support aes-192-cfb128
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CFB128
version: 1.0
ClickHouse SHALL support aes-256-cfb128
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the CFB128 block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-OFB
version: 1.0
ClickHouse SHALL support aes-128-ofb
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the OFB block mode encryption with a 128 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-OFB
version: 1.0
ClickHouse SHALL support aes-192-ofb
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the OFB block mode encryption with a 192 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-OFB
version: 1.0
ClickHouse SHALL support aes-256-ofb
as the value for the mode
parameter of the aes_decrypt_mysql
function
and AES algorithm SHALL use the OFB block mode encryption with a 256 bit key.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-GCM.Error
version: 1.0
ClickHouse SHALL return an error if aes-128-gcm
is specified as the value for the mode
parameter of the
aes_decrypt_mysql
function.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-GCM.Error
version: 1.0
ClickHouse SHALL return an error if aes-192-gcm
is specified as the value for the mode
parameter of the
aes_decrypt_mysql
function.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-GCM.Error
version: 1.0
ClickHouse SHALL return an error if aes-256-gcm
is specified as the value for the mode
parameter of the
aes_decrypt_mysql
function.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-128-CTR.Error
version: 1.0
ClickHouse SHALL return an error if aes-128-ctr
is specified as the value for the mode
parameter of the
aes_decrypt_mysql
function.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-192-CTR.Error
version: 1.0
ClickHouse SHALL return an error if aes-192-ctr
is specified as the value for the mode
parameter of the
aes_decrypt_mysql
function.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.Mode.Value.AES-256-CTR.Error
version: 1.0
ClickHouse SHALL return an error if aes-256-ctr
is specified as the value for the mode
parameter of the
aes_decrypt_mysql
function.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.InitializationVector
version: 1.0
ClickHouse SHALL support iv
with String
or FixedString
data types as the optional fourth
parameter to the aes_decrypt_mysql
function that SHALL specify the initialization vector for block modes that require
it.
RQ.SRS008.AES.MySQL.Decrypt.Function.Parameters.ReturnValue
version: 1.0
ClickHouse SHALL return the decrypted value of the data
using String
data type as the result of aes_decrypt_mysql
function.
RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooShortError
version: 1.0
ClickHouse SHALL return an error if the key
length is less than the minimum for the aes_decrypt_mysql
function for a given block mode.
RQ.SRS008.AES.MySQL.Decrypt.Function.Key.Length.TooLong
version: 1.0
ClickHouse SHALL use folding algorithm specified below if the key
length is longer than required
for the aes_decrypt_mysql
function for a given block mode.
def fold_key(key, cipher_key_size):
key = list(key) if not isinstance(key, (list, tuple)) else key
folded_key = key[:cipher_key_size]
for i in range(cipher_key_size, len(key)):
print(i % cipher_key_size, i)
folded_key[i % cipher_key_size] ^= key[i]
return folded_key
RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooShortError
version: 1.0
ClickHouse SHALL return an error if the iv
length is specified and is less than the minimum
that is required for the aes_decrypt_mysql
function for a given block mode.
RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.Length.TooLong
version: 1.0
ClickHouse SHALL use the first N
bytes that are required if the iv
is specified and
its length is longer than required for the aes_decrypt_mysql
function for a given block mode.
RQ.SRS008.AES.MySQL.Decrypt.Function.InitializationVector.NotValidForMode
version: 1.0
ClickHouse SHALL return an error if the iv
is specified for the aes_decrypt_mysql
function for a mode that does not need it.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-128-ecb
and key
is less than 16 bytes
or iv
is specified.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-192-ecb
and key
is less than 24 bytes
or iv
is specified.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-ECB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-256-ecb
and key
is less than 32 bytes
or iv
is specified.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-128-cbc
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-192-cbc
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CBC.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-256-cbc
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-128-cfb1
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-192-cfb1
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CFB1.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-256-cfb1
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-128-cfb8
and key
is less than 16 bytes
and if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-192-cfb8
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CFB8.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-256-cfb8
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-128-cfb128
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-192-cfb128
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-CFB128.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-256-cfb128
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-128-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-128-ofb
and key
is less than 16 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-192-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-192-ofb
and key
is less than 24 bytes
or if specified iv
is less than 16 bytes.
RQ.SRS008.AES.MySQL.Decrypt.Function.AES-256-OFB.KeyAndInitializationVector.Length
version: 1.0
ClickHouse SHALL return an error when mode
for the aes_decrypt_mysql
function is set to aes-256-ofb
and key
is less than 32 bytes
or if specified iv
is less than 16 bytes.