Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
作为一个小项目(没有关键任务),我决定尝试用 C# 编写 GOST 28147-89 的实现。但是,在阅读RFC 5830(定义 GOST 28147-89 的信息)时,我注意到了这一点。
(+) 是相同长度的字模 2 的按位相加。 [+] 是 32 位向量模 2^32 的加法。
(+) 是相同长度的字模 2 的按位相加。
[+] 是 32 位向量模 2^32 的加法。
这两者有什么区别,主要是第一个指定按位加法,第二个简单说明加法?
由于它说“模2”,我不得不假设它们只是意味着单独添加每个位而不带进位。
所以
0101 +1111 ------- 1010
我想不出一个特别好的用途,因为它本质上与 xor 相同。