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.
任何人都可以确认这一点:
如果非负数,ASN.1 DER 已经要求整数以零位开头。
我查看了 ANS1 DER 规范,但没有找到任何相关信息。
“内容八位字节应是等于整数值的二进制补码”X.690,#8.3 说。这指定了您所寻求的。
在此之上:
如果整数值编码的内容八位位组由多个八位位组组成,则第一个八位位组的位和第二个八位位组的位 8: a) 不应全为 1;b) 不应全为零。这些规则确保整数值始终以尽可能少的八位字节数进行编码。