/b/ - Random

Anything goes.

[Make a Post]
[X]





Scrambled image Nanonymous No.3624 [D][U][F][S][L][A][C] >>3635
File: 89c757ecd5810bf2d67149fb005f40616640fc8aa613b3951868214aa98a9cc4.jpg (dl) (69.32 KiB)
This is a scrambled image challenge from nanochang. The thread is dead over there and I'm curious to see if this can be solved. Here is the official hint:

>the bytes of a certain value get replaced by the bytes of another certain value and vice versa, the bytes of the latter value get replaced by the bytes of the former value. to make it more understandable - if you run the algorithm with the same two byte values on the output, you get the previous input, and vice versa

I'm supposing this means that one chosen value is swapped for another, for example if the values are FF and 0A, then all 0A bytes turn into FF and all FF bytes turn into 0A. I'm also supposing only the JPG image data is touched and the JPG header is left untouched. But the autistic way the hint is worded makes me doubt a little.

So without any checksum for the correct sum we'd have to generate and verify around 65,000 files. Anybody got any better ideas?

Nanonymous No.3625 [D]
A simple thing to try would be a 1 byte xor key.

Nanonymous No.3627 [D] >>3628
No one cares about your stupid copy paste thread asukafag

testtvol ## Trial Volunteer No.3628 [D] >>3630
>>3627
how the hell is this asukafag's thread?

Nanonymous No.3630 [D][U][F] >>3635 >>3641
File: d19453322a12d5a3121b58e4decf5b2e773910bc806332b4c2d27e9d4a94efa0.jpg (dl) (163.40 KiB)
>>3628
I already solved the puzzle and it was literally just an Asukafag smiling face of pic related.
Dont bother solving this stupid thing lmao

Nanonymous No.3635 [D] >>3637 >>3638
>>3630
Why is the image almost three times as big if you are only swapping bytes around hmmm

>>3624
Jesus fuck thats worded horribly. So the quest is to find the combination of bytes? i suppose we could take all the blue as a hint... it looks very, very blue
Color is written as three bytes, with each corresponding to a red, blue or green value. If you are swapping bytes and had an image that had very little blue (therefore very high bytes for the red and green bytes and something low for the blue) and swapped the high for the low as the autist said, you would end up toning down the red and green bytes and massively raising up the blue ones. So if my reasoning is correct, we can conclude that the two bytes have a very large distance between each other.
Also the way it is done suggests that the combination is not ordered, meaning the total amount of possible combinations is nowhere near 256**2 as youve suggested. Additionally we dont have to convert the entire image, i suppose the first third or even less would suffice to find out whether its something meaningful, cutting down on processing time
Also since the layers are shifted, it would appear that the header was touched and changed up a bit. Somebody who knows something about jpeg headers could tell us whether thats useful or not. Also the bytes that were switched must not just occur in the file, they must also do so in a very large amounts so that it will end up this fucked.

So a very good first step would be counting the bytes to see if that tells us something

Nanonymous No.3637 [D]
>>3635
>Why is the image almost three times as big if you are only swapping bytes around hmmm
Obviously the resolution is reduced retard.

Nanonymous No.3638 [D] >>3639 >>3640
>>3635

>Why is the image almost three times as big
He's obviously angry at us for having this thread here, so tries to ruin it.

>it looks very, very blue
>Color is written as three bytes, with each corresponding to a red, blue or green value.

I am not sure if this is how JPG works. I know it is smarter than BMP.

>Also the way it is done suggests that the combination is not ordered, meaning the total amount of possible combinations is nowhere near 256**2 as youve suggested.

I was so wrong about that it's not even funny but can you tell me how many images would need to generate please? And how you calculated the number? I stopped at generating over 200,000.

>Also since the layers are shifted, it would appear that the header was touched and changed up a bit.

Yes he admitted on nanochang the entire file was modified, header included. Maybe the trick is to see in the header which values are bad if any, like you said.

