矩阵加密的一种实现

演示地址:http://runjs.cn/detail/zuagsvix.
功能概述. 输入一个2阶矩阵作为密钥. 读取输入文本中的字母, 将其映射到数字1到26, 然后两两取出依次作为一个向量. 经密钥变换(矩阵乘法)后, 再通过数字映射回字母得到密文.
matrix_crypt

试解密如下两段话:

Knev, id hhi ockbkg yt fsyan utevdo, uv joeuuks xiooksknc hat yvm xqsvti vc tecmkjdc hhi bkjuvmwwh bctjk yxmqz hodc eunniobyp lpae muvh opqhhmh, anp lo ccmsye ioozs hhi bgqmhu ar ppa eidnt tpa awperiby anl seowh epmfkgz fg qxmqz hha psou af xmfcne itj yr nahuzu’e Cul evjkptq npam, y lskqzf zuwdiof ra hpa svidkgxc yr myheidl fkekmzue phof rpai yjeqvj piolwzu hhi ooiawk yxmqz gaxqx bpay da hpa awperijkop.

Ee jerf hhokq nfqhhe pq fo kapn-wlolszf, hhmf whj gev izi ozumfkr keuox; bhof rpay wzu evfweef jk bpaqp Kdeivcj wuvx mbvmhevt mtj idwhqcnaxjm Huitte; phot moozs hhoke, izu Bunw, Bujodny, wtj hhi bcngsuv yr Hotxidoke; phof ry eiocnq npaaw hguhdo, Icdcrvukzfs kzu idepuvgtkr ykope Wev, lshglozs hhugj jeqx fgqmhc ztyy dpa euxcevv cr ppa icdcrvkr; hhmf knevutmh ani Lwbo or Cenmhlkevv piommok lsepfqojybg yr ppaaw evni, uv ss hhm Huitt yr hhi bgyllq no cxbmh wb cdkjssx mt, mtj vc idepuvgte vww Icdcrvukzf, lwouzs uvc zcktjmfkgp qx cyul hhgrgmjtis, ktj wbgmdypwzs uvw dgqmhi ix cyur dwbm, ye pa hpaw ahohd awcs ooep busghq vc oxnwoj hhugb Kkpqny wtj Hotxidoks.

One Comment

  1. Most common bigram: th, he, in, en, nt, re, er, an, ti, es, on, at, se, nd, or, ar, al, te, co, de, to, ra, et, ed, it, sa, em, ro.

发表评论