[OpenID] btwoc, base64 and the default DH modulus

Manger, James H James.H.Manger at team.telstra.com
Mon Dec 18 02:22:04 UTC 2006


---
The default Diffie-Hellman modulus is shown in decimal in version 1.1 and in hex in version 2.0predraft11, but would appear in base64(btwoc(…)) in the protocol!
Change Appendix B Diffie-Hellman Key Exchange Default Value to use the base64(btwoc(p)) format, as used in the protocol (see §8.1.2 Diffie-Hellman Request Parameters). 

“Appendix B. Diffie-Hellman Key Exchange Default Value
This is the prime number p used as the default modulus for Diffie-Hellman Key Exchange, in base64(bwtoc(p)) format:
* openid.dh_modulus
  Value: "ANz5OguIOXLsDhmYmsWizjEOHTdxfo2Vcbt2I3MYZuYe91ouJ4mLBX+YkcLiemOc
Pym2CBRYHNOyyjmG0mg3BVd9RcLn5S3IHHoXGHblzqdLFEi/368Ygo79JRnxTkXj
gmY0rxlJ5bU1zIKaSDuKdiI+XUkKJX8Fvf8W8vsixYOr"
”
---
The table in §4.7 Integer Representations is misleading as it unnecessarily introduces \x00 notation and quotes.  Base64-encoding is always applied after btwoc so show this in the table.
Adjust the last sentence to avoid confusion between bytes and strings.
From: “If it is not, implementations MUST add a zero byte at the front of the string.”
To:   “If it is not, add a zero byte at the front.”
Add an extra sentence:
“The base64-encoding of the "btwoc" bytes is transmitted in the protocol.”
Replace the table with the following:
“Base 10 Number | btwoc bytes | base64(btwoc(…))
---------------+-------------+-----------------
0              | 00          | AA==
127            | 7F          | fw==
128            | 00 80       | AIA=
255            | 00 FF       | AP8=
32768          | 00 80 00    | AIAA
”


More information about the specs mailing list