DSAParameters byte[] J - 它是什么?

DSAParameters byte[] J - What is it?

我正在尝试重新创建 DSA public/private 密钥以匹配现有的密钥集。现有的 public 密钥是使用字节数组 P、Q、G、J、Y、Seed、Counter 创建的。 byte[]J的长度为112.

创建 public/private 密钥对时使用..

var dsa = new DSACryptoServiceProvider();
var privateKey = dsa.ExportParameters(true);
var publicKey = dsa.ExportParameters(false);

.. byte[] J 对于 public 和私钥都是空的。

有谁知道 J 是什么以及如何填充这个数组?我的最终目标是创建一个大小相同的 public 密钥,包括 byte[] J。

谢谢。

J 似乎是出于效率原因引入的 可选 参数。由PQ确定,根据RFC 3275, section 4.4.2.1规定XML数字签名处理规则和句法定义为J = (P - 1) / Q

根据定义,P - 1Q 的倍数(DSA, section Parameter generation). The quotient (P - 1) / Q is needed e.g. for the determination of the domain parameters, especially the generation of the generator, see FIPS PUB 186-4, section A.2

我希望密钥的 J 参数与密钥的 PQ 参数中计算出的 J 参数相匹配根据上面的等式。

我无法解释为什么 DSACryptoServiceProvider-class 不计算 J 参数。我只能推测,由于可选性,某些实现会计算 J 参数,而其他实现不会(或不再计算),并且是否设置此参数对签名和验证无关紧要.

2001 年来自 Brian LaMacchia 的邮件也提供了信息,当时他是 MS Windows 安全的密码学架构师,他讨论了 J 参数的目的,here, with Donald Eastlake, here.后者附有草稿,后来在RFC 3275中使用。