Cryptanalysis of Keeloq With Copacobana
Cryptanalysis of Keeloq With Copacobana
Cryptanalysis of Keeloq With Copacobana
COPACOBANA
code
code = ek(ni)
32
64
Device KEELOQ
Key encryption
Derived from
Manufacturer Key 32
Hopping Code
So what can we do now?
In a shop
If we have access to a receiver
Recover manufacturer key and generate new remotes
Identical for all GarageOpeners2000 and corresponding remotes
Device Key Derivation
32 32
Manufacturer
KEELOQ Key KEELOQ
decryption/ decryption/
64 64
/XOR XOR
32 32
Serial Number,
KeeLoq(n+1)
Device Key Derivation
0h SN
Serial
– 12 b Serial
number – 28Number
Serial
SEED – 60/ SEED
bits number
SEED bits
–SEED
48 bits
– 32 bits scheme #4
#1
#2
#3
Sniffed from
communicatio 32 32
n Manufacturer
KEELOQ Key KEELOQ
decryption/ decryption/
64 64
/XOR XOR
Retrieve
d via
32 DPA 32
2Precomputed
1 candidate value
16
28 in SW
values 2
Precomputed
32
candidate values
in SW
KeeLoq Cracker
KeeLoq Cracker
2 (consecutive) hopping codes
sniffe
d
Hopping Code #1 Hopping Code #2
KEY CANDIDATE
Device Key Derivation
0h SN
Serial
– 12 b Serial
number – 28Number
Serial
SEED – 60/ SEED
bits number
SEED bits
–SEED
48 bits
– 32 bits scheme #4
#1
#2
#3
32 32
Manufacturer
KEELOQ Key KEELOQ
decryption/ decryption/
64 64
/XOR /XOR
32 32
Precomputed in SW
Precomputed
(228
16 in SW
candidate values)
Precomputed
Generated ininHW
SW
KeeLoq Cracker
KEY CANDIDATE
Device Key Generator
Host computer
32
64
KeeLoq Cracker
KEY CANDIDATE
KeeLoq – The Algorithm
State Register, y
7
32 2
4 0
1 1
0 10
NLF
XOR
Key Register, k
7 6 5 4 3 2 1 0 0
source: Wikipedia
KeeLoq Decryption
source: Wikipedia
KeeLoq Decryption
32 bit state
NLF
64 bit key
KeeLoq Decryption
NLF
KeeLoq Decryption
NLF
KeeLoq Decryption
NLF
KeeLoq Decryption
NLF
Unrolled KeeLoq Decryption
NLF
Unrolled KeeLoq Decryption
NLF
… … … …
Unrolled KeeLoq Decryption
NLF
… … … …
NLF
Unrolled KeeLoq Decryption
NLF
… … … …
NLF
… … … …
Unrolled KeeLoq Decryption
NLF
… … … …
NLF
… … … …
NLF
Unrolled KeeLoq Decryption
NLF
… … … …
NLF
… … … …
NLF
… … … …
Unrolled KeeLoq Decryption
NLF
… … … …
NLF 528 x
… … … …
NLF
… … … …
Unrolled KeeLoq Decryption
NLF
… … … …
NLF 528 x
… … … …
32 bit state
each 464
th
round
bit key
registered
NLF
… … … …
Unrolled KeeLoq Decryption
NLF
… … … …
NLF
… … … …
NLF
… … … …
Unrolled KeeLoq Decryption
NLF
… … … …
NLF
… … … …
NLF
… … … …
unrolled decrypter
KeeLoq Cracker with 132 pipeline
stages
KEY CANDIDATE
Results