Identifier encoding for Font Mangling
| Project: | EPUB Maintenance |
| Component: | General |
| Category: | bug report |
| Priority: | normal |
| Assigned: | PSorotokin |
| Status: | completed @ 2.0.1 |
Jump to:
Currently font mangling algorithm does not specify what encoding should be used to calculate SHA-1 hash. It should be clarified (the most obvious choice would be UTF-8)
Amend font mangling document http://www.openebook.org/doc_library/informationaldocs/FontManglingSpec.html as floowing:
In order to create a suitable key that is tied to the publication, a SHA-1 digest of the unique identifier should be generated as specified by the Secure Hash Standard[3]. Before generating the digest, all white space characters as defined by the XML 1.0 specification[4], section 2.3 are removed. Specifically the Unicode code points 0x20, 0x09, 0x0D and 0x0A will be stripped from the string before the digest is computed. The string is then UTF-8-encoded. This digest is then directly used as the key for the algorithm described in the "Obfuscation Algorithm" section.
- Login to post comments

Comments
#1
#2
Proposal is to amend font mangling document http://www.openebook.org/doc_library/informationaldocs/FontManglingSpec.html as floowing:
In order to create a suitable key that is tied to the publication, a SHA-1 digest of the unique identifier should be generated as specified by the Secure Hash Standard[3]. Before generating the digest, all white space characters as defined by the XML 1.0 specification[4], section 2.3 are removed. Specifically the Unicode code points 0x20, 0x09, 0x0D and 0x0A will be stripped from the string before the digest is computed. The string is then UTF-8-encoded. This digest is then directly used as the key for the algorithm described in the "Obfuscation Algorithm" section.
#3
#4