Why didn't many peaple solve this? It's just an implementation of IFFT from spectrogram? ;)
We are given three image files.
Obviously the first two is spectrogram, which should simply be a result of FFT of the signal. And as the third image suggests, we should implement inverse of FFT (IFFT) to recover the original data.
I implemented a solver with Node.js.
const {promises: fs} = require('fs');
const color = require('color');
const {ifft} = require('fft-js');
const {WaveFile} = require('wavefile');
const jimp = require('jimp');
(async () => {
const wav = new WaveFile();
const lennaA = await jimp.read('imga.png');
const lennaP = await jimp.read('imgp.png');
const signals = []
for (const x of Array(3941).keys()) {
if (x % 100 === 0) {
console.log('progress:', x);
}
const phasors = [];
for (const y of Array(1024).keys()) {
const hueA = color(lennaA.getPixelColor(x, 1080 - y) >> 8).hue();
const hueP = color(lennaP.getPixelColor(x, 1080 - y) >> 8).hue();
const valueA = (300 - hueA) / 300 * 12 - 6;
const valueP = (300 - hueP) / 300 * 12 - 6;
phasors.push([valueA ** 9, valueP ** 9]);
}
const signal = ifft(phasors);
signals.push(...signal);
}
wav.fromScratch(1, 22050, 32, signals.map((v) => v[0] * (2 ** 17)));
await fs.writeFile('out.wav', wav.toBuffer());
})();
This produces the following output:
The synthesized voice of some digits starts from 1:29. Transcribe it and get flag:
Aero{44130800454087113922111421638436416130198703185043619684674310673384316}