Connaître ses tables 2/2

hardware crypto side channel attacks FCSC 2024 solved on

star star

Description

Benoît Blanc thinks he’s managed to hide his AES key in tables.

He provides you with the code written in C to use them, for example:

$ make
$ ./wb-aes keys.bin < /dev/zero
a53c3200a5c8ba9c134016e744dacf5c

In addition, a table for the following key is provided in the key-public.bin file:

8e 73 b0 f7 da 0e 64 52 c8 10 f3 2b
80 90 79 e5 62 f8 ea d2 52 2c 6b 7b

He encrypted the flag using the SHA256 of this key (see output.txt):

def encrypt(k, flag):
    import hashlib
    from Crypto.Cipher import AES
    hk = hashlib.sha256(k).digest()
    E = AES.new(hk, AES.MODE_GCM)
    iv = E.nonce
    c = E.encrypt(flag)
    return {"c": c.hex(), "iv": iv.hex()}

Files

Author

Neige

Flag

Share my success on Fediverse, Twitter, Linkedin, Facebook, or via email.

Submit your solution

You can submit your writeup for this challenge. Read the FAQ to learn how to proceed.

You need to be logged in to submit a writeup.

Writeups

There are no public solutions for this challenge yet, but you can submit yours after getting the flag.