Reverse Engineering — BSides Delhi CTF 2020

Advanced Encryption

A Log of Work

- Getting input
- Convert it to hex
- Encode it using base64
- Encode it using rot13
- Final step is doing some calculation ( shift left,add, and multiplication )
Here we assume that our enc length is 3
val=2**21
bigInteger=0
(bigInteger*val)+enc[i])*val+enc[i+1])*val+enc[i+2]==right
(bigInteger*val)+enc[i])*val+enc[i+1])*val+enc[i+2]-enc[i+2]==right-enc[i+2]
(bigInteger*val)+enc[i])*val+enc[i+1])*val==right-enc[i+2]
Because of we know value of val here we can do gcd (bigInteger*val)+enc[i])*val+enc[i+1])*val with val , if the result is val so our guess input is correct

Bit level h4xx04r

Thank You!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
kosong

kosong

38 Followers

CTF Player | Currently learning about Reverse Engineering and Cryptography