asciidoctor-rfc 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.oss-guides.rubocop.yml +1077 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +19 -1063
  6. data/.travis.yml +3 -2
  7. data/Guardfile +22 -0
  8. data/README.adoc +1151 -0
  9. data/Rakefile +1 -1
  10. data/asciidoctor-rfc.gemspec +20 -3
  11. data/bin/asciidoctor-rfc2 +15 -0
  12. data/bin/asciidoctor-rfc3 +15 -0
  13. data/bin/rspec +0 -1
  14. data/lib/asciidoctor-rfc.rb +4 -0
  15. data/lib/asciidoctor/rfc/common/base.rb +218 -0
  16. data/lib/asciidoctor/rfc/common/front.rb +120 -0
  17. data/lib/asciidoctor/rfc/v2/base.rb +341 -0
  18. data/lib/asciidoctor/rfc/v2/blocks.rb +192 -0
  19. data/lib/asciidoctor/rfc/v2/converter.rb +64 -0
  20. data/lib/asciidoctor/rfc/v2/front.rb +69 -0
  21. data/lib/asciidoctor/rfc/v2/inline_anchor.rb +102 -0
  22. data/lib/asciidoctor/rfc/v2/lists.rb +134 -0
  23. data/lib/asciidoctor/rfc/v2/table.rb +112 -0
  24. data/lib/asciidoctor/rfc/v2/validate.rb +738 -0
  25. data/lib/asciidoctor/rfc/v2/validate2.rng +716 -0
  26. data/lib/asciidoctor/rfc/v3/base.rb +358 -0
  27. data/lib/asciidoctor/rfc/v3/blocks.rb +203 -0
  28. data/lib/asciidoctor/rfc/v3/converter.rb +64 -0
  29. data/lib/asciidoctor/rfc/v3/front.rb +115 -0
  30. data/lib/asciidoctor/rfc/v3/inline_anchor.rb +90 -0
  31. data/lib/asciidoctor/rfc/v3/lists.rb +190 -0
  32. data/lib/asciidoctor/rfc/v3/svg.rng +9081 -0
  33. data/lib/asciidoctor/rfc/v3/table.rb +65 -0
  34. data/lib/asciidoctor/rfc/v3/validate.rb +2168 -0
  35. data/lib/asciidoctor/rfc/v3/validate.rng +2143 -0
  36. data/lib/asciidoctor/rfc/version.rb +2 -2
  37. data/spec/asciidoctor/rfc/v2/appendix_spec.rb +124 -0
  38. data/spec/asciidoctor/rfc/v2/area_spec.rb +60 -0
  39. data/spec/asciidoctor/rfc/v2/author_spec.rb +444 -0
  40. data/spec/asciidoctor/rfc/v2/comments_spec.rb +316 -0
  41. data/spec/asciidoctor/rfc/v2/crossref_spec.rb +205 -0
  42. data/spec/asciidoctor/rfc/v2/date_spec.rb +166 -0
  43. data/spec/asciidoctor/rfc/v2/dlist_spec.rb +108 -0
  44. data/spec/asciidoctor/rfc/v2/document_spec.rb +161 -0
  45. data/spec/asciidoctor/rfc/v2/example_spec.rb +50 -0
  46. data/spec/asciidoctor/rfc/v2/front_spec.rb +75 -0
  47. data/spec/asciidoctor/rfc/v2/image_spec.rb +81 -0
  48. data/spec/asciidoctor/rfc/v2/indexterm_spec.rb +66 -0
  49. data/spec/asciidoctor/rfc/v2/inline_formatting_spec.rb +177 -0
  50. data/spec/asciidoctor/rfc/v2/keyword_spec.rb +63 -0
  51. data/spec/asciidoctor/rfc/v2/listing_spec.rb +59 -0
  52. data/spec/asciidoctor/rfc/v2/literal_spec.rb +53 -0
  53. data/spec/asciidoctor/rfc/v2/olist_spec.rb +147 -0
  54. data/spec/asciidoctor/rfc/v2/paragraph_spec.rb +68 -0
  55. data/spec/asciidoctor/rfc/v2/preamble_spec.rb +140 -0
  56. data/spec/asciidoctor/rfc/v2/quote_spec.rb +24 -0
  57. data/spec/asciidoctor/rfc/v2/references_spec.rb +96 -0
  58. data/spec/asciidoctor/rfc/v2/section_spec.rb +260 -0
  59. data/spec/asciidoctor/rfc/v2/sidebar_spec.rb +32 -0
  60. data/spec/asciidoctor/rfc/v2/table_spec.rb +293 -0
  61. data/spec/asciidoctor/rfc/v2/ulist_spec.rb +96 -0
  62. data/spec/asciidoctor/rfc/v2/workgroup_spec.rb +60 -0
  63. data/spec/asciidoctor/rfc/v3/appendix_spec.rb +130 -0
  64. data/spec/asciidoctor/rfc/v3/area_spec.rb +63 -0
  65. data/spec/asciidoctor/rfc/v3/author_spec.rb +540 -0
  66. data/spec/asciidoctor/rfc/v3/comments_spec.rb +308 -0
  67. data/spec/asciidoctor/rfc/v3/crossref_spec.rb +269 -0
  68. data/spec/asciidoctor/rfc/v3/date_spec.rb +149 -0
  69. data/spec/asciidoctor/rfc/v3/dlist_spec.rb +121 -0
  70. data/spec/asciidoctor/rfc/v3/document_spec.rb +109 -0
  71. data/spec/asciidoctor/rfc/v3/example_spec.rb +34 -0
  72. data/spec/asciidoctor/rfc/v3/front_spec.rb +43 -0
  73. data/spec/asciidoctor/rfc/v3/image_spec.rb +81 -0
  74. data/spec/asciidoctor/rfc/v3/indexterm_spec.rb +69 -0
  75. data/spec/asciidoctor/rfc/v3/inline_formatting_spec.rb +319 -0
  76. data/spec/asciidoctor/rfc/v3/keyword_spec.rb +33 -0
  77. data/spec/asciidoctor/rfc/v3/link_spec.rb +34 -0
  78. data/spec/asciidoctor/rfc/v3/listing_spec.rb +59 -0
  79. data/spec/asciidoctor/rfc/v3/literal_spec.rb +51 -0
  80. data/spec/asciidoctor/rfc/v3/olist_spec.rb +168 -0
  81. data/spec/asciidoctor/rfc/v3/paragraph_spec.rb +73 -0
  82. data/spec/asciidoctor/rfc/v3/preamble_spec.rb +112 -0
  83. data/spec/asciidoctor/rfc/v3/quote_spec.rb +91 -0
  84. data/spec/asciidoctor/rfc/v3/references_spec.rb +147 -0
  85. data/spec/asciidoctor/rfc/v3/section_spec.rb +198 -0
  86. data/spec/asciidoctor/rfc/v3/series_info_spec.rb +151 -0
  87. data/spec/asciidoctor/rfc/v3/sidebar_spec.rb +30 -0
  88. data/spec/asciidoctor/rfc/v3/table_spec.rb +275 -0
  89. data/spec/asciidoctor/rfc/v3/ulist_spec.rb +74 -0
  90. data/spec/asciidoctor/rfc/v3/workgroup_spec.rb +33 -0
  91. data/spec/examples/davies-template-bare-06.adoc +361 -0
  92. data/spec/examples/davies-template-bare-06.xml.orig +426 -0
  93. data/spec/examples/example-v2.adoc +181 -0
  94. data/spec/examples/example-v2.xml +675 -0
  95. data/spec/examples/example-v3.adoc +185 -0
  96. data/spec/examples/example-v3.xml +1009 -0
  97. data/spec/examples/mib-doc-template-xml-06.adoc +596 -0
  98. data/spec/examples/mib-doc-template-xml-06.xml.orig +654 -0
  99. data/spec/examples/rfc1149.md +76 -0
  100. data/spec/examples/rfc1149.md.2.xml +94 -0
  101. data/spec/examples/rfc1149.md.3.xml +93 -0
  102. data/spec/examples/rfc1149.md.adoc +65 -0
  103. data/spec/examples/rfc2100.md +149 -0
  104. data/spec/examples/rfc2100.md.2.xml +169 -0
  105. data/spec/examples/rfc2100.md.3.xml +163 -0
  106. data/spec/examples/rfc2100.md.adoc +136 -0
  107. data/spec/examples/rfc3514.md +203 -0
  108. data/spec/examples/rfc3514.md.2.xml +238 -0
  109. data/spec/examples/rfc3514.md.3.xml +258 -0
  110. data/spec/examples/rfc3514.md.adoc +324 -0
  111. data/spec/examples/rfc5841.md +342 -0
  112. data/spec/examples/rfc5841.md.2.xml +393 -0
  113. data/spec/examples/rfc5841.md.3.xml +449 -0
  114. data/spec/examples/rfc5841.md.adoc +414 -0
  115. data/spec/examples/rfc6350.adoc +3499 -0
  116. data/spec/examples/rfc6350.bib +763 -0
  117. data/spec/examples/rfc748.md +79 -0
  118. data/spec/examples/rfc748.md.2.xml +116 -0
  119. data/spec/examples/rfc748.md.3.xml +109 -0
  120. data/spec/examples/rfc748.md.adoc +80 -0
  121. data/spec/examples/rfc7511.md +257 -0
  122. data/spec/examples/rfc7511.md.2.xml +300 -0
  123. data/spec/examples/rfc7511.md.3.xml +347 -0
  124. data/spec/examples/rfc7511.md.adoc +417 -0
  125. data/spec/spec_helper.rb +115 -5
  126. metadata +274 -9
  127. data/.hound.yml +0 -3
  128. data/README.md +0 -84
  129. data/lib/asciidoctor/rfc.rb +0 -7
  130. data/spec/asciidoctor-rfc/.keep +0 -0
