idnits 2.17.1 draft-whited-precis-test-vectors-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 18, 2018) is 2047 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'Unicode' Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 PRECIS S. Whited 3 Internet-Draft Individual 4 Intended status: Standards Track September 18, 2018 5 Expires: March 22, 2019 7 Preparation, Enforcement, and Comparison of Internationalized Strings 8 (PRECIS) Test Vectors 9 draft-whited-precis-test-vectors-02 11 Abstract 13 This document contains machine readable test vectors for several 14 Preparation, Enforcement, and Comparison of Internationalized Strings 15 (PRECIS) profiles. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on March 22, 2019. 34 Copyright Notice 36 Copyright (c) 2018 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (https://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 2 53 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 3 55 2.1. Methodology . . . . . . . . . . . . . . . . . . . . . . . 3 56 2.2. Enforcement Tests . . . . . . . . . . . . . . . . . . . . 3 57 2.2.1. Basic . . . . . . . . . . . . . . . . . . . . . . . . 3 58 2.2.2. Context Rule 1 . . . . . . . . . . . . . . . . . . . 3 59 2.2.3. Context Rule 2 . . . . . . . . . . . . . . . . . . . 4 60 2.2.4. Context Rule 3 . . . . . . . . . . . . . . . . . . . 5 61 2.2.5. Context Rule 4 . . . . . . . . . . . . . . . . . . . 5 62 2.2.6. Context Rule 5+6 . . . . . . . . . . . . . . . . . . 5 63 2.2.7. Context Rule 7 . . . . . . . . . . . . . . . . . . . 6 64 2.2.8. Context Rule 8+9 . . . . . . . . . . . . . . . . . . 6 65 2.2.9. Nickname . . . . . . . . . . . . . . . . . . . . . . 6 66 2.2.10. OpaqueString . . . . . . . . . . . . . . . . . . . . 7 67 2.2.11. UsernameCaseMapped . . . . . . . . . . . . . . . . . 8 68 2.2.12. UsernameCasePreserved . . . . . . . . . . . . . . . . 10 69 2.2.13. UsernameCaseMappedRestricted . . . . . . . . . . . . 10 70 2.3. Comparison Tests . . . . . . . . . . . . . . . . . . . . 10 71 2.3.1. Nickname . . . . . . . . . . . . . . . . . . . . . . 10 72 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 73 4. Security Considerations . . . . . . . . . . . . . . . . . . . 11 74 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 75 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 11 76 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 11 78 1. Introduction 80 1.1. Overview 82 This document contains machine readable test vectors for several 83 Preparation, Enforcement, and Comparison of Internationalized Strings 84 (PRECIS) [RFC8264] profiles. 86 Two sets of vectors exist for profiles of the base classes. The 87 first set tests the enforcement step. It takes the form of a table 88 that contains an input string, an output string and an optional 89 error. If the error column has a value of "ctx" it indicates that 90 the context rule was violated, "empty" means that an empty string was 91 disallowed, "rune" means that a disallowed code point (rune) was 92 encountered, and "bidi" indicates that the BIDI Rule was violated. 93 The second set tests the PRECIS comparison step. It takes the form 94 of a table that contains two strings, a boolean that is TRUE if the 95 two strings should be considered equal and FALSE otherwise, and an 96 optional comment. 98 Vectors for inclusion of code points in the IdentifierClass and 99 FreeformClass are not included. A complete list of valid inputs and 100 Outputs for the derived property algorithm specified in [RFC8264] can 101 be found in the IANA "PRECIS Derived Property Value" registry. 103 1.2. Terminology 105 Many important terms used in this document are defined in [RFC8264], 106 [RFC6365], and [Unicode]. 108 2. Test Vectors 110 2.1. Methodology 112 The test vectors in this document have been verified by three 113 independent implementations. An implementation that concurs with the 114 results provided in this document should be interoperable with other 115 implementations. 117 Input and output strings are expressed as UTF-8 and hexidecimal 118 encoded byte strings. 120 2.2. Enforcement Tests 122 2.2.1. Basic 124 +------------+----------+-----+ 125 | Input | Output | Err | 126 +------------+----------+-----+ 127 | 65cc81cc9f | c3a9cc9f | | 128 +------------+----------+-----+ 130 2.2.2. Context Rule 1 131 +------------------------------+------------------------------+-----+ 132 | Input | Output | Err | 133 +------------------------------+------------------------------+-----+ 134 | e2808c | | ctx | 135 | e2808c61 | | ctx | 136 | 61e2808c | | ctx | 137 | e2808cd8a7 | | ctx | 138 | d8ace2808c | | ctx | 139 | d890e2808cd890d8a7 | | ctx | 140 | d8acd890e2808cd890 | | ctx | 141 | d8ace2808cd8a7 | d8ace2808cd8a7 | | 142 | d8acd890e2808cd890d8a7 | d8acd890e2808cd890d8a7 | | 143 | d8acd890d890e2808cd890d890d8 | d8acd890d890e2808cd890d890d8 | | 144 | a7 | a7 | | 145 | d8acd890e2808cd8a7 | d8acd890e2808cd8a7 | | 146 | d8ace2808cd890d8a7 | d8ace2808cd890d8a7 | | 147 | eaa1b2e2808cd8ac | eaa1b2e2808cd8ac | | 148 | eaa1b2d890e2808cd890d8ac | eaa1b2d890e2808cd890d8ac | | 149 | eaa1b2d890d890e2808cd890d890 | eaa1b2d890d890e2808cd890d890 | | 150 | d8ac | d8ac | | 151 | eaa1b2d890e2808cd8ac | eaa1b2d890e2808cd8ac | | 152 | eaa1b2e2808cd890d8ac | eaa1b2e2808cd890d8ac | | 153 | e0a98de2808c | e0a98de2808c | | 154 | eaa1b2e0a98de2808c | eaa1b2e0a98de2808c | | 155 | eaa1b2e0a98dd890e2808c | | ctx | 156 | eaa1b2e0a98dd890e2808c | | ctx | 157 | e0ab8de2808c | e0ab8de2808c | | 158 | eaa1b2e0ab8de2808c | eaa1b2e0ab8de2808c | | 159 | eaa1b2e0ab8dd890e2808c | | ctx | 160 | eaa1b2e0ab8dd890e2808c | | ctx | 161 | eaa1b2e0ab8de2808cd8ac | eaa1b2e0ab8de2808cd8ac | | 162 | eaa1b2e2808ce0ab8dd8ac | eaa1b2e2808ce0ab8dd8ac | | 163 +------------------------------+------------------------------+-----+ 165 2.2.3. Context Rule 2 167 +--------------------+--------------------+-----+ 168 | Input | Output | Err | 169 +--------------------+--------------------+-----+ 170 | e2808d | | ctx | 171 | e2808d61 | | ctx | 172 | 61e2808d | | ctx | 173 | e0a98de2808d | e0a98de2808d | | 174 | eaa1b2e0a98de2808d | eaa1b2e0a98de2808d | | 175 | e0a98d61e2808d | | ctx | 176 +--------------------+--------------------+-----+ 178 2.2.4. Context Rule 3 180 +--------------+--------------+-----+ 181 | Input | Output | Err | 182 +--------------+--------------+-----+ 183 | c2b7 | | ctx | 184 | 6cc2b7 | | ctx | 185 | c2b76c | | ctx | 186 | 61c2b7 | | ctx | 187 | 6cc2b761 | | ctx | 188 | 61c2b761 | | ctx | 189 | 6cc2b76c | 6cc2b76c | | 190 | 616cc2b76c61 | 616cc2b76c61 | | 191 +--------------+--------------+-----+ 193 2.2.5. Context Rule 4 195 +------------------+------------------+-----+ 196 | Input | Output | Err | 197 +------------------+------------------+-----+ 198 | cdb5 | | ctx | 199 | cdb561 | | ctx | 200 | ceb1cdb5 | | ctx | 201 | cdb5ceb1 | cdb5ceb1 | | 202 | ceb1cdb5ceb1 | ceb1cdb5ceb1 | | 203 | cdb5cdb5ceb1 | cdb5cdb5ceb1 | | 204 | ceb1cdb5cdb5ceb1 | ceb1cdb5cdb5ceb1 | | 205 | ceb1cdb5cdb5 | | ctx | 206 | ceb1cdb5cdb561 | | ctx | 207 +------------------+------------------+-----+ 209 2.2.6. Context Rule 5+6 211 +--------------------+--------------------+-----+ 212 | Input | Output | Err | 213 +--------------------+--------------------+-----+ 214 | d7b3 | | ctx | 215 | d7b3d794 | | ctx | 216 | 61d7b362 | | ctx | 217 | d7a9d7b3 | d7a9d7b3 | | 218 | d7a9d7b3d7b3d7b3 | d7a9d7b3d7b3d7b3 | | 219 | d7b4 | | ctx | 220 | d7b4d794 | | ctx | 221 | 61d7b462 | | ctx | 222 | d7a9d7b4 | d7a9d7b4 | | 223 | d7a9d7b4d7b4d7b4 | d7a9d7b4d7b4d7b4 | | 224 | 61d7a9d7b4d7b4d7b4 | 61d7a9d7b4d7b4d7b4 | | 225 +--------------------+--------------------+-----+ 227 2.2.7. Context Rule 7 229 +------------------------+------------------------+-----+ 230 | Input | Output | Err | 231 +------------------------+------------------------+-----+ 232 | e383bb | | ctx | 233 | 616263e383bb | | ctx | 234 | e383bb646566 | | ctx | 235 | 616263e383bb646566 | | ctx | 236 | 61e3838563e383bb646566 | 61e3838563e383bb646566 | | 237 | 616263e383bb64e381b666 | 616263e383bb64e381b666 | | 238 | e2ba906263e383bb646566 | e2ba906263e383bb646566 | | 239 +------------------------+------------------------+-----+ 241 2.2.8. Context Rule 8+9 243 +--------------------------+----------------------+-----+ 244 | Input | Output | Err | 245 +--------------------------+----------------------+-----+ 246 | d9a1d9a2d9a3d9a4d9a5dbb6 | | ctx | 247 | dbb1dbb2dbb3dbb4dbb5d9a6 | | ctx | 248 | d9a1d9a2d9a3d9a4d9a5 | d9a1d9a2d9a3d9a4d9a5 | | 249 | dbb1dbb2dbb3dbb4dbb5 | dbb1dbb2dbb3dbb4dbb5 | | 250 +--------------------------+----------------------+-----+ 252 2.2.9. Nickname 253 +---------------------------------------+---------------------+-----+ 254 | Input | Output | Err | 255 +---------------------------------------+---------------------+-----+ 256 | 20205377616e20206f6620202041766f6e202 | 5377616e206f6620417 | | 257 | 020 | 66f6e | | 258 | | | emp | 259 | | | ty | 260 | 20 | | emp | 261 | | | ty | 262 | 2020 | | emp | 263 | | | ty | 264 | 61c2a061e19a8061e2808061e2808161e2808 | 6120612061206120612 | | 265 | 261e2808361e2808461e2808561e2808661e2 | 0612061206120612061 | | 266 | 808761e2808861e2808961e2808a61e280af6 | 2061206120612061206 | | 267 | 1e2819f61e3808061 | 120612061 | | 268 | 466f6f | 466f6f | | 269 | 666f6f | 666f6f | | 270 | 466f6f20426172 | 466f6f20426172 | | 271 | 666f6f20626172 | 666f6f20626172 | | 272 | cea3 | cea3 | | 273 | cf83 | cf83 | | 274 | cf82 | cf82 | | 275 | e2999a | e2999a | | 276 | 5269636861726420e285a3 | 5269636861726420495 | | 277 | | 6 | | 278 | e284ab | c385 | | 279 | efac80 | 6666 | | 280 | d7a961 | d7a961 | | 281 | eb8f99ec9dbceca1b0eab1b4ebb380eab2bde | eb8f99ec9dbceca1b0e | | 282 | d9788eb9dbd | ab1b4ebb380eab2bded | | 283 | | 9788eb9dbd | | 284 +---------------------------------------+---------------------+-----+ 286 2.2.10. OpaqueString 287 +---------------------------------------+---------------------+-----+ 288 | Input | Output | Err | 289 +---------------------------------------+---------------------+-----+ 290 | 20205377616e20206f6620202041766f6e202 | 20205377616e20206f6 | | 291 | 020 | 620202041766f6e2020 | | 292 | | 20 | | 293 | | | emp | 294 | | | ty | 295 | 20 | 20 | | 296 | 2020 | 2020 | | 297 | 61c2a061e19a8061e2808061e2808161e2808 | 6120612061206120612 | | 298 | 261e2808361e2808461e2808561e2808661e2 | 0612061206120612061 | | 299 | 808761e2808861e2808961e2808a61e280af6 | 2061206120612061206 | | 300 | 1e2819f61e3808061 | 120612061 | | 301 | 466f6f | 466f6f | | 302 | 666f6f | 666f6f | | 303 | 466f6f20426172 | 466f6f20426172 | | 304 | 666f6f20626172 | 666f6f20626172 | | 305 | cf83 | cf83 | | 306 | 5269636861726420e285a3 | 5269636861726420e28 | | 307 | | 5a3 | | 308 | e284ab | c385 | | 309 | 4a61636b206f6620e299a673 | 4a61636b206f6620e29 | | 310 | | 9a673 | | 311 | 6d7920636174206973206120096279 | | run | 312 | | | e | 313 | d7a961 | d7a961 | | 314 +---------------------------------------+---------------------+-----+ 316 2.2.11. UsernameCaseMapped 317 +-----------------------------+------------------------------+------+ 318 | Input | Output | Err | 319 +-----------------------------+------------------------------+------+ 320 | 6a756c696574406578616d706c6 | 6a756c696574406578616d706c65 | | 321 | 52e636f6d | 2e636f6d | | 322 | 6675737362616c6c | 6675737362616c6c | | 323 | 6675c39f62616c6c | 6675c39f62616c6c | | 324 | cf80 | cf80 | | 325 | cea3 | cf83 | | 326 | cf83 | cf83 | | 327 | cf82 | cf82 | | 328 | 49 | 69 | | 329 | 49 | 69 | | 330 | cf92 | | rune | 331 | ceb0 | ceb0 | | 332 | 666f6f20626172 | | rune | 333 | e2999a | | bidi | 334 | 7e | 7e | | 335 | 61 | 61 | | 336 | 21 | 21 | | 337 | c2b2 | | bidi | 338 | 09 | | rune | 339 | 0a | | rune | 340 | e29b96 | | bidi | 341 | e29bbf | | bidi | 342 | efac80 | | rune | 343 | e19a80 | | bidi | 344 | 20 | | rune | 345 | 2020 | | rune | 346 | c785 | | rune | 347 | e19bae | | rune | 348 | d288 | | bidi | 349 | e284ab | c3a5 | | 350 | 41cc8a | c3a5 | | 351 | c385 | c3a5 | | 352 | c3a7 | c3a7 | | 353 | 63cca7 | c3a7 | | 354 | c598 | c599 | | 355 | 52cc8c | c599 | | 356 | e1b9a1 | e1b9a1 | | 357 | d090 | d0b0 | | 358 | efbca1efbca2 | 6162 | | 359 | d7a963 | | bidi | 360 +-----------------------------+------------------------------+------+ 362 2.2.12. UsernameCasePreserved 364 +--------------+--------+------+ 365 | Input | Output | Err | 366 +--------------+--------+------+ 367 | 414243 | 414243 | | 368 | efbca1efbca2 | 4142 | | 369 | d7a963 | | bidi | 370 | efac80 | | rune | 371 | e284ab | c385 | | 372 | e1ba9b | | rune | 373 +--------------+--------+------+ 375 2.2.13. UsernameCaseMappedRestricted 377 +--------------------------------------+--------+------+ 378 | Input | Output | Err | 379 +--------------------------------------+--------+------+ 380 | 6a756c696574406578616d706c652e636f6d | | rune | 381 | 49 | 69 | | 382 +--------------------------------------+--------+------+ 384 2.3. Comparison Tests 386 2.3.1. Nickname 388 +-----------------------------------+----------------------+--------+ 389 | A | B | Result | 390 +-----------------------------------+----------------------+--------+ 391 | 61 | 62 | false | 392 | 20205377616e20206f6620202041766f6 | 7377616e206f66206176 | true | 393 | e202020 | 6f6e | | 394 | 466f6f | 666f6f | true | 395 | 666f6f | 666f6f | true | 396 | 466f6f20426172 | 666f6f20626172 | true | 397 | 666f6f20626172 | 666f6f20626172 | true | 398 | cea3 | cf83 | true | 399 | cea3 | cf82 | false | 400 | cf83 | cf82 | false | 401 | 5269636861726420e285a3 | 72696368617264206976 | true | 402 | e284ab | c3a5 | true | 403 | efac80 | 6666 | true | 404 | c39f | 7353 | false | 405 | c2a8 | 20cc88 | true | 406 | c2a8 | cc88 | true | 407 | 20cc88 | cc88 | true | 408 +-----------------------------------+----------------------+--------+ 410 3. IANA Considerations 412 This document requires no interaction with the Internet Assigned 413 Numbers Authority (IANA). 415 4. Security Considerations 417 This document is intended to provide test vectors for the PRECIS 418 framework and its profiles. No assertion of the security of the 419 PRECIS framework or its profiles for any particular use is intended. 420 The reader is referred to [RFC8264] for a discussion of the general 421 security of the PRECIS framework. 423 5. References 425 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 426 Internationalization in the IETF", BCP 166, RFC 6365, 427 DOI 10.17487/RFC6365, September 2011, 428 . 430 [RFC8264] Saint-Andre, P. and M. Blanchet, "PRECIS Framework: 431 Preparation, Enforcement, and Comparison of 432 Internationalized Strings in Application Protocols", 433 RFC 8264, DOI 10.17487/RFC8264, October 2017, 434 . 436 [Unicode] The Unicode Consortium, "The Unicode Standard", 437 . 439 Appendix A. Acknowledgements 441 The author would like to thank Marcel van Lohuizen of Google for his 442 help and code reviews on the Go programming language implementation 443 of PRECIS for which these tests were designed and for contributing 444 many of the tests himself. Also, Peter Saint-Andre for his 445 encouragement on this document. 447 Author's Address 449 Sam Whited 450 Individual 452 Email: sam@samwhited.com 453 URI: https://blog.samwhited.com/