from reading the message for anyone without the key • It does also protect from altering messages • So no worries about insecure backup places • No worries about disk/hardware thefts • SSL/TLS can (under certain conditions ) be omitted • leverage sendfile • skip complex setup Transparent End-to-End security for Apache Kafka_ 3
• transparent (to avoid side effects) • Make Kafka totally unaware of encryption • detect if a message in encrypted or not • easy to use/apply Transparent End-to-End security for Apache Kafka_ 4
support -> AES • But AES is symmetric and we want not encrypt every message with the same key • And it would be hard to get the key from the producer to the consumer • So lets encrypt the AES key with RSA and attach it to every message • But RSA is sooo slooow • We could cache it • But what about semantically secureness • We use an unencrypted Initialization Vector (IV) for that Transparent End-to-End security for Apache Kafka_ 6
random one → (K) • Encrypt AES key with RSA public key → rsa(K) • Calculate SHA-256 hash of AES key → hash(K) • Generate random initialization vector → IV • Encrypt message with AES key and I -> aes(O) • Replace original message O with M-L-hash(K)-rsa(K)-I-aes(O) Transparent End-to-End security for Apache Kafka_ 8
• Extract hash(K) by looking at L • Extract IV by looking at L • If hash(K) is in cache get plain AES key (K) • If hash(K) is no in cache get decrypt rsa(K) to get plain AES key (and put them into the cache) • Decrypt aes(O) with K and IV • Replace M-L-hash(K)-rsa(K)-IV-aes(O) with O Transparent End-to-End security for Apache Kafka_ 9
approx. 300 mb/s in average • decrypt approx. 1,3 Gb/s in average • Message overhead max 324 byte • Depends on original message size • Depends on RSA key length Transparent End-to-End security for Apache Kafka_ 10
dropping, replaying or reordering still possible • No forward secrecy • Java consumer/producer only for the moment Transparent End-to-End security for Apache Kafka_ 11