문제

Can anybody confirm this:

ASN.1 DER already requires that integers start with a zero bit if non-negative.

I looked from the ANS1 DER specification but didnt find anything about that.

도움이 되었습니까?

해결책

"The contents octets shall be a two's complement binary number equal to the integer value" says X.690, #8.3. This specifies what you seek.

In addition to that:

If the contents octets of an integer value encoding consist of more than one octet, then the bits of the first octet and bit 8 of the second octet: a) shall not all be ones; and b) shall not all be zero. These rules ensure that an integer value is always encoded in the smallest possible number of octets.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top