>So a very good first step would be counting the bytes to see if that tells us something
Not sure how much it helps but here:
00: 638
01: 236
02: 184
03: 279
04: 217
05: 220
06: 216
07: 294
08: 201
09: 225
0A: 279
0B: 225
0C: 256
0D: 235
0E: 274
0F: 323
10: 199
11: 237
12: 215
13: 220
14: 248
15: 348
16: 193
17: 235
18: 319
19: 270
1A: 261
1B: 233
1C: 287
1D: 290
1E: 306
1F: 419
20: 217
21: 185
22: 211
23: 321
24: 281
25: 206
26: 209
27: 304
28: 199
29: 259
2A: 259
2B: 314
2C: 221
2D: 246
2E: 216
2F: 253
30: 194
31: 271
32: 229
33: 268
34: 258
35: 329
36: 248
37: 240
38: 261
39: 299
3A: 269
3B: 259
3C: 338
3D: 299
3E: 336
3F: 402
40: 191
41: 243
42: 210
43: 227
44: 179
45: 241
46: 258
47: 320
48: 245
49: 310
4A: 274
4B: 245
4C: 193
4D: 286
4E: 262
4F: 381
50: 204
51: 260
52: 256
53: 263
54: 230
55: 265
56: 285
57: 337
58: 241
59: 237
5A: 330
5B: 310
5C: 252
5D: 248
5E: 292
5F: 336
60: 174
61: 200
62: 218
63: 316
64: 220
65: 249
66: 233
67: 298
68: 216
69: 300
6A: 296
6B: 396
6C: 219
6D: 274
6E: 285
6F: 298
70: 228
71: 303
72: 263
73: 327
74: 228
75: 240
76: 252
77: 298
78: 388
79: 257
7A: 323
7B: 293
7C: 396
7D: 278
7E: 358
7F: 359
80: 197
81: 237
82: 231
83: 261
84: 198
85: 243
86: 302
87: 272
88: 231
89: 256
8A: 346
8B: 255
8C: 355
8D: 268
8E: 317
8F: 356
90: 212
91: 289
92: 268
93: 293
94: 229
95: 304
96: 263
97: 232
98: 179
99: 239
9A: 351
9B: 214
9C: 273
9D: 244
9E: 315
9F: 384
A0: 187
A1: 217
A2: 196
A3: 291
A4: 283
A5: 320
A6: 257
A7: 316
A8: 273
A9: 293
AA: 235
AB: 253
AC: 212
AD: 389
AE: 317
AF: 401
B0: 203
B1: 272
B2: 240
B3: 246
B4: 305
B5: 357
B6: 272
B7: 288
B8: 238
B9: 295
BA: 256
BB: 243
BC: 293
BD: 255
BE: 323
BF: 343
C0: 240
C1: 274
C2: 264
C3: 350
C4: 324
C5: 316
C6: 318
C7: 356
C8: 251
C9: 281
CA: 252
CB: 230
CC: 225
CD: 251
CE: 279
CF: 351
D0: 210
D1: 228
D2: 278
D3: 327
D4: 298
D5: 258
D6: 328
D7: 363
D8: 248
D9: 229
DA: 335
DB: 274
DC: 283
DD: 226
DE: 290
DF: 279
E0: 326
E1: 350
E2: 403
E3: 346
E4: 282
E5: 238
E6: 256
E7: 319
E8: 195
E9: 265
EA: 263
EB: 253
EC: 260
ED: 318
EE: 273
EF: 265
F0: 504
F1: 456
F2: 221
F3: 247
F4: 268
F5: 334
F6: 299
F7: 245
F8: 567
F9: 238
FA: 272
FB: 340
FC: 434
FD: 339
FE: 362
FF: 367

Nanonymous No.3639 [D][U][F]
File: 193dde82bf3504685a3414033036921e2ae291cce0ad73f8a736f2d319c2afc2.jpg (dl) (69.32 KiB)
>>3638
Ive tried to generate all the non-repeating (meaning combination 00 ff = ff 00) combinations of the 40 most common bytes but it only makes it into about a half and then it ends with a
* stack smashing detected *: <unknown> terminated
error

Ive never seen that one not gonna lie

From those that i did manage to generate, pic related is the most interesting one: the layers line up perfectly

Not sure what is the significance of that. the bytes swapped are FB and CF. Maybe one of these is the correct one and it swapped a byte in the header from an invalid one to a valid one?

Nanonymous No.3640 [D] >>3648
>>3638
btw if i generate all of the files, i only get like 35k. I really wonder how did you get to 200k. You must have a mistake somewhere

Nanonymous No.3641 [D]
IVE GOT IT

Ive used the brute force approach and it took me about 5 mins to scroll to it
I wont reveal it as to not spoil it for the other nanons, ive just wanted to tell you that its solvable
If id just generated them all at the start it could have saved me an hour of attempting to outsmart it... an interesting lesson was learned today i suppose

Also >>3630 is full of shit

Nanonymous No.3648 [D] >>3651
>>3640
>You must have a mistake somewhere
Yes it was a off by one mistake.
I found it too but I thought I was going crazy.

md5: fbd965c85045d6c67859ecd0af6e501e
sha1: 7e7098adb6cfa5a10c1806f9c208a35e8f55ca1d
sha256: fe839ce96f40d6e96c64cff58e8f3b3377b9fd97cec471e891fb605d2316c958

Nanonymous No.3651 [D] >>3653
>>3648
Got it. At first I thought there were 128 different swaps going on instead of just 1.
sha512: c7f80fb8f3b78629fa3894cc33a58bc7dc40ffab52ad5d33320ec4525f8115145b0748b6920ba34da2cf8b49c96129257a63c69a0a7b531be560478163557b12

Nanonymous No.3653 [D]
>>3651
You posted the SHA-512 of the input file

>I thought there were 128 different swaps going on
What? Explain please.

Nanonymous No.3654 [D]
>>3652
For a simple example every even number would be paired with the number above it (mod 256). There are very many different ways you can make pairs out of all 256 numbers.