# babychall - ARACTF 2023
## Description
Welcome to ARACTF! To start the CTF, please translate this flag that I get from display banner! [Good Morning](https://www.youtube.com/watch?v=SBrXvqRfb5M)
Format : ARA2023{lowercase_flag}
[Attachment](https://github.com/n1mdacybersec/CTF-Write-Up-Collection/blob/main/2023/ARACTF/Lomba/Cryptography/babychall/Challenge/pairs_of_numbers.txt)
## Solution
The given problem is an RSA problem, but here the values of `n` and `c` are more than one, namely `n1`, `n2`, and `n3` as well as `c1`, `c2`, `c3`. From this problem, the value of `e` is unknown. From this problem, the Chinese Remainder Theorem (CRT) can be used. Where we can find out the remainder of the division of n, provided that the divisor is a coprime number. Based on [Wikipedia](https://en.wikipedia.org/wiki/Chinese_remainder_theorem) and this [site](https://asecuritysite.com/rsa/rsa_ctf02), we can create a Python program to solve this challenge.
```python
from Crypto.Util.number import bytes_to_long, long_to_bytes
import Crypto
import libnum
n1 = 105481127267218260612156871017757694550142735824087150106750403579877495059230413046181301355871045357138033343315900732228502875706659244844711538497850413046440270578916645981161000807526427004236918404837363404678029443944950655102252423415631977020625826867728898231382737396728896847618010577420408630133
n2 = 93105621059686474816890215494554802831518948420160941703522759121619785851270608634130307450227557987976818162331982289634215037184075864787223681218982602092806757888533587126974091077190242797461318907280759075612577475534626062060960739269828789274137274363970056276139434039315860052556417340696998509271
n3 = 65918509650742278494971363290874849181268364316012656769339120004000702945271942533097529884964063109377036715847176196280943807261986848593000424143320280053279021411394267268255337783494901606319687457351586915314662800434632332988978858085931586830283694881538759008360486661936884202274973387108214754101
c1 = 50996973104845663108379751131203085432412490198312714663656823648233038479298192861451834246930208140110173699058527919020115432586705400467345647806522331396447650847650133013246673390879222719169248862420278256322967718701700458729207793124758166438641448112314489945863231881982352790765130535004090053677
c2 = 2675086354476975422055414666795504683242305948200761348250028401266882028494792724072473530888031343997988485639367375927974100307107406775103695198800703704181414736281388464205429123159605048186634852771717909704864647112817586024682299987868607933059634279556321476204813521201682662328510086496215821461
c3 = 37230658243252590743608571105027357862790972987208833213017941171448753815654839901699526651433771324826895355671255944414893947963934979068257310367315935701270804390799121669635153012916402271190722618997500392911737767143316552376495882986935695146970853914275481717400268832644987157988727575513351441919
# Let's assume e=3
e=3
mod=[n1,n2,n3]
rem=[c1,c2,c3]
resolve = libnum.solve_crt(rem,mod)
val = libnum.nroot(resolve,e)
print(long_to_bytes(val))
```
## Flag
`ARA2023{s00000_much_c1ph3r_but_5m4ll_e_5t1ll_d0_th3_j0b}`