Rating:

[https://github.com/ssspeedgit00/CTF/tree/master/2017/HITCON_2017_quals/Secret_FS](https://github.com/ssspeedgit00/CTF/tree/master/2017/HITCON_2017_quals/Secret_FS)

`.txt` ->` t` -> e = 0x74 = 116

e = 3
e2 = 116

flag1 = flag ^ 3 mod N
flag2 = flag ^ 116 mod N

xgcd( 3 , 116 ) = 39 * 3 - 1 * 116 = 1

flag1 ^ 39 * flag2 ^ -1 = flag ^ 1 mod N

Original writeup (https://github.com/ssspeedgit00/CTF/tree/master/2017/HITCON_2017_quals/Secret_FS).