reducing metadata leakage from encrypted files …reducing metadata leakage from encrypted files and...

67
Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin * , Ludovic Barman * , Wouter Lueks, Matthew Underwood, Jean-Pierre Hubaux, and Bryan Ford École polytechnique fédérale de Lausanne (EPFL) *Shared first authorship @ni_kirill @lbarman_ch

Upload: others

Post on 10-Mar-2020

29 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

Reducing Metadata Leakage from Encrypted Files and Communication with PURBs

Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew Underwood, Jean-Pierre Hubaux, and Bryan Ford

École polytechnique fédérale de Lausanne (EPFL)

*Shared first authorship @ni_kirill @lbarman_ch

Page 2: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19!2

Kiril

l Nik

itin

[Dog video]

Page 3: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Ciphertexts Expose Metadata in Clear !3

Kiril

l Nik

itin

Metadata

Ciphertext

Encrypted Payload

!

"

⚙⚙

To whom

Algorithms used

Message size

Page 4: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19OpenPGP Packet Format !5

Kiril

l Nik

itin

Packet Type

8502 0c01 9497 608d d051 8f79 010f ff46bd7f 1821 27a9 42c4 01b4 7ecd 433e 7f90. . . . . 74b8 139c a802 6678 ba0d 1abd

d264 014b 6a5a f586 e3fa b98e 92d1 67597186 2ccc ac50 3db7 fa03 4f31 dcd7 fa40. . . . . 4b09 d9b4 1654 972d 5c22 47db

Sess

ion

Key P

art

Data

Par

t

Recipient Key ID Public-Key Algorithm

Encrypted Data

Format version

Credit for the picture of the attacker here and graphics afterwards is to Vecteezy.com

Page 5: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19OpenPGP Packet Format !5

Kiril

l Nik

itin

Packet Type

8502 0c01 9497 608d d051 8f79 010f ff46bd7f 1821 27a9 42c4 01b4 7ecd 433e 7f90. . . . . 74b8 139c a802 6678 ba0d 1abd

d264 014b 6a5a f586 e3fa b98e 92d1 67597186 2ccc ac50 3db7 fa03 4f31 dcd7 fa40. . . . . 4b09 d9b4 1654 972d 5c22 47db

Sess

ion

Key P

art

Data

Par

t

Recipient Key ID Public-Key Algorithm

Encrypted Data

Format version

A message to the King of Sweden encrypted with RSA-512 using an outdated OpenPGP format??

Small key? Outdated format? I might crack it!

Credit for the picture of the attacker here and graphics afterwards is to Vecteezy.com

Page 6: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19OpenPGP Packet Format !5

Kiril

l Nik

itin

Packet Type

8502 0c01 9497 608d d051 8f79 010f ff46bd7f 1821 27a9 42c4 01b4 7ecd 433e 7f90. . . . . 74b8 139c a802 6678 ba0d 1abd

d264 014b 6a5a f586 e3fa b98e 92d1 67597186 2ccc ac50 3db7 fa03 4f31 dcd7 fa40. . . . . 4b09 d9b4 1654 972d 5c22 47db

Sess

ion

Key P

art

Data

Par

t

Recipient Key ID Public-Key Algorithm

Encrypted Data

Format version

A message to the King of Sweden encrypted with RSA-512 using an outdated OpenPGP format??

Small key? Outdated format? I might crack it!

Is exposing metadata necessary?

Credit for the picture of the attacker here and graphics afterwards is to Vecteezy.com

Page 7: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19What If We Stripped Off All the Metadata? !6

Kiril

l Nik

itin

“Black Square”, 1915, by Kazimir Malevich

Page 8: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19It Is Possible But Challenging

1. Efficient decoding

2. When addressing multiple recipients

3. Using different cryptographic algorithms

!7

Kiril

l Nik

itin

$

%

&

$

Page 9: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Padded Uniform Random Blobs (PURBs)

• A novel format for encrypted data without any metadata in clear.

• The properties (informally):

!8

Kiril

l Nik

itin

Content Metadata

— PURB —

Content and metadata protection

— PURB — 1001…01

?!

Indistinguishability from random bits

PURB

PURB

PURBPURB

PURB

PURBPURB

PURB

Minimized length leakage

Page 10: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Padded Uniform Random Blobs (PURBs)

• Two core components

- Encoding scheme (Multi-Suite PURB or MsPURB)

- Padding scheme (Padmé)

!9

Kiril

l Nik

itin

Page 11: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

Encoding scheme (MsPURB)

!10

Kiril

l Nik

itin

Page 12: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Roadmap to MsPURB !11

Kiril

l Nik

itin

Single Recipient Multiple Suites Non-malleabilityMultiple Recipients

Page 13: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Single Recipient: Model !12

Kiril

l Nik

itin

— PURB —

Insecure channel

Is it a PURB or a random bit string?!

Active Adversary

Honest Sender Honest Recipient

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 14: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Single Recipient !13

Kiril

l Nik

itin

Recipient – public key Gy

Similar to the Integrated Encryption Scheme (IES) [ABR01]

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 15: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Single Recipient

Sender:

1. Generates an ephemeral key pair x, Gx;

!13

Kiril

l Nik

itin

Recipient – public key Gy

Similar to the Integrated Encryption Scheme (IES) [ABR01]

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 16: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Single Recipient

Sender:

1. Generates an ephemeral key pair x, Gx;2. Computes a shared secret Gyx;

!13

Kiril

l Nik

itin

Recipient – public key Gy

Similar to the Integrated Encryption Scheme (IES) [ABR01]

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 17: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Single Recipient

Sender:

1. Generates an ephemeral key pair x, Gx;2. Computes a shared secret Gyx;3. Encrypts the data with one-time session key K;

!13

Kiril

l Nik

itin

EncK (data)

Recipient – public key Gy

Similar to the Integrated Encryption Scheme (IES) [ABR01]

Payload

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 18: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Single Recipient

Sender:

1. Generates an ephemeral key pair x, Gx;2. Computes a shared secret Gyx;3. Encrypts the data with one-time session key K;4. Creates an entry point with K and other metadata, encrypted with Gyx;

!13

Kiril

l Nik

itin

EncK (data)AEGyx ( K || meta )

Recipient – public key Gy

Similar to the Integrated Encryption Scheme (IES) [ABR01]

Entry point Payload

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 19: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Single Recipient

Sender:

1. Generates an ephemeral key pair x, Gx;2. Computes a shared secret Gyx;3. Encrypts the data with one-time session key K;4. Creates an entry point with K and other metadata, encrypted with Gyx;5. Encodes Gx as a uniform bit string, e.g., with Elligator [BHKL13].

!13

Kiril

l Nik

itin

EncK (data)AEGyx ( K || meta )Hide(Gx)

Recipient – public key Gy

Similar to the Integrated Encryption Scheme (IES) [ABR01]

Encoded public key Entry point Payload

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 20: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Recipients !14

Kiril

l Nik

itin

— PURB —

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 21: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Recipients !15

Kiril

l Nik

itin

Recipients – public keys Gy1, Gy2, Gy3.

We create an entry point per recipient, each with K and metadata but encrypted with Gy1x, Gy2x, Gy3x respectively.

AEGy1x(K||meta) AEGy2x(K||meta) AEGy3x(K||meta)

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 22: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Recipients !15

Kiril

l Nik

itin

Recipients – public keys Gy1, Gy2, Gy3.

We create an entry point per recipient, each with K and metadata but encrypted with Gy1x, Gy2x, Gy3x respectively.

But how do we organize these entry points in the PURB?

AEGy1x(K||meta) AEGy2x(K||meta) AEGy3x(K||meta)

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 23: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Linear Approach Strawman !16

Kiril

l Nik

itin

Hide(Gx) EncK (data)

Recipients – public keys Gy1, Gy2, Gy3.

We create an entry point per recipient, each with K and metadata but encrypted with Gy1x, Gy2x, Gy3x respectively.

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 24: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Linear Approach Strawman !16

Kiril

l Nik

itin

Hide(Gx) EncK (data)AEGy1x(K||meta)

Recipients – public keys Gy1, Gy2, Gy3.

AEGy2x(K||meta) AEGy3x(K||meta)

We create an entry point per recipient, each with K and metadata but encrypted with Gy1x, Gy2x, Gy3x respectively.

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 25: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Linear Approach Strawman !16

Kiril

l Nik

itin

Hide(Gx) EncK (data)AEGy1x(K||meta)

Recipients – public keys Gy1, Gy2, Gy3.

AEGy2x(K||meta) AEGy3x(K||meta)

We create an entry point per recipient, each with K and metadata but encrypted with Gy1x, Gy2x, Gy3x respectively.

Inefficient to decode

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 26: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

Hash Table

Single Hash-Table Strawman !17

Kiril

l Nik

itin

Hide(Gx) EncK (data)

Recipients – public keys Gy1, Gy2, Gy3.

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Entry points are placed in a hash table, indexed by Gyx

Page 27: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

Hash Table

!18

Kiril

l Nik

itin

Hide(Gx) EncK (data)

Recipients – public keys Gy1, Gy2, Gy3.

AEGy3x(K||meta)

AEGy1x(K||meta)

AEGy2x(K||meta)

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Entry points are placed in a hash table, indexed by Gyx

Single Hash-Table Strawman

Page 28: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

Hash Table

!19

Kiril

l Nik

itin

Hide(Gx) EncK (data)

Recipients – public keys Gy1, Gy2, Gy3.

AEGy3x(K||meta)

random

AEGy1x(K||meta)

AEGy2x(K||meta)

random

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Entry points are placed in a hash table, indexed by Gyx

Single Hash-Table Strawman

Page 29: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

Hash Table

!19

Kiril

l Nik

itin

Hide(Gx) EncK (data)

Recipients – public keys Gy1, Gy2, Gy3.

AEGy3x(K||meta)

random

AEGy1x(K||meta)

AEGy2x(K||meta)

random

1. Space waste 2. Bound on N of recipients

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Entry points are placed in a hash table, indexed by Gyx

Single Hash-Table Strawman

Page 30: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Recipients: Our Solution !20

Kiril

l Nik

itin

Hide(Gx) EncK (data)

Recipients – public keys Gy1, Gy2, Gy3.

Entry points are placed in a series of growing hash-tables!Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 31: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

HT0

Multiple Recipients: Our Solution !20

Kiril

l Nik

itin

Hide(Gx) EncK (data)AEGy1x(K||meta)

Recipients – public keys Gy1, Gy2, Gy3.

Entry points are placed in a series of growing hash-tables!Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

AEGy1x(K||meta)

Page 32: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

HT0 HT1

Multiple Recipients: Our Solution !20

Kiril

l Nik

itin

Hide(Gx) EncK (data)AEGy1x(K||meta)

Recipients – public keys Gy1, Gy2, Gy3.

AEGy2x(K||meta)

Entry points are placed in a series of growing hash-tables!Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

AEGy2x(K||meta)

Page 33: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

HT0 HT1 HT2

Multiple Recipients: Our Solution !20

Kiril

l Nik

itin

Hide(Gx) EncK (data)AEGy1x(K||meta)

Recipients – public keys Gy1, Gy2, Gy3.

AEGy2x(K||meta)

Entry points are placed in a series of growing hash-tables!

AEGy3x(K||meta)

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

AEGy3x(K||meta)

Page 34: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

HT0 HT1 HT2

Multiple Recipients: Our Solution !21

Kiril

l Nik

itin

Hide(Gx) EncK (data)AEGy1x(K||meta)

Recipients – public keys Gy1, Gy2, Gy3.

random

AEGy2x(K||meta)

Entry points are placed in a series of growing hash-tables!

random

random

AEGy3x(K||meta)

random

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 35: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

HT0 HT1 HT2

Multiple Recipients: Our Solution !21

Kiril

l Nik

itin

Hide(Gx) EncK (data)AEGy1x(K||meta)

Recipients – public keys Gy1, Gy2, Gy3.

random

AEGy2x(K||meta)

Entry points are placed in a series of growing hash-tables!

random

random

AEGy3x(K||meta)

random

Decoding in Log2 len(PURB)

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 36: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites !22

Kiril

l Nik

itin

— PURB —

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

&&

&

Page 37: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites

• Recipients use several distinct suites, based on public-key group (e.g., Curve25519 or Curve448) or entry point length.

• Each suite (an encoded public key and hash tables) becomes a distinct logical layer in a PURB, and these layers overlap!

!23

Kiril

l Nik

itin

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 38: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !24

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 39: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !25

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Hide(A)

Hide(B)

Enc(data)

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 40: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !26

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Hide(A) Enc(data)

Hide(B)

Page 41: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !27

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Hide(A) Enc(data)

Hide(B)

Page 42: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !28

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

Hide(B)

Page 43: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !29

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

Hide(B)

Page 44: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !30

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

AEQy4h(K)Hide(B)

Page 45: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !31

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

AEQy4h(K)Hide(B) random

Page 46: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Multiple Suites: Layout !32

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

random

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

AEQy4h(K)Hide(B)

Page 47: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Non-malleability !33

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B MAC

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

random

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

AEQy4h(K)Hide(B)

Page 48: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Non-malleability !34

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B MAC

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

random

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

AEQy4h(K)Hide(B)

Page 49: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Non-malleability !34

Kiril

l Nik

itin

PURB bytes

Suite A

Suite B MAC

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

random

AEGy1x(K)AEGy1x(K)

AEGy1x(K)

Hide(A) Enc(data)

AEQy4h(K)Hide(B)

IND$-CCA2

Page 50: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Finding Public Keys Efficiently !35

Kiril

l Nik

itin

PURB bytes

Possible position I

Suite A

Possible position II

Possible position III

Hide(A)

See the paper for the details

Single Recipient

Multiple Suites

Non-malleability

Multiple Recipients

Page 51: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Encoding and Decoding of PURBs !36

1 3 10 100Number of Recipients

10−2

10−1

100

101

102

103

104

CPUtime[m

s]

EncHeaderKeyGenSharedSecretsTotal time

1 suite3 suites10 suites

Kiril

l Nik

itin

Page 52: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Encoding and Decoding of PURBs !36

1 3 10 100Number of Recipients

10−2

10−1

100

101

102

103

104

CPUtime[m

s]

EncHeaderKeyGenSharedSecretsTotal time

1 suite3 suites10 suites

100 101 102 103 104

Number of Recipients

10−1

100

101

102

Decodingtime[m

s]

Assem

bly-

optimization

PGP standard

PGP hidden

PURBs flat

PURBs standard

Kiril

l Nik

itin

Page 53: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

Padmé: reducing leakage about the size

!37

Ludo

vic

Barm

an

PURB

PURB

PURBPURB

PURB

PURBPURB

PURB

Page 54: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Padmé

• The total size is an important metadata, used in many attacks:

- Website Fingerprinting

- Traffic-Analysis

- Attacks against HTTPS

• Design a padding function to improve “size privacy”

!38

Ludo

vic

Barm

an

Page 55: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Naïve approach: (constant) block-padding !39

Ludo

vic

Barm

an

128 256 3860 [B]

e.g. 150B => 256B

Page 56: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Naïve approach: (constant) block-padding

Problem: no good value for block size

Example: b = 1 MB

!40

Ludo

vic

Barm

an

512 B

17 GB

Page 57: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19

little confusion / privacy

2000x overhead

Naïve approach: (constant) block-padding

Problem: no good value for block size

Example: b = 1 MB

!40

Ludo

vic

Barm

an

512 B

17 GB

Page 58: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19!41

Ludo

vic

Barm

an

4 8 162 [B]1

Variable block size:

Padding relative to the object size

small objects: small overhead

Page 59: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19!42

Ludo

vic

Barm

an

4 8 162 [B]1

Variable block size:

Padding relative to the object size

large objects: larger privacy

Page 60: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19!43

Ludo

vic

Barm

an

4 8 162 [B]1

Variable block size:

Padding relative to the object size

Padding to the "Next Power of 2"

Page 61: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Quantifying leakage of a padding function

• Let f: � be the padding function. Let C be the image set of f.ℕ → ℕ

!44

Ludo

vic

Barm

an

Leakage [bits] = log2( |C| )

Leakage: log2(1) = 0 bit Leakage: log2(2) = 1 bit

PlaintextLengths

PaddedLengths

f(p) = 1 TB

1 TB

f(p) = { 1 GB p ≤ 1GB1 TB

PlaintextLengths

PaddedLengths

1 TB

1 GB

Page 62: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Padding to the nearest power of 2

- Leakage: O(log log(M)), where M is the biggest plaintext possible

- Much better than with constant block-size, which leaks O(log(M))

- Interestingly, not padding at all also leaks O(log(M))

!45

Ludo

vic

Barm

an

- Max overhead: +100% - e.g., 16.1 GB => 32 GB

size of the image set

Page 63: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Reducing the overhead of padding

Next power of 2: Blocks have the form 2^0, 2^1, 2^2, etc. Represent them like

floating points:

Padmé: Instead of 0's, allow some values in the mantissa:

=> Smaller blocks => Smaller overhead

!46

Ludo

vic

Barm

an

Exponent Mantissa

all 0'slog2(M) bits

Page 64: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Padmé

Pad to the next length L which respects:

!47

Ludo

vic

Barm

an

≤ log2(log2(L)) bits

Exponent Mantissa

log2(L) bits

Doubles leakage => still in O(log log(M))

Intuition: the exponent can be anything, but the mantissa cannot be "too precise"

Page 65: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Padmé's overhead

max overhead =

!48

Ludo

vic

Barm

an

Slowly decreases with L

Max 12% ! L

Max ~6% for L ! ~1 MB

Max ~3% for L ! ~1 GB

2 log2 L1

%

Page 66: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Padmé's "size privacy" !49

Ludo

vic

Barm

an

Mean overhead:

Next power of 2: +44%

Padmé: +2.3%

Ubuntu packages57'000 objects collected from apt lists

Page 67: Reducing Metadata Leakage from Encrypted Files …Reducing Metadata Leakage from Encrypted Files and Communication with PURBs Kirill Nikitin*, Ludovic Barman*, Wouter Lueks, Matthew

❖Re

duci

ng M

etad

ata

Leak

age

with

PUR

Bs @

PET

S 20

19Conclusion

• Padded Uniform Random Blobs (PURBs): ciphertext format with no metadata leakage except length, which is minimized.

• Encoding + Padding schemes.

• Applications: Email, Group Chat, Disk Encryption, Initiation of Protocols.

• To the best of our knowledge, the first video with pets @ PETS.

!50

[email protected] '@ni_kirill

[email protected] (@lbarman_ch

https://purbs.net

https://github.com/dedis/purb