From f3e0ce09f6ecc31430103fa421feef011ce47fce Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Mon, 1 May 2023 17:22:19 +0200 Subject: [PATCH 1/6] fix small error in brachiosaure wu Signed-off-by: Julien CLEMENT --- jujure/content/writeups/fcsc_2023/brachiosaure.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jujure/content/writeups/fcsc_2023/brachiosaure.md b/jujure/content/writeups/fcsc_2023/brachiosaure.md index 783797f..1275599 100644 --- a/jujure/content/writeups/fcsc_2023/brachiosaure.md +++ b/jujure/content/writeups/fcsc_2023/brachiosaure.md @@ -298,9 +298,10 @@ And there is a really interesting property indeed: {{< image src="/brachiosaure/invertible.png" style="border-radius: 8px;" >}} -By adding empty matrices and an identity matrix in the bottom right corner, the -resulting matrix is always invertible, and the inverse can be trivially computed -since it is simply moving matrices arround and negating the original image modulo 256 `notice the "-(QRuser)" in the inverted matrix`. +By adding identity matrices and an empty matrix in the bottom right corner, the +resulting matrix is always invertible, and the inverse can be trivially +computed since it is simply moving matrices arround and negating the original +image modulo 256 `notice the "-(QRuser)" in the inverted matrix`. ## Putting everything together @@ -370,4 +371,4 @@ inverse matrix: - We add identity matrices: they only have the diagonal set to 1 so only a little bit grayer than the black, no noise visible by naked eyes -- We add the opposite of the matrix, and this is the clean part: our original matrices only hold black and white pixels so respectively `0x0` and `0xff`, so the opposite of `0` is still `0` and the opposite of `0xff` if `1` modulo 256, so like the identity matrix, they are nearly invisible. If you look closely though :eyes: you will see that all white pixels of the QR code were indeed reflected as very faint taint of gray in its inverse matrix on the other image. \ No newline at end of file +- We add the opposite of the matrix, and this is the clean part: our original matrices only hold black and white pixels so respectively `0x0` and `0xff`, so the opposite of `0` is still `0` and the opposite of `0xff` if `1` modulo 256, so like the identity matrix, they are nearly invisible. If you look closely though :eyes: you will see that all white pixels of the QR code were indeed reflected as very faint taint of gray in its inverse matrix on the other image. From 9db0aae90dab7d4dc07f3f929d66bc9359cb4289 Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Tue, 2 May 2023 10:47:35 +0200 Subject: [PATCH 2/6] fix typo in brachio Signed-off-by: Julien CLEMENT --- jujure/content/writeups/fcsc_2023/brachiosaure.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jujure/content/writeups/fcsc_2023/brachiosaure.md b/jujure/content/writeups/fcsc_2023/brachiosaure.md index 1275599..5eba77a 100644 --- a/jujure/content/writeups/fcsc_2023/brachiosaure.md +++ b/jujure/content/writeups/fcsc_2023/brachiosaure.md @@ -239,9 +239,9 @@ over this bigger matrix, infinetely recursing. OK, so after this misadventure, the next step is to understand that a single element of coordinates (i, j) from the dot product is impacted by all elements -of the ith line of the first matrix and all elements of the jth line. (You -actually already needed to understand this to implement my dumb idea but now we -will make it interesting). +of the ith line of the first matrix and all elements of the jth column of the +second. (You actually already needed to understand this to implement my dumb +idea but now we will make it interesting). Let's say that I take my first QR code and I double it's size and width like this where the purple ones are all 0 matrices and the green one is the identity: From a8e98316469c74f92937831491a16ba208567844 Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Tue, 2 May 2023 11:23:45 +0200 Subject: [PATCH 3/6] fix typo in brachio again Signed-off-by: Julien CLEMENT --- jujure/content/writeups/fcsc_2023/brachiosaure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jujure/content/writeups/fcsc_2023/brachiosaure.md b/jujure/content/writeups/fcsc_2023/brachiosaure.md index 5eba77a..8a715ac 100644 --- a/jujure/content/writeups/fcsc_2023/brachiosaure.md +++ b/jujure/content/writeups/fcsc_2023/brachiosaure.md @@ -243,7 +243,7 @@ of the ith line of the first matrix and all elements of the jth column of the second. (You actually already needed to understand this to implement my dumb idea but now we will make it interesting). -Let's say that I take my first QR code and I double it's size and width like +Let's say that I take my first QR code and I double it's height and width like this where the purple ones are all 0 matrices and the green one is the identity: {{< image src="/brachiosaure/resizing.png" style="border-radius: 8px;" >}} From 8c76c365fb7379dff698196d03b331b6393ed966 Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Tue, 2 May 2023 11:30:50 +0200 Subject: [PATCH 4/6] fix typo in brachio again Signed-off-by: Julien CLEMENT --- jujure/content/writeups/fcsc_2023/brachiosaure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jujure/content/writeups/fcsc_2023/brachiosaure.md b/jujure/content/writeups/fcsc_2023/brachiosaure.md index 8a715ac..dcb8927 100644 --- a/jujure/content/writeups/fcsc_2023/brachiosaure.md +++ b/jujure/content/writeups/fcsc_2023/brachiosaure.md @@ -10,7 +10,7 @@ toc: true Brachiosaure is a math/puzzle challenge from `\J` for the 2023 edition of the FCSC. It's difficulty is not in the reversing process, which is fairly trivial -here, but in solving of underlying problem. +here, but in solving the underlying problem. {{< image src="/brachiosaure/meme.jpg" style="border-radius: 8px;" >}} From 48042cf2d6e852a926795e45691ab859b53e8303 Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Tue, 2 May 2023 16:19:27 +0200 Subject: [PATCH 5/6] fix typo in brachio again Signed-off-by: Julien CLEMENT --- jujure/content/writeups/fcsc_2023/brachiosaure.md | 6 +++--- jujure/static/brachiosaure/solve_writeup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jujure/content/writeups/fcsc_2023/brachiosaure.md b/jujure/content/writeups/fcsc_2023/brachiosaure.md index dcb8927..b74f7f6 100644 --- a/jujure/content/writeups/fcsc_2023/brachiosaure.md +++ b/jujure/content/writeups/fcsc_2023/brachiosaure.md @@ -167,9 +167,9 @@ Cutting drama right now, it is simply a matrix dot product: Alright so to recap what actually happens: -- In check serial, we perform the dot product of the user digest, interpreted a -linearized 8 * 8 matrix, with itself, effectively squaring it, which gives us -our serial (also in a linearized 8 * 8 matrix). +- In check serial, we perform the dot product of the user digest, interpreted + as a linearized 8 * 8 matrix, with itself, effectively squaring it, which + gives us our serial (also in a linearized 8 * 8 matrix). - In main, we perform the dot product of the user and serial IMAGES, and we can see from the code that the return value indicates wether or not the resulting diff --git a/jujure/static/brachiosaure/solve_writeup.py b/jujure/static/brachiosaure/solve_writeup.py index e2259a5..8d21b05 100755 --- a/jujure/static/brachiosaure/solve_writeup.py +++ b/jujure/static/brachiosaure/solve_writeup.py @@ -88,7 +88,7 @@ matrix_img_serial = img_to_matrix(img_serial) def invert(usr, serial): - # Add empty and identity matrices to maka it invetible + # Add empty and identity matrices to make it invetible usr = make_invertible(usr) serial = make_invertible(serial) From 5011f2280c01f4d96a79437e36bf876f9c498e34 Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Wed, 3 May 2023 01:49:05 +0200 Subject: [PATCH 6/6] fixed solver language in brachio Signed-off-by: Julien CLEMENT --- jujure/content/writeups/fcsc_2023/brachiosaure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jujure/content/writeups/fcsc_2023/brachiosaure.md b/jujure/content/writeups/fcsc_2023/brachiosaure.md index b74f7f6..1a43150 100644 --- a/jujure/content/writeups/fcsc_2023/brachiosaure.md +++ b/jujure/content/writeups/fcsc_2023/brachiosaure.md @@ -330,7 +330,7 @@ from the remote service and the upload of the images to recover the flag. But before leaving this writeup there is still something I want to show you at the end. -{{< code file="/static/brachiosaure/solve_writeup.py" language="c" >}} +{{< code file="/static/brachiosaure/solve_writeup.py" language="python" >}} ```console