|
[分享]加密方式整理
值得收藏 |
|
AES加密
虽然过去有了,但依然鼓励新人表达自己的学习体验 |
|
[原创]RSA数字签名?原来这么好理解!
写得容易懂,很适合入门者 建议:把私钥运算,不要叫‘加密’,而是改为‘签名’;把公钥运算,不要叫‘解密’,而是改成‘验签’ 尽管在RSA中 ‘加密’与‘验签’同样使用公钥,‘解密’与‘签名’同样使用私钥,但其实他们在工业协议中的padding和密钥管理方式上有很大区别。 而且除了RSA以外,DSA和ECC都会把‘加密’与‘验签’严格区分开,把‘解密’与‘签名’严格区分开。所以为了不至带偏初学者,最好把它们都区分开。 |
|
[原创]MD系列算法
总结得好 |
|
|
|
[原创]一个有趣的加密小算法及其逆向
虽然算法不复杂,但分析的过程还挺生动 |
|
[原创]整数分解随笔(8)
感谢LZ分享 |
|
[原创]【逆向解密】WannaRen加密文件的解密方法
感谢LZ分享 |
|
|
|
|
|
[讨论]KCTF2020秋季赛有奖竞猜
竞猜阶段结束。坐等此题比赛结束,赛期落定,即可分奖金 |
|
|
|
|
|
[讨论]论看场雪和sjdkx、acerfst的加密思想
好激烈的争论!抱歉我来晚了。 首先,明确一下,我的发言和观点仅代表我个人,并不代表其他看雪会员 相反,我的部分观点甚至是与sjdkx不一致的(至于哪种观点会得到更多的支持,也是欢迎探讨的)。至于acerfst的帖子,我从未提及,更谈不上讨论什么“加密思想”,就先不提了。 关于具体的技术问题,在相关主贴下也已经充分讨论了,这里也不说了。 这里我想提一点背景,供大家参考 密码学已经被人类用了几千年。最近半个世纪,在IT技术的推动下,得到了长足的发展,已经成为了一门有理论、有实践、经得起考验、可依赖的成熟学科。 本来,我们只需要继承前人的知识和经验,享受密码学的成果,就好了。 但是作为一群有技术追求的人,看雪会员愿意在这条已经被千锤百炼的道路上,再多花些精力,反复拷问和推敲各种细节和可能。 我认为这是一种值得推崇的敬业精神!应该鼓励和自我鼓励! 但是出于背景和经历的不同,各个人关注的重点和观点会有不同,有些时候甚至观点相悖。这也是可以理解的。建议大家予以包容,给每个人发言、讨论和进步的机会。 灯,不拨不亮; 理,不辨不明。 我们不害怕争论,但需要理性地争论。 我们不害怕被驳倒,但希望被理性地说服。 我们不欢迎人身攻击。如果遇到不妥言论,作为管理者版主责无旁贷。 |
|
|
|
细分加密方法
sjdkx @看场雪 @tDasm 你们两位都认为细分对提高安全性没有帮助。 请问:例如对一首唐诗加密,现在细分到了字节,依旧使用穷举攻击,现在即使穷举对了一个字节属于哪个汉子都不清楚,您们是如何判断阶段性 ...作为正常用户,可以把一句诗(我们假定是7个汉字),从1个大分组拆成了14个小分组(每个汉字2个字节),看起来 这样每个小分组的‘粗糙度’(这是一个在密码分析中的专业名词)会比1个(明明知道是汉语一句诗的)大分组 要好一些 但攻击者不会约束自己的攻击手法,会把这14个字节联合起来分析。其分析难度与大分组是一样的。 所以,单纯的细化分组并不能对安全提供贡献。 要想细化分组之后能够有所安全收益,还是要对细化后的分组的各种可能数值的出现概率(以及组合的概率)进行专门的设计优化。 |
|
细分加密方法
tDasm 下面举个例子,来分析你那个所谓细分到底起什么作用。假设某加密算法是可以穷举的,现有一段明文,按正常分组只需一组就能完成加密(所谓正常分组就是按加密位数自动分组)。那么穷举只需一次就可以了,假设穷举一次 ...首先,欣赏你这次发言的务实态度,好! 按照你的例子,把大分组切成小分组,只是 1)在小分组里面填充攻击者已知的内容 2)每个小分组使用的key是相同的 这样的切分,当然是对安全没有贡献的 我并不认为,单纯的分组动作 就能提高安全性 相反,实际上现代分组密码算法的分组长度是越来越长了。其目的就是为了让相邻的更多的明文在被加密的时候能产生相互扩散混淆作用 共识讲了,再来谈分歧 为什么有的地方还在用流密码呢?(流密码可以被认为是一类小分组的密码算法,例如 1B的RC4,1bit的A5,ZUC等)其必然有存在的价值,在此不赘述了 显然流密码不能使得多个相邻明文产生扩散混淆作用,是一个坏消息。那么它们该如何保障安全性的? 有几种办法: 1)在密钥上做文章:足够长的密钥,一次一密。至于这密钥是哪来的?我们丢给其它算法去解决吧 2)在明文上做文章:消除明文值之间的不均衡,使得对手即使猜对了密钥也不知道他猜对了 3)在算法上做文章:通过扩展算法空间,使得对手不能猜测新分组所使用的算法 以上3种手法,在密码学中都有理论描述且都有实践尝试,在此不再赘述 最后,我并未创造什么新概念。谢谢参与讨论。 |
|
细分加密方法
tDasm 看场雪 如果分组本身不长(分组可以被穷举)且分组中存在着明显的不均衡(有的分组值出现概率大或小),那就容易被攻击 相反 如果分组长(例如:1024bit) ...好的,我举个例子 假如要对一个.c文件加密,可以把明文进行分组 我们来看3个例子:以16byte为单位进行分组,或者以1byte为单位,或者以1bit为单位 当以16byte为单位时,攻击者已知密文,包括第一个分组的密文,想猜测第一个分组的密钥 我们知道这16byte极有可能是这样几种模式: "#include"+???????? "#ifdef"+?????????? "/*"+?????????????? 所以攻击者可以穷举所有可能的密钥 对密文解密,看看哪些key能够解出上述模式 如果找到了,那就是第一个分组的key的候选 如果加密算法的工作模式选择得不够谨慎,那么很有可能 利用第一个分组的候选key就能极大加速对后续分组的密文的破解 在这个例子中,这16byte的明文 理论上有2^128种可能的分组值,但是由于其中有少数分组的概率远大于其它可能性,所以造成了这种攻击的可能 再看1byte分组的例子 攻击者还是已知第一个分组的密文,试图破解第一个分组的key 方法与上述类似,不再赘述 但是在1byte模式下,拥有高概率的分组值 所占的比例 明显小于16byte的情形。攻击难度加大 再看1bit的情况 这种概率分布不均衡的状态被进一步弱化(尽管还是有不均衡)。攻击难度更大 在密码算法的设计中,设计者不能假设明文中的各种分组值的概率是均衡的。而为了削弱上述攻击所造成的的威胁,必须要让分组更大。 如果分组一定要很小(例如 电报加密、信道加密、浏览器加密等)则只好打破上述攻击的一个条件:“加密算法的工作模式选择得不够谨慎”。要谨慎选择加密算法的工作模式! 希望达到的效果是: 1)每个分组都是用不相关的key,例如 38楼提到的one time pad 2)明文集合中的每个可能的明文的出现概率都是均衡的(我再次强调,这一点是不容易做到的。如果有人对此还有疑问,我们还可以展开讨论) 最后,欢迎讨论技术。把事情说清楚就好,不必过多对他人进行负面评价。 贬低他人,除了能让自己感觉出了口气以外,并不有助于提高自己在圈内的身价,反而可能有损于自身的技术形象。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值