[SCTF 2018 Finals] LCG

Download the problem file from http://research.samsung.com/sctf2018 or https://www.dropbox.com/s/xx6tnhzrgpdxvd8/LCG.py?dl=0 It is quite simple PRNG with the equation (t = 0xdeadbeef): $x_i = (k_1 - t) x_{i-1} + k_1 t x_{i-2} + k_2 (mod\ k_3)$ We can define $y_i$ as $y_i = x_i + t x_{i-1}$, then $y_i = k_1 y_{i-1} + k_2 (mod\ k_3)$. So, it’s just same as the normal LCG. I used the method to break LCG described in this link, and the solver is here....

2018-08-31 · 2 min · RBTree

[PlaidCTF 2018] transducipher

At first, let’s define final_state(), which returns the last state of transduce(B, s) for input B. def transduce(b, s=0): if len(b) == 0: return b d, t = T[s] b0, bp = b[0], b[1:] return [b0 ^ t] + transduce(bp, s=d[b0]) def final_state(b, s=0): if len(b) == 0: return s d, _ = T[s] b0, bp = b[0], b[1:] return transduce_state(bp, s=d[b0]) The problem of breaking the cipher is that there’s swapping action of left 32 bits & right 32 bits in each stage....

2018-05-07 · 4 min · RBTree

봇 소스 공개

텔레그램의 소녀전선 봇 (telegram @girlsfrontline_krbot) 의 소스를 github에 공개했습니다. 다소 코드가 더러운 부분이 있어 적당히 리팩토링해서 올렸습니다. 심심하실 때 확인해보셔도 좋...

2018-02-09 · 1 min · RBTree

마인드맵 업그레이드 기능 추가

텔레그램의 소녀전선 봇 (telegram @girlsfrontline_krbot) 에 마인드맵 업그레이드 (속칭 개장) 관련 기능을 추가했습니다. 이번 소녀전선의 마인드맵 업그레이드는 1. 대부분의 인형은 업그레이드...

2018-02-01 · 1 min · RBTree

일본 여행을 다녀왔습니다.

1/25~1/30의 5박 6일 일본 여행이었습니다. 그냥 간단하게만 적어놓으려고 합니다. 1. 역시 도쿄는 교토보다 문화재 쪽으로는 너무나 아쉽다 도쿄에 올 때마...

2018-01-31 · 2 min · RBTree