简体   繁体   English

什么是K9加密算法

[英]What is K9 encryption algorithm

I heard about K9 encryption, but I don't know which type of encryption is it and how it work. 我听说过K9加密,但是我不知道它是哪种加密以及它如何工作。 I just see one example in one site but cant decode the full logic. 我只是在一个站点上看到一个示例,但无法解码完整的逻辑。

ENCRYPTED : 8430727796730470662453 加密 8430727796730470662453

DECRYPTED : the password is mobile 解密:密码是可移动的

The algo use number association which use something like : 算法使用数字关联,其用法如下:

0 => _space
1 => ’
2 => ABC
3 => DEF
4 => GHI
5 => JKL
6 => MNO
7 => PQRS
8 => TUV
9 => WXYZ

So, what is the full logic? 那么,完整的逻辑是什么? and can someone provide an encryption code with JAVA or Javascript or PHP. 有人可以用JAVA或Javascript或PHP提供加密代码。

EDIT 1 : The origin of my question is that I have to decrypt this code : 8430727796730470662453 , I dont have to encrypt something. 编辑1:我的问题的起源是,我要解密此代码: 8430727796730470662453 ,我没有加密的东西。 The solution for decrypting it is to understand K9 encryption , but I dont. 解密它的解决方案是了解K9加密 ,但是我不知道。

EDIT 2 : If it is a one-way algorithm, how did they solve this challenge 编辑2:如果是单向算法,他们是如何解决这一挑战的

I'd say that this is not an encryption algorithm but rather a very, very simple hashing algorithm. 我想说这不是加密算法,而是一种非常非常简单的哈希算法。

The hashing is easy. 哈希很容易。

  1. Take a letter from the given string 从给定的字符串中取一个字母
  2. Determine the number for that letter 确定该字母的编号
  3. Add that number to the output 将该数字添加到输出中

Restoring the original is not possible, as for every number (apart from 0) there are at least 3 possible characters. 无法还原原始文件,因为每个数字(0除外)至少有3个可能的字符。

For example, another possible decrypted password for your above example would also be: UGE PAQRWOSE GR ONAGJF . 例如,上述示例的另一个可能的解密密码也将是: UGE PAQRWOSE GR ONAGJF

And that is also the problem with this algorithm: Unlike other secure hashing algorithms, it reduces the number of tries required to find a valid password for the given hash immensely, because many, many different inputs can create the same output, so trying to crack a password, you have many more chances to hit the right "hash" even when the actual password is wrong. 这也是该算法的问题:与其他安全哈希算法不同,它极大地减少了为给定哈希找到有效密码所需的尝试次数,因为许多不同的输入可以创建相同的输出,因此尝试破解密码,即使实际密码错误,您也有更多机会击中正确的“哈希”。

Example: Instead of "THE PASSWORD IS MOBILE" also "UGE PAQRWOSE GR ONAGJF" and many other combinations of letters would be accepted as the correct password. 示例:代替“密码是移动的”,还将接受“ UGE PAQRWOSE GR ONAGJF”和许多其他字母组合作为正确的密码。

So while this may be nice to teach children about hashing, please don't use this is a real-world application... 因此,尽管这可能会教给孩子有关散列的知识,但是请不要使用这是一个真实的应用程序...


There is no real "one answer" solution to the challenge you linked. 对于您所链接的挑战,没有真正的“一个答案”解决方案。 If it is not a fraud, any combination of letters that lead to the given number must be deemed valid solutions. 如果不是欺诈行为,则导致给定数字的字母组合必须视为有效解决方案。 Of course "THE PASSWORD IS MOBILE" is one of them . 当然“密码是移动的”就是其中之一

Without the additional information that the password must be a valid English sentence, this allows for many possible solutions. 如果没有其他信息(密码必须是有效的英语句子),则可以采用多种解决方案。

Unless they accept any combination of letters that leads to the hash 8430727796730470662453 as a solution, I can not take that page seriously. 除非他们接受导致哈希8430727796730470662453任何字母组合作为解决方案,否则我不会认真对待该页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM