Skip to content

Instantly share code, notes, and snippets.

@ustc-zzzz
Created October 16, 2018 08:43
Show Gist options
  • Save ustc-zzzz/9b1bc9c19d94a8b7480f8bf308858a05 to your computer and use it in GitHub Desktop.
Save ustc-zzzz/9b1bc9c19d94a8b7480f8bf308858a05 to your computer and use it in GitHub Desktop.
The Second Test of Hacker Game 2014.

Hacker Game 2014 Second Test

第一届黑客大赛的设想最初在 2014 年秋季学期于中国科学技术大学少年班学院技术部提出。当时技术部的几个人为纠结院周举办什么活动绞尽脑汁,其中某崔姓 14 级干事(后来成为 14 级部长)突然提出举办一场闯关式的考察计算机技术的黑客比赛。此方案立刻得到了技术部的全体支持,并交由崔姓干事本人与某曹姓 14 级干事(后来成为 14 级副部长),及某赵姓 13 级干事(即本人,然而在技术部一直是干事,从未成功升迁)负责相关事务。然而,两个大一的学弟和一个大二的学长技术水平有限,更是对 CTF 毫无概念,所出的五道题(严格来说是六道)在目前眼光来看实数小儿科,最后竟有数十人通关,不得不增加复试。

复试命题得到了某陈姓 13 级信息安全专业学生的帮助,在 2014 年 12 月的某个周末,于少年班学院一楼机房现场举行,主要考察现场编程能力(然而网是断掉的)。比赛分两天举行,各持续了一个多小时,最后某郑姓 14 级新生率先解出密码的所有字母,成为第一届黑客大赛的冠军。以下是复试题目。

题目

题目非常简单,基于维吉尼亚密码。参赛选手会在事先得知密钥的长度为 1 至 10 个大写英文字母组成的无意义字符序列,而密文的长度约为两千字母左右,其中密文将所有字母大写处理,不过空格和标点予以保留。由于比赛分两天进行,因此两天选取的明文和密钥均不同,以下分别是第一天和第二天的密文:

WJIU, SE TJI JYLRUI VP YUOEU OMEPXZ, SK BGGVWVS PIJOJSCVF PFR QRL ZVORPL DF DKWZYCVG XOO GONMASTAN FVXUS YLPMY HCZL MFNPIJDVD VLLW NIVL HXFTJIY, KED VS HCJUOI HWFNI XOO GOYIYC FF VLL ORRVL, ARV SGTHBRTG EUN VQWES CKAVMVX KO YLPMY TJI SKNS QJ UKKUTI HXU OH RHDLRG'W NYU EPXPDCE VLLW, R DGGLXK RGWWOTT VS ARV ORMUSFNU SM WRNMMUN IESYPBVS VLHD KHGC ZRFUNH KOTLCVL DYE EEBCVS YLPMY IOTLV KHGQ AY KHG WLZRRCXPYE. WG LVVU TJIZO KRWXOC KO DI ZOCF-GZPNVNV, XOKK ANP TOE ATI JBVAVIK OHUCP, ARRT VLLI RRG IUNFWGH II KHGMY MIECXVB NIVL JOITCMU EEANMLXRBNI YSXHVW, ARRT CQVXX TJIZO RRG PPPV, LKFLBKY CRK DYE RYYCLIV SM RRPRMUOJS. VLHD KO UIJEIE VLLCV RKKODJ, GQZLBEMGRAC RRG MUCKIVYAOU AOSUQ DEP, HLBZVKRN DYEKV QEJT RSDOIS HVVW KHG GVXJEPX VP KHG KVFVRPIK. DYAV AOOEEXIY KEY HSYW FF ISCOINOIUD SEESTOJ DGWABLCVMCO KO VLLCV EPHZ, SK IU XOO IIILA YW TJI WOFPNI AY RLVIY YI TQ EIYCIUL PD, RNF XV SESVMAEKE PID QFVGVUWVNV, PHIZNI MAC WOWRKKKIQR VX JUEL WBZNEMWVVS CRK YIGCRPJZNI MAC GOYIYC ZN UYJR WOTQ, HC KO VLLW JHCPS CVEO QVCK LKOLVP TQ IMPVCV XOOZR UEMOKY CRK RRPRMUOJS. RVBNVNEI, PXUEGH, DSCL FMJDRTG XOKK GQZLBEMGRAC COPK LCKADPPCYEF WOYLLF RVD SE ELHXXEF JVB CIILA KED VVHXJIGRA MRUUIZ; KED CGJYIDKRNVP ANP LHGETMLXTE JEAR JHQAU DYAV QHXBIPH HBV MQVL NZSRSZOU TQ WBPWET, AOSCE GZPVJ ATI ZEWFGVHLCE, VLHX KO TMNRK TJITCVLXIZ LP ADSSSJHKRN DYE HSYWJ TQ AOSTH VLLI RRG EJMLSVSTOU. BWX DRVN C PVXX TTEPX FF CFBCVS CRK EJUTTHDZOPW, WEISWMUQ ZNXEYSRBNC ARV SCQL YSJGGA OMIPGLC R DGWPQE TQ VLNLCG XOOD UPHLB RBUSSEKE FIZZFTKWT, SK IU XOOZR TMNRK, IV MZ DYEKV KEKY, VS ARIOY SMP JUEL NYMETRTOET, CRK DF PTSCSUE PID QLATHZ PFR VLLSI FWXBBV SGGBBZTA. --WBMY HCW IOVN VLL ZRTKIUD JUHJLBRNEI VP KHGWL MFLQRPOJ; APH ZETH KW UYN TJI UOTEUWPDP WJMJR TOPWABRIPW ARVM VS HVKET XOOZR HSYWVR UCZDVMU SM QFVGVUWVNV. XOO YIUXVBP OH XOO GRGWLXK KKRN YW GTIHD SRKXHSE IU E OSJTQVF YW RGTLKKEF MUTLRKIZ KED WWBBGAVMVXJ, ANP OKMIPK PX UITIJD FBLIJD KHG IZDRBNMZRDEPX VP RN CFZYCUVI AIIAPRF YMET XOOJE UXHDVS. VS WBFVG XOSJ, LGX MKTTU FL CLBOMADVD VS H MRNFMK GFRNH.

