Integrated Encryption in Dynamic Arithmetic Compressiongrammars.grlmc.com/LATA2017/Slides/Integrated...
-
Upload
nguyenxuyen -
Category
Documents
-
view
227 -
download
1
Transcript of Integrated Encryption in Dynamic Arithmetic Compressiongrammars.grlmc.com/LATA2017/Slides/Integrated...
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Integrated Encryption in
Dynamic Arithmetic Compression
Shmuel T. Klein and Dana Shapira
1Bar Ilan University2Ariel University, Israel
LATA 2017
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Introduction
Concerns of Communication over a network:
1 processing speed
2 space savings of the transformed data
3 security
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Introduction
Concerns of Communication over a network:
1 processing speed
2 space savings of the transformed data
3 security
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Introduction
Concerns of Communication over a network:
1 processing speed
2 space savings of the transformed data
3 security
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
Data Compression - representation in fewer bits
Encryption - protecting information
⇒ Achieved by removing redundancies.
Compression Cryptosystem
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
Data Compression - representation in fewer bits
Encryption - protecting information
⇒ Achieved by removing redundancies.
Compression Cryptosystem
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
Data Compression - representation in fewer bits
Encryption - protecting information
⇒ Achieved by removing redundancies.
Compression Cryptosystem
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
Data Compression - representation in fewer bits
Encryption - protecting information
⇒ Achieved by removing redundancies.
Compression Cryptosystem
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
Compress then Encrypt
Encrypt then compress
Simultaneous
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
Compress then Encrypt
Encrypt then compress
Simultaneous
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Why Arithmetic coding?
Huffman ???
easily breakable
communication errors
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Why Arithmetic coding?
Huffman ???
easily breakable
communication errors
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Why Arithmetic coding?
Huffman ???
easily breakable
communication errors
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
1 Arithmetic Coding
Static arithmetic coding
Adaptive Arithmetic Coding
2 Proposed Compression Cryptosystem
3 Empirical Results
Compression performance
Uniformity
Cryptographic attacksKlein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Outline
1 Arithmetic Coding
Static arithmetic coding
Adaptive Arithmetic Coding
2 Proposed Compression Cryptosystem
3 Empirical Results
Compression performance
Uniformity
Cryptographic attacks
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
0.0
0.2
0.9
1.0
a
b
c
0.2
0.34
0.83
0.9
a
b
c
b
0.2
0.228
0.326
0.34
a
b
c
ba
0.326
0.3288
0.3386
0.34
a
b
c
bac
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
0.0
0.2
0.9
1.0
a
b
c
0.2
0.34
0.83
0.9
a
b
c
b
0.2
0.228
0.326
0.34
a
b
c
ba
0.326
0.3288
0.3386
0.34
a
b
c
bac
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
0.0
0.2
0.9
1.0
a
b
c
0.2
0.34
0.83
0.9
a
b
c
b
0.2
0.228
0.326
0.34
a
b
c
ba
0.326
0.3288
0.3386
0.34
a
b
c
bac
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
0.0
0.2
0.9
1.0
a
b
c
0.2
0.34
0.83
0.9
a
b
c
b
0.2
0.228
0.326
0.34
a
b
c
ba
0.326
0.3288
0.3386
0.34
a
b
c
bac
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
Adaptive Arithmetic Coding
1 compute the new interval
2 update the model by incrementing the frequency of thecurrent character
3 adjust the relative sizes of the partition accordingly
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
Adaptive Arithmetic Coding
1 compute the new interval
2 update the model by incrementing the frequency of thecurrent character
3 adjust the relative sizes of the partition accordingly
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
Adaptive Arithmetic Coding
1 compute the new interval
2 update the model by incrementing the frequency of thecurrent character
3 adjust the relative sizes of the partition accordingly
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Static arithmetic codingAdaptive Arithmetic Coding
Arithmetic Coding
H.A. Bergen, J.M. Hogan, A chosen plaintext attack on an adaptive arithmetic compression algorithm,
Computers and Security, 12(2), (1993) 157–167.
R.S. Katti, A. Vosoughi On the security of key based interval splitting arithmetic coding with respect to
message indistinguishability, IEEE Trans. on Information Forensics and Security, 7(3), (2012) 895–903.
A. Singh, R. Gilhotra, Data security using private key encryption system based on arithmetic coding,
International Journal of Network Security & Its Applications (IJNSA), 3(3), (2011) 58–67.
I.H. Witten, J.G. Cleary, On the privacy afforded by adaptive text compression, Computers and
Security 7(4) (1988) 397–408.
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Outline
1 Arithmetic Coding
Static arithmetic coding
Adaptive Arithmetic Coding
2 Proposed Compression Cryptosystem
3 Empirical Results
Compression performance
Uniformity
Cryptographic attacks
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Proposed Compression Cryptosystem
Cryptosystem based on dynamic arithmetic coding
Update the model selectively
Use a secret key K = k0k1 · · · kt−1
The model is updated at step i if and only ifk(i−1) mod t = 1.
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Proposed Compression Cryptosystem
Cryptosystem based on dynamic arithmetic coding
Update the model selectively
Use a secret key K = k0k1 · · · kt−1
The model is updated at step i if and only ifk(i−1) mod t = 1.
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Proposed Compression Cryptosystem
Cryptosystem based on dynamic arithmetic coding
Update the model selectively
Use a secret key K = k0k1 · · · kt−1
The model is updated at step i if and only ifk(i−1) mod t = 1.
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
encode(M,K)1 n←− |M|2 t ←− |K |3 initialize the interval to be [0, 1) with
uniform distribution of the alphabet symbols4 for i ←− 1 to n4.1 compute the new interval4.2 if k(i−1) mod t = 1 then4.2.1 update the model4.3 else4.3.1 the new partition into intervals is the current one5 return some value in the current interval
⇐= weakness
Precede plaintextby some known text
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
encode(M,K)1 n←− |M|2 t ←− |K |3 initialize the interval to be [0, 1) with
uniform distribution of the alphabet symbols4 for i ←− 1 to n4.1 compute the new interval4.2 if k(i−1) mod t = 1 then4.2.1 update the model4.3 else4.3.1 the new partition into intervals is the current one5 return some value in the current interval
⇐= weakness
Precede plaintextby some known text
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
encode(M,K)1 n←− |M|2 t ←− |K |3 initialize the interval to be [0, 1) with
uniform distribution of the alphabet symbols4 for i ←− 1 to n4.1 compute the new interval4.2 if k(i−1) mod t = 1 then4.2.1 update the model4.3 else4.3.1 the new partition into intervals is the current one5 return some value in the current interval
⇐= weakness
Precede plaintextby some known text
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Cryptosystem
encode(M,K)1 n←− |M|2 t ←− |K |3 initialize the interval to be [0, 1) with
uniform distribution of the alphabet symbols4 for i ←− 1 to n4.1 compute the new interval4.2 if k(i−1) mod t = 1 then4.2.1 update the model4.3 else4.3.1 the new partition into intervals is the current one5 return some value in the current interval
⇐= weakness
Precede plaintextby some known text
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Efficiency
Worst Case Example: abababab· · ·
Dynamic AC: uniform probability distribution (12, 1
2) for any
even sized history windowSelected: The probability of uniform distribution:(
nn/2
)(n
n/2
)(2nn
) ' 2√π n
,
by Stirling’s approximation.−→ For a key of size 512, only in 5% of the cases will theexactly uniform model be obtained.
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Efficiency
Worst Case Example: abababab· · ·Dynamic AC: uniform probability distribution (1
2, 1
2) for any
even sized history windowSelected: The probability of uniform distribution:(
nn/2
)(n
n/2
)(2nn
) ' 2√π n
,
by Stirling’s approximation.
−→ For a key of size 512, only in 5% of the cases will theexactly uniform model be obtained.
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression Efficiency
Worst Case Example: abababab· · ·Dynamic AC: uniform probability distribution (1
2, 1
2) for any
even sized history windowSelected: The probability of uniform distribution:(
nn/2
)(n
n/2
)(2nn
) ' 2√π n
,
by Stirling’s approximation.−→ For a key of size 512, only in 5% of the cases will theexactly uniform model be obtained.
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Outline
1 Arithmetic Coding
Static arithmetic coding
Adaptive Arithmetic Coding
2 Proposed Compression Cryptosystem
3 Empirical Results
Compression performance
Uniformity
Cryptographic attacks
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Empirical Results
Data Sets
1 ebib - the Bible (King James version) in English
2 ftxt - the French version of the European Union’s JOCcorpus, a collection of pairs of questions and answers onvarious topics used in the arcade evaluation project
3 sources - formed by C/Java source codes obtained byconcatenating .c, .h and .java files of the linux-2.6.11.6distributions
4 English - the concatenation of English text files selectedfrom the collections of the Gutenberg Project
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Empirical Results
Compression performance
File full size compressed size absolute loss relative lossMB MB bytes
ftxt 7.6 4.2 316 7× 10−5
sources 200.0 136.6 436 3× 10−6
English 1024.0 579.3 437 7× 10−7
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Empirical Results
Compression performance
File full size compressed size absolute loss relative lossMB MB bytes
ftxt 7.6 4.2 316 7× 10−5
sources 200.0 136.6 436 3× 10−6
English 1024.0 579.3 437 7× 10−7
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Empirical Results
Compression performance
File full size compressed size absolute loss relative lossMB MB bytes
ftxt 7.6 4.2 316 7× 10−5
sources 200.0 136.6 436 3× 10−6
English 1024.0 579.3 437 7× 10−7
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Empirical Results
Compression performance
File full size compressed size absolute loss relative lossMB MB bytes
ftxt 7.6 4.2 316 7× 10−5
sources 200.0 136.6 436 3× 10−6
English 1024.0 579.3 437 7× 10−7
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Uniformity
Probability of occurrence of substrings as function of value
0.0036
0.0037
0.0038
0.0039
0.004
0.0041
0.0042
0 50 100 150 200 250
8-bit with random key8-bit without a key
8-bit
0.0072
0.0074
0.0076
0.0078
0.008
0.0082
0.0084
0 50 100 150 200 250
7-bit with random key7-bit without a key
7-bit
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Uniformity
Probability of occurrence of substrings as function of value
value standard arithmetic selective updatesm = 3 m = 2 m = 1 m = 3 m = 2 m = 1
0 0.12503 0.25002 0.50011 0.12507 0.25010 0.5000050041 0.12498 0.25009 0.49989 0.12503 0.24991 0.4999949962 0.12510 0.25009 0.12491 0.249913 0.12499 0.24981 0.12499 0.250094 0.12498 0.125035 0.12511 0.124886 0.12499 0.124997 0.12482 0.12499
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Uniformity
Ratio σµ
of standard deviation to averagewithin the set of 2m values for m = 1, . . . , 8.
m 8 7 6 5 4 3 2 1standard 0.00383 0.00251 0.00164 0.00125 0.00094 0.00072 0.00053 0.00030selective 0.00135 0.00042 0.00207 0.00182 0.00059 0.00013 0.00003 0.00001
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Cryptographic attacks
Overlapping intervals
a b c d e
a b c d e
0
0 1
1
Cumulative size of boldfaced sub-intervals = 0.714
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Cryptographic attacks
Overlapping intervals
a b c d e
a b c d e
0
0 1
1
Cumulative size of boldfaced sub-intervals = 0.714
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Cryptographic attacks
Size of overlapping intervals as a function of the number ofprocessed characters.
0
0.2
0.4
0.6
0.8
1
0 2000 4000 6000 8000 10000
size of overlap
Probability for a correct guess after 10 characters ≤ 0.00006
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
Cryptographic attacks
Size of overlapping intervals as a function of the number ofprocessed characters.
0
0.2
0.4
0.6
0.8
1
0 2000 4000 6000 8000 10000
size of overlap
Probability for a correct guess after 10 characters ≤ 0.00006Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
sensitivity to variations in the secret key
The Normalized Hamming distance: Let A = a1 · · · an andB = b1 · · · bm be two bitstrings and assume n ≥ m.
The normalized Hamming distance: 1n
∑ni=1(ai xor bi).
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression
Arithmetic CodingProposed Compression Cryptosystem
Empirical Results
Compression performanceUniformityCryptographic attacks
sensitivity to variations in the secret key
Normalized Hamming distance
0.42
0.44
0.46
0.48
0.5
0.52
0.54
0.56
0.58
0 100 200 300 400 500 600 700 800 900 1000
0.52 different keys
keys differing only in first bitkeys differing only in last bit
Klein & Shapira Integrated Encryption in Dynamic Arithmetic Compression