@@ -0,0 +1,675 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <rfc ipr="trust200902" obsoletes="10, 120" updates="2010, 2120" category="info" submissionType="IETF" number="rfc-1149">
3
+ <front>
4
+
5
+ <title abbrev="IP Datagrams on Avian Carriers">RFC XML v2 Example: A Standard for the Transmission of IP Datagrams on Avian Carriers</title>
6
+
7
+ <author fullname="David Waitzman" surname="Waitzman">
8
+
9
+ <organization>BBN STC</organization>
10
+
11
+ <address>
12
+
13
+ <postal>
14
+
15
+ <street>10 Moulton Street</street>
16
+
17
+ <city>Cambridge</city>
18
+
19
+ <code>MA 02238</code>
20
+
21
+ </postal>
22
+
23
+ <phone>(617) 873-4323</phone>
24
+
25
+ <email>dwaitzman@BBN.COM</email>
26
+
27
+ <uri>http://bbn.com</uri>
28
+
29
+ </address>
30
+
31
+ </author>
32
+
33
+ <author fullname="Nick Nicholas" surname="Nicholas">
34
+
35
+ <organization>BBN STC</organization>
36
+
37
+ <address>
38
+
39
+ <postal>
40
+
41
+ <street>10 Moulton Street</street>
42
+
43
+ <city>Cambridge</city>
44
+
45
+ <code>MA 02238</code>
46
+
47
+ </postal>
48
+
49
+ <phone>(617) 873-4323</phone>
50
+
51
+ <email>opoudjis@gmail.com</email>
52
+
53
+ <uri>http://opoudjis.net</uri>
54
+
55
+ </address>
56
+
57
+ </author>
58
+
59
+ <date day="1" month="April" year="1990"/>
60
+
61
+ <area>Internet</area>
62
+
63
+ <workgroup>Network Working Group</workgroup>
64
+
65
+ <keyword>this</keyword>
66
+
67
+ <keyword>that</keyword>
68
+
69
+
70
+ <abstract>
71
+ <t>Avian carriers can provide high delay, low throughput, and low
72
+
73
+ altitude service. The connection topology is limited to a single
74
+
75
+ point-to-point path for each carrier, used with standard carriers,
76
+
77
+ but many carriers can be used without significant interference with
78
+
79
+ each other, outside of early spring. This is because of the 3D ether
80
+
81
+ space available to the carriers, in contrast to the 1D ether used by
82
+
83
+ IEEE802.3. The carriers have an intrinsic collision avoidance
84
+
85
+ system, which increases availability. Unlike some network
86
+
87
+ technologies, such as packet radio, communication is not limited to
88
+
89
+ line-of-sight distance. Connection oriented service is available in
90
+
91
+ some cities, usually based upon a central hub topology.</t>
92
+ </abstract>
93
+ <note title="NOTE">
94
+
95
+ <t>Yes, this is an April Fool&amp;#8217;s RFC.</t>
96
+
97
+ </note>
98
+ </front><middle>
99
+ <section anchor="frame" title="Frame Format"><t>The IP <spanx style="emph">datagram</spanx> is <spanx style="strong">printed</spanx>, on a small scroll of paper, in
100
+
101
+
102
+
103
+ hexadecimal, with each octet separated by whitestuff and blackstuff.
104
+
105
+
106
+
107
+ The scroll of paper is wrapped around one leg of the avian carrier.
108
+
109
+
110
+
111
+ A band of duct tape is used to secure the datagram’s edges. The
112
+
113
+
114
+
115
+ bandwidth is limited to the leg length. The MTU is variable, and
116
+
117
+
118
+
119
+ paradoxically, generally increases with increased carrier age. A
120
+
121
+
122
+
123
+ typical MTU is 256 milligrams. Some datagram padding may be needed.<xref target="RFC7253">alt</xref></t>
124
+
125
+ <t>Upon receipt, the duct tape is removed and the paper copy of the
126
+
127
+
128
+
129
+ datagram is optically scanned into a electronically transmittable
130
+
131
+
132
+
133
+ form.<xref target="RFC7253"/></t>
134
+
135
+ <t>This document extends OpenPGP and its ECC extension to support SM2, SM3 and SM4:</t>
136
+
137
+ <t>
138
+
139
+
140
+
141
+ <list style="symbols">
142
+
143
+
144
+
145
+ <t>support the SM3 hash algorithm for data validation purposes</t>
146
+
147
+
148
+
149
+ <t>support signatures utilizing the combination of SM3 with other digital
150
+
151
+
152
+
153
+ signing algorithms, such as RSA, ECDSA and SM2</t>
154
+
155
+
156
+
157
+ <t>support the SM2 asymmetric encryption algorithm for public key
158
+
159
+
160
+
161
+ operations</t>
162
+
163
+
164
+
165
+ <t>support usage of SM2 in combination with supported hash algorithms, such as
166
+
167
+
168
+
169
+ SHA-256 and SM3</t>
170
+
171
+
172
+
173
+ <t>support the SM4 symmetric encryption algorithm for data protection purposes</t>
174
+
175
+
176
+
177
+ <t>defines the OpenPGP profile "OSCCA-SM234" to enable usage of OpenPGP
178
+
179
+
180
+
181
+ in an OSCCA-compliant manner.</t>
182
+
183
+
184
+
185
+ </list>
186
+
187
+
188
+
189
+ </t>
190
+
191
+ <t>Algorithm-Specific Fields for SM2DSA keys:</t>
192
+
193
+ <t>
194
+
195
+
196
+
197
+ <list style="symbols">
198
+
199
+
200
+
201
+ <t>a variable-length field containing a curve OID, formatted
202
+
203
+
204
+
205
+ as follows:<list style="format %c">
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <t>a one-octet size of the following field; values 0 and
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ 0xFF are reserved for future extensions</t>
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+ <t>octets representing a curve OID.</t>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ </list></t>
238
+
239
+
240
+
241
+ <t>MPI of an EC point representing a public key</t>
242
+
243
+
244
+
245
+ </list>
246
+
247
+
248
+
249
+ </t>
250
+
251
+ <section anchor="_definitions" title="Definitions"><t>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+ <list style="hanging">
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+ <t hangText="OSCCA-compliant">All cryptographic algorithms used are compliant with OSCCA regulations.</t>
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ <t hangText="SM2DSA">The elliptic curve digital signature algorithm. <xref target="ISO.IEC.10118-3"/></t>
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <t hangText="SM2KEP">The elliptic curve key exchange protocol.</t>
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+ <t hangText="SM2PKE">The public key encryption algorithm.</t>
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+ </list>
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+ </t>
308
+
309
+
310
+
311
+ <section anchor="_elliptic_curve_formula" title="Elliptic Curve Formula">
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+ <figure>
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+ <artwork>y^2 = x^3 + ax + b</artwork>
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+ </figure>
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+ </section>
360
+
361
+
362
+
363
+ <section anchor="_curve_parameters" title="Curve Parameters">
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ <figure anchor="curveparam1" title="Curve Parameters Listing">
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+ <artwork>p = FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+ FFFFFFFF 00000000 FFFFFFFF FFFFFFFF
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+ a = FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+ FFFFFFFF 00000000 FFFFFFFF FFFFFFFC
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+ b = 28E9FA9E 9D9F5E34 4D5A9E4B CF6509A7
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+ F39789F5 15AB8F92 DDBCBD41 4D940E93
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+ n = FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+ 7203DF6B 21C6052B 53BBF409 39D54123
500
+
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+ x_G = 32C4AE2C 1F198119 5F990446 6A39C994
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+
531
+ 8FE30BBF F2660BE1 715A4589 334C74C7
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+ y_G = BC3736A2 F4F6779C 59BDCEE3 6B692153
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+ D0A9877C C62A4740 02DF32E5 2139F0A0</artwork>
564
+
565
+
566
+
567
+
568
+
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+ </figure>
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+ </section></section></section>
588
+ <section anchor="_supported_algorithms" title="Supported Algorithms">
589
+
590
+ <section anchor="_public_key_algorithms" title="Public Key Algorithms"><t>The SM2 algorithm is supported with the following extension.<cref>ECDH is defined in Section 8 of this document.</cref></t>
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+ <t>The following public key algorithm IDs are added to expand Section
599
+
600
+
601
+
602
+
603
+
604
+
605
+
606
+ 9.1 of RFC4880, "Public-Key Algorithms":</t>
607
+
608
+
609
+
610
+ <texttable title="Table 2" suppress-title="false" style="all">
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+ <ttcol align="left" width="50%">ID</ttcol>
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+ <ttcol align="left" width="50%">Description of Algorithm</ttcol>
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+ <c>TBD</c>
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+ <c>SM2</c>
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+ </texttable></section>
651
+
652
+ </section>
653
+ <section anchor="_security_considerations" title="Security Considerations">
654
+
655
+ <t>Security is not generally a problem in normal operation, but special<vspace/>
656
+
657
+
658
+
659
+ measures <spanx style="strong">MUST</spanx> be taken (such as data encryption) when avian carriers
660
+
661
+
662
+
663
+ are used in a tactical environment.<xref target="RFC7253"/>, <xref target="ISO.IEC.10118-3"/></t>
664
+
665
+ </section>
666
+ </middle><back>
667
+ <references title="References">
668
+
669
+ <reference anchor="ISO.IEC.10118-3" target="https://www.iso.org/standard/67116.html"> <front> <title>ISO/IEC FDIS 10118-3 -- Information technology -- Security techniques -- Hash-functions -- Part 3: Dedicated hash-functions</title> <author> <organization>International Organization for Standardization</organization> <address> <postal> <street>BIBC II</street> <street>Chemin de Blandonnet 8</street> <street>CP 401</street> <city>Vernier</city> <region>Geneva</region> <code>1214</code> <country>Switzerland</country> </postal> <phone>+41 22 749 01 11</phone> <email>central@iso.org</email> <uri>https://www.iso.org/</uri> </address> </author> <date day="15" month="September" year="2017"/> </front></reference>
670
+
671
+ <reference anchor="RFC7253" target="https://tools.ietf.org/html/rfc7253"> <front> <title>Guidelines for Writing an IANA Considerations Section in RFCs</title> <author initials="T." surname="Krovetz"> <organization>Sacramento State</organization> </author> <author initials="P." surname="Rogaway"> <organization>UC Davis</organization> </author> <date month="May" year="2014"/> </front> <seriesInfo name="RFC" value="7253"/></reference>
672
+
673
+ </references>
674
+ </back>
675
+ </rfc>