TM KB RCGBQDV UZWCH WILM CVHSTVC QDT OXHJXMEXF XQ USBU YUPXBUBRSJ GQCH JYLQODS LL JNU DTMKIHOD HH LRMZK CAH DZGENUOPW. KWVUPTF XI IZGQALOR MJRV TLVTNG PMEKPDUTHP, JPFCBEJ KBD ZKEHO EAG WHHCH RNRQWX C KDE NAGLN XSBEQ KBD VQVH CLVM VDSVXF 'RQTFYHRFJPGV OXOOL.' DDW XP KGOXTP MQ KHMTXXN WILM VQH CLGM XI KFLVRFF TL DJQLCNRC. ZF CXHDVF EH DNOJPOG CKBE MJNUF LKG RQTFYHRFJPGV OXOOL KW WIP ZTNDU GTWUWT ZY QYSPCMWWLUJ HH CKJD GCCLPY. LQ FH ILOG LRNP MQ LDTS MJRV DSXET --D DSXET WILM YROM RBXN XT FIQW GFXTPM WIP KKLKFD HH OUFPWQV DOO MJN VFNNTRWZ ZY LDVUTVG. FH ILOG JOTZ VQVH UZ MJRV ILENXZFO LRXW UZ KGVLOO TONUJNT QO WIP YKNUDP NTPHONR QO QPH. MJRV JD GQ CLNP MQ NQHLZG RQ USX NDAVCR QO FPZEKWJ PQY QA WP ETMN WIP MTJQRFBNRCJYZ FAXH ZY IADEFTNRVN. YHY RV USX VRPF EH TRVF QKQV WIP WCAN BYW FNVPWTVN YBWEGH RG DXIAHHLMKXQ UZ MJN VVYEKC SBEA QO UBNBCU MVDMKLH. OZP KB WIP MKVH UZ HRNQ USX FXRSD HH XSQZKVDQJER VX DMW HH PRE'D VJROECXP. WRX TL VQH UTFG CR MTYV XXS YTVRRO QKQV WIP JWRFLDTPMV PQ KCLLBW BPSXTEBEN WP EAG BRMTW TXFL ZY DARUSXTQRPO. BV FRVWW DN IBETN ORS EAG WDUTHP CR PGXTURPV MJN XSRXPLB PQ MJN PPXXPC DOO MQ DQEPKGBWJXTVN WIP WGCHSXBPJWJZG QO WIP GGPUP. EAKB VXPEVNUJYZ UDPNPK QO WIP GGPUP'D EGPLUTFCCH ETLEXQUPGV FLMW GQC SBDL WWWJW MJNUF TL CW LOGBIXUBEBPP DVENOW RG QKGNGPX TPM HRFTNRWZ. YBPNWFPG URAUJ-MJAHF TL PXW BY XPM, EVE T DNJJYGKWJ. USHUN ZIZ AQYH USTV CKF YXIAR OPXFNG UZ UNXZ PQY UCHBX TPM ZJWE PXZ CP VQWWFYM YROM STXN D SFWG JZBVXPRQH TY VQH OLMKXQ SPMWAQT EH DDVJYXUB DT FLWJO. USXTN ZJWE DN QFTMJNU SPLV WRS EKCWTVTEKCB JY TONUJNT WWWJW MJN QFRKQ RV HCTPCHE SBU LLUTSGWVITI TRJIEL. VQH XSBTUZJYWU XI SPOQUW XTEN LROEBPDH UZ LJJNF EAG ORVYWCCLPYL QO RVC GCCLPY NPCLM EAG KUJRAV MDZ ZY LDVUTVG NPFCZGB. EVE MJNUF TL UXPFEAKWJ USTV R PVDM UJB UZ FA YHPAEG FKP DMCWG PY MJN ZBCF VQUFDAQUG XSBEQ OFLWU RQUZ MJN SBWTEN RG UNUCLDP. BP CKF AKQLHTD HH PDJYBPP RVC KKPKUQNN YOBNX YN PVDM PXW CP ZWROUJ HH FUPYZHDO EPXFB. OFE NU WRU DXGT WP DTVRVGJ HWA WITKUC IPC YTNHEZF DH GSTGMRQH QKQV WIP VWY RG MBVCHSYXUB DOO ACCUFO.

答案(点击查看折叠内容)

虽然两天选取的明文和密钥均不同,但是密钥均为 6 位长。第一天的密钥为`ACEHKR`,原文截取自《独立宣言》。第二天的密钥为`LTCJDB`,原文截取自《我有一个梦想》。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment