1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en"><head><title>secure anycast tunneling protocol (SATP)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="secure anycast tunneling protocol (SATP)">
<meta name="keywords" content="satp, Internet-Draft, secure anycast tunneling protocol, anycast, tunnel, secure, protocol">
<meta name="generator" content="xml2rfc v1.35 (http://xml.resource.org/)">
<style type='text/css'><!--
body {
font-family: verdana, charcoal, helvetica, arial, sans-serif;
font-size: small; color: #000; background-color: #FFF;
margin: 2em;
}
h1, h2, h3, h4, h5, h6 {
font-family: helvetica, monaco, "MS Sans Serif", arial, sans-serif;
font-weight: bold; font-style: normal;
}
h1 { color: #900; background-color: transparent; text-align: right; }
h3 { color: #333; background-color: transparent; }
td.RFCbug {
font-size: x-small; text-decoration: none;
width: 30px; height: 30px; padding-top: 2px;
text-align: justify; vertical-align: middle;
background-color: #000;
}
td.RFCbug span.RFC {
font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
font-weight: bold; color: #666;
}
td.RFCbug span.hotText {
font-family: charcoal, monaco, geneva, "MS Sans Serif", helvetica, verdana, sans-serif;
font-weight: normal; text-align: center; color: #FFF;
}
table.TOCbug { width: 30px; height: 15px; }
td.TOCbug {
text-align: center; width: 30px; height: 15px;
color: #FFF; background-color: #900;
}
td.TOCbug a {
font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif;
font-weight: bold; font-size: x-small; text-decoration: none;
color: #FFF; background-color: transparent;
}
td.header {
font-family: arial, helvetica, sans-serif; font-size: x-small;
vertical-align: top; width: 33%;
color: #FFF; background-color: #666;
}
td.author { font-weight: bold; font-size: x-small; margin-left: 4em; }
td.author-text { font-size: x-small; }
/* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
a.info {
/* This is the key. */
position: relative;
z-index: 24;
text-decoration: none;
}
a.info:hover {
z-index: 25;
color: #FFF; background-color: #900;
}
a.info span { display: none; }
a.info:hover span.info {
/* The span will display just on :hover state. */
display: block;
position: absolute;
font-size: smaller;
top: 2em; left: -5em; width: 15em;
padding: 2px; border: 1px solid #333;
color: #900; background-color: #EEE;
text-align: left;
}
a { font-weight: bold; }
a:link { color: #900; background-color: transparent; }
a:visited { color: #633; background-color: transparent; }
a:active { color: #633; background-color: transparent; }
p { margin-left: 2em; margin-right: 2em; }
p.copyright { font-size: x-small; }
p.toc { font-size: small; font-weight: bold; margin-left: 3em; }
table.toc { margin: 0 0 0 3em; padding: 0; border: 0; vertical-align: text-top; }
td.toc { font-size: small; font-weight: bold; vertical-align: text-top; }
ol.text { margin-left: 2em; margin-right: 2em; }
ul.text { margin-left: 2em; margin-right: 2em; }
li { margin-left: 3em; }
/* RFC-2629 <spanx>s and <artwork>s. */
em { font-style: italic; }
strong { font-weight: bold; }
dfn { font-weight: bold; font-style: normal; }
cite { font-weight: normal; font-style: normal; }
tt { color: #036; }
tt, pre, pre dfn, pre em, pre cite, pre span {
font-family: "Courier New", Courier, monospace; font-size: small;
}
pre {
text-align: left; padding: 4px;
color: #000; background-color: #CCC;
}
pre dfn { color: #900; }
pre em { color: #66F; background-color: #FFC; font-weight: normal; }
pre .key { color: #33C; font-weight: bold; }
pre .id { color: #900; }
pre .str { color: #000; background-color: #CFF; }
pre .val { color: #066; }
pre .rep { color: #909; }
pre .oth { color: #000; background-color: #FCF; }
pre .err { background-color: #FCC; }
/* RFC-2629 <texttable>s. */
table.all, table.full, table.headers, table.none {
font-size: small; text-align: center; border-width: 2px;
vertical-align: top; border-collapse: collapse;
}
table.all, table.full { border-style: solid; border-color: black; }
table.headers, table.none { border-style: none; }
th {
font-weight: bold; border-color: black;
border-width: 2px 2px 3px 2px;
}
table.all th, table.full th { border-style: solid; }
table.headers th { border-style: none none solid none; }
table.none th { border-style: none; }
table.all td {
border-style: solid; border-color: #333;
border-width: 1px 2px;
}
table.full td, table.headers td, table.none td { border-style: none; }
hr { height: 1px; }
hr.insert {
width: 80%; border-style: none; border-width: 0;
color: #CCC; background-color: #CCC;
}
--></style>
</head>
<body>
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<table summary="layout" width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table summary="layout" width="100%" border="0" cellpadding="2" cellspacing="1">
<tr><td class="header">Network Working Group</td><td class="header">O. Gsenger</td></tr>
<tr><td class="header">Internet-Draft</td><td class="header">C. Pointner</td></tr>
<tr><td class="header">Expires: October 3, 2009</td><td class="header">April 2009</td></tr>
</table></td></tr></table>
<h1><br />secure anycast tunneling protocol (SATP)<br />draft-gsenger-pointner-secure-anycast-tunneling-protocol-01</h1>
<h3>Status of this Memo</h3>
<p>
By submitting this Internet-Draft,
each author represents that any applicable patent or other IPR claims of which
he or she is aware have been or will be disclosed,
and any of which he or she becomes aware will be disclosed,
in accordance with Section 6 of BCP 79.</p>
<p>
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups.
Note that other groups may also distribute working documents as
Internet-Drafts.</p>
<p>
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any time.
It is inappropriate to use Internet-Drafts as reference material or to cite
them other than as “work in progress.”</p>
<p>
The list of current Internet-Drafts can be accessed at
<a href='http://www.ietf.org/ietf/1id-abstracts.txt'>http://www.ietf.org/ietf/1id-abstracts.txt</a>.</p>
<p>
The list of Internet-Draft Shadow Directories can be accessed at
<a href='http://www.ietf.org/shadow.html'>http://www.ietf.org/shadow.html</a>.</p>
<p>
This Internet-Draft will expire on October 3, 2009.</p>
<h3>Abstract</h3>
<p>
The secure anycast tunneling protocol (SATP) defines a protocol used for communication between any combination of unicast and anycast tunnel endpoints. It allows tunneling of every ETHER TYPE protocol (ethernet, ip ...). SATP directly includes cryptography and message authentication based on the methods used by the <a class='info' href='#RFC3711'>Secure Real-time Transport Protocol(SRTP)<span> (</span><span class='info'>Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “The Secure Real-time Transport Protocol (SRTP),” March 2004.</span><span>)</span></a> [RFC3711]. It can be used as an encrypted alternative to <a class='info' href='#RFC2003'>IP Encapsulation within IP<span> (</span><span class='info'>Perkins, C., “IP Encapsulation within IP,” October 1996.</span><span>)</span></a> [RFC2003] and <a class='info' href='#RFC2784'>Generic Routing Encapsulation (GRE)<span> (</span><span class='info'>Farinacci, D., Li, T., Hanks, S., Meyer, D., and P. Traina, “Generic Routing Encapsulation (GRE),” March 2000.</span><span>)</span></a> [RFC2784]. Both anycast receivers and senders are supported.
</p><a name="toc"></a><br /><hr />
<h3>Table of Contents</h3>
<p class="toc">
<a href="#anchor1">1.</a>
Introduction<br />
<a href="#anchor2">1.1.</a>
Notational Conventions<br />
<a href="#anchor3">2.</a>
Motivation and usage scenarios<br />
<a href="#anchor4">2.1.</a>
Usage scenarions<br />
<a href="#anchor5">2.1.1.</a>
Tunneling from unicast hosts over anycast routers to other unicast hosts<br />
<a href="#anchor6">2.1.2.</a>
Tunneling from unicast hosts to anycast networks<br />
<a href="#anchor7">2.1.3.</a>
Redundant tunnel connection of 2 networks<br />
<a href="#anchor8">2.2.</a>
Encapsulation<br />
<a href="#anchor9">3.</a>
Using SATP on top of IP<br />
<a href="#anchor10">3.1.</a>
Fragmentation<br />
<a href="#anchor11">3.2.</a>
ICMP messages<br />
<a href="#anchor12">4.</a>
Protocol specification<br />
<a href="#anchor13">4.1.</a>
Header format<br />
<a href="#anchor14">4.2.</a>
sequence number<br />
<a href="#anchor15">4.3.</a>
sender ID<br />
<a href="#anchor16">4.4.</a>
MUX<br />
<a href="#anchor17">4.5.</a>
payload type<br />
<a href="#anchor18">4.6.</a>
payload<br />
<a href="#anchor19">4.7.</a>
padding (OPTIONAL)<br />
<a href="#anchor20">4.8.</a>
padding count (OPTIONAL)<br />
<a href="#anchor21">4.9.</a>
authentication tag (RECOMMENDED)<br />
<a href="#anchor22">5.</a>
Cryptography<br />
<a href="#anchor23">5.1.</a>
Basic Concepts<br />
<a href="#anchor24">5.1.1.</a>
Cryptographic Contexts<br />
<a href="#anchor27">5.1.2.</a>
SATP Packet Processing<br />
<a href="#sec_key_derivation">5.1.3.</a>
Key derivation<br />
<a href="#sec_pref_transform">5.2.</a>
Predefined Transforms<br />
<a href="#anchor28">5.2.1.</a>
Encryption<br />
<a href="#anchor32">5.2.2.</a>
Authentication and Integrity<br />
<a href="#sec_pref_kdprf">5.2.3.</a>
Key Derivation Pseudo Random Functions<br />
<a href="#sec_adding_transform">5.3.</a>
Adding SATP Transforms<br />
<a href="#sec_key_mgmt">6.</a>
Key Managment and Anycast Synchronization Considerations<br />
<a href="#anchor35">7.</a>
Security Considerations<br />
<a href="#anchor36">7.1.</a>
Replay protection<br />
<a href="#anchor37">8.</a>
IANA Considerations<br />
<a href="#rfc.references1">9.</a>
References<br />
<a href="#rfc.references1">9.1.</a>
Normative References<br />
<a href="#rfc.references2">9.2.</a>
Informational References<br />
<a href="#rfc.authors">§</a>
Authors' Addresses<br />
<a href="#rfc.copyright">§</a>
Intellectual Property and Copyright Statements<br />
</p>
<br clear="all" />
<a name="anchor1"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.1"></a><h3>1.
Introduction</h3>
<p>
SATP is a mixture of a generic encapsulation protocol like <a class='info' href='#RFC2784'>GRE<span> (</span><span class='info'>Farinacci, D., Li, T., Hanks, S., Meyer, D., and P. Traina, “Generic Routing Encapsulation (GRE),” March 2000.</span><span>)</span></a> [RFC2784] and a secure tunneling protocol as <a class='info' href='#RFC2401'>IPsec<span> (</span><span class='info'>Kent, S. and R. Atkinson, “Security Architecture for the Internet Protocol,” November 1998.</span><span>)</span></a> [RFC2401] in tunnel mode. It can be used to build redundant virtual private network (VPN) connections. It supports peer-to-peer tunnels, where tunnel endpoints can be any combination of unicast, multicast or anycast hosts, so it defines a <a class='info' href='#RFC1546'>Host Anycast Service<span> (</span><span class='info'>Partridge, C., Mendez, T., and W. Milliken, “Host Anycasting Service,” November 1993.</span><span>)</span></a> [RFC1546]. Encryption is done per packet, so the protocol is robust against packet loss and routing changes.
To reduce header overhead, encryption techniques similar to <a class='info' href='#RFC3711'>SRTP<span> (</span><span class='info'>Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “The Secure Real-time Transport Protocol (SRTP),” March 2004.</span><span>)</span></a> [RFC3711] are being used.
</p>
<a name="anchor2"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.1.1"></a><h3>1.1.
Notational Conventions</h3>
<p>
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a class='info' href='#RFC2119'>RFC2119<span> (</span><span class='info'>Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.</span><span>)</span></a> [RFC2119].
</p>
<a name="anchor3"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2"></a><h3>2.
Motivation and usage scenarios</h3>
<p>
This section gives an overview of possible usage scenarios. Please note that the protocols used in the figures are only examples and that SATP itself does not care about either transport protocols or encapsulated protocols. Routing is not done by SATP and each implemetation MAY choose it's own way of doing this task (e.g. using functions provided by the operating system). SATP is used only to encapsulate and encrypt data.
</p>
<a name="anchor4"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.1"></a><h3>2.1.
Usage scenarions</h3>
<a name="anchor5"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.1.1"></a><h3>2.1.1.
Tunneling from unicast hosts over anycast routers to other unicast hosts</h3>
<br /><hr class="insert" />
<a name="tunnel_mode"></a>
<p>An example of SATP used to tunnel in a unicast client - anycast server model
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
--------- router -----------
/ \
unicast ------+---------- router ------------+------ unicast
host \ / host
--------- router -----------
unicast | encrypted | anycast | encrypted | unicast
tunnel | communication | tunnel | communication | tunnel
endpoint | using SATP | endpoint | using SATP | endpoint
</pre></div><table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 1 </b></font><br /></td></tr></table><hr class="insert" />
<p>
In this scenario the payload is encapsuleted into a SATP packet by a unicast host and gets transmitted to one of the anycast routers. After transmisson the packet gets decapsulated by the router. This router makes a routing descision based on the underlying protocol and transmits a new SATP package to one or more unicast hosts depending on this decision.
</p>
<a name="anchor6"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.1.2"></a><h3>2.1.2.
Tunneling from unicast hosts to anycast networks</h3>
<br /><hr class="insert" />
<a name="open_tunnel_mode"></a>
<p>An example of SATP used to encrypt data between a unicast host and anycast networks
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
-------Router -+---- DNS Server
/ \
/ --- 6to4 Router
/
unicast -------+----------Router --+--- DNS Server
host \ \
\ --- 6to4 Router
\
-------Router -+---- DNS Server
\
--- 6to4 Router
unicast | encrypted | anycast | plaintext
tunnel | communication | tunnel | anycast
endpoint | using SATP | endpoint | services
</pre></div><table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 2 </b></font><br /></td></tr></table><hr class="insert" />
<p>
When the unicast hosts wants to transmit data to one of the anycast DNS servers, it encapsulates the data and sends a SATP packet to the anycast address of the routers. The packet arrives at one of the routers, gets decapsulated and is then forwarded to the DNS server. This method can be used to tunnel between clients and networks providing anycast services. It can also be used the other way to virtually locate a unicast service within anycasted networks.
</p>
<a name="anchor7"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.1.3"></a><h3>2.1.3.
Redundant tunnel connection of 2 networks</h3>
<br /><hr class="insert" />
<a name="connect_networks"></a>
<p>An example of SATP used to connect 2 networks
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
Router ----------- ---------------Router
/ \ / \
Network - Router ------------x Network
A \ / \ / B
Router ----------- ---------------Router
| packets | packets | packets |
plaintext | get | take a | get | plaintext
packets | de/encrypted | random | de/encrypted | packets
|de/encapsulated| path |de/encapsulated|
</pre></div><table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 3 </b></font><br /></td></tr></table><hr class="insert" />
<p>
Network A has multiple routers which act as gateway/tunnel endpoints to another network B. This way a redundant encrypted tunnel connection between the two networks is built up. All tunnel endpoints of network A share the same anycast address and all tunnel endpoints of network B share another anycast address. When a packet from network A is transmitted to network B, it first arrives on one of network A's border routers. Which router is used is determined by network A's internal routing. This router encapsulates the package and sends it to the anycast address of network B's routers. After arrival the SATP packet gets decapsulated and routed to its destination within network B.
</p>
<a name="anchor8"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.2.2"></a><h3>2.2.
Encapsulation</h3>
<p>
SATP does not depend on the lower layer protocol. This section only gives an example of how packets could look like.
</p><br /><hr class="insert" />
<a name="transport_udp"></a>
<p>Examples of SATP used with different lower layer and payload protocols
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
+------+-----+-------------------------------+
| | | +----------------+-----+ |
| IPv6 | UDP | SATP | Ethernet 802.3 | ... | |
| | | +----------------+-----+ |
+------+-----+-------------------------------+
Tunneling of Ethernet over UDP/IPv6
+------+-----+---------------------------+
| | | +------+-----+-----+ |
| IPv4 | UDP | SATP | IPv6 | UDP | RTP | |
| | | +------+-----+-----+ |
+------+-----+---------------------------+
Tunneling of IPv6 over UDP/IPv4 with RTP payload
+------+-------------------------------+
| | +----------------+-----+ |
| IPv6 | SATP | Ethernet 802.3 | ... | |
| | +----------------+-----+ |
+------+-------------------------------+
Tunneling of Ethernet over IPv6
+------+---------------------------+
| | +------+-----+-----+ |
| IPv4 | SATP | IPv6 | UDP | RTP | |
| | +------+-----+-----+ |
+------+---------------------------+
Tunneling of IPv6 over IPv4 with RTP payload
</pre></div><table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 4 </b></font><br /></td></tr></table><hr class="insert" />
<a name="anchor9"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3"></a><h3>3.
Using SATP on top of IP</h3>
<a name="anchor10"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.1"></a><h3>3.1.
Fragmentation</h3>
<p>
The only way of fully supporting fragmentation would be to synchronise fragments between all anycast servers. This is considered to be too much overhead, so there are two non-perfect solutions for these problems. Either fragmentation HAS TO be disabled or if not all fragments arrive at the same server the IP datagramm HAS TO be discarded. As routing changes are not expected to occur very frequently, the encapsulated protocol can do a retransmission and all fragments will arrive at the new server.
</p>
<p>
If the payload type is IP and the IP headers' Don't Fragment (DF) bit is set, then the DF bit of the outer IP header HAS TO be set as well.
</p>
<a name="anchor11"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.3.2"></a><h3>3.2.
ICMP messages</h3>
<p>
ICMP messages MUST be relayed according to <a class='info' href='#RFC2003'>rfc2003 section 4<span> (</span><span class='info'>Perkins, C., “IP Encapsulation within IP,” October 1996.</span><span>)</span></a> [RFC2003]. This is needed for path MTU detection.
</p>
<a name="anchor12"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4"></a><h3>4.
Protocol specification</h3>
<a name="anchor13"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.1"></a><h3>4.1.
Header format</h3>
<br /><hr class="insert" />
<a name="prot_header_table"></a>
<p>Protocol Format
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sequence number | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| sender ID | MUX | |
+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ |
| | payload type | | |
| +-------------------------------+ | |
| | .... payload ... | |
| | +-------------------------------+ |
| | | padding (OPT) | pad count(OPT)| |
+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+-+
| : authentication tag (RECOMMENDED) : |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
+- Encrypted Portion Authenticated Portion ---+
</pre></div><table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 5 </b></font><br /></td></tr></table><hr class="insert" />
<p>
</p>
<a name="anchor14"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.2"></a><h3>4.2.
sequence number</h3>
<p>
The sequence number is a 32 bit unsigned integer in network byte order. The starting point is signaled by the key exchange mechanism and then value is then increased by 1 for every packet sent. After the maximum value it starts over from 0.
</p>
<a name="anchor15"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.3"></a><h3>4.3.
sender ID</h3>
<p>
The sender ID is a 16 bit unsigned integer. It HAS TO be unique for every sender sharing the same anycast address.
</p>
<a name="anchor16"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.4"></a><h3>4.4.
MUX</h3>
<p>
The MUX (multiplex) field is a 16 bit unsigned integer. It is used to distinguish multiple tunnel connections.
</p>
<a name="anchor17"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.5"></a><h3>4.5.
payload type</h3>
<p>
The payload type field defines the payload protocol. ETHER TYPE protocol numbers are used. <a href='http://www.iana.org/assignments/ethernet-numbers'>See IANA assigned ethernet numbers</a> . The values 0000-05DC are reserverd and MUST NOT be used.
<br /><hr class="insert" />
<a name="prot_type_table"></a>
<p>Some examples for protocol numbers
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
HEX
0000 Reserved
.... Reserved
05DC Reserved
0800 Internet IP (IPv4)
6558 transparent ethernet bridging
86DD IPv6
</pre></div><table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 6 </b></font><br /></td></tr></table><hr class="insert" />
<a name="anchor18"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.6"></a><h3>4.6.
payload</h3>
<p>
A packet of type payload type (e.g. an IP packet).
</p>
<a name="anchor19"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.7"></a><h3>4.7.
padding (OPTIONAL)</h3>
<p>
Padding of max 255 octets. None of the pre-defined encryption transforms uses any padding; for these, the plaintext and encrypted payload sizes match exactly. Transforms which may be added in future (see <a class='info' href='#sec_adding_transform'>Section 5.3<span> (</span><span class='info'>Adding SATP Transforms</span><span>)</span></a>) MUST define wheter they need padding or not and if they need it they MUST define a proper padding format. If the padding count field is present, the padding count field MUST be set to the padding length.
</p>
<a name="anchor20"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.8"></a><h3>4.8.
padding count (OPTIONAL)</h3>
<p>
The number of octets of the padding field. This field is optional. Its presence is signaled by the key management and not by this protocol. If this field isn't present, the padding field MUST NOT be present as well.
</p>
<a name="anchor21"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.4.9"></a><h3>4.9.
authentication tag (RECOMMENDED)</h3>
<p>
The authentication tag is RECOMMENDED and of configurable length. It contains a cryptographic checksum of the sender ID, sequence number and the encrypted portion. On transmitter side encryption HAS TO be done before calculating the authentication tag. A receiver HAS TO calculate the authentication tag before decrypting the encrypted portion.
</p>
<a name="anchor22"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5"></a><h3>5.
Cryptography</h3>
<p>
As mentioned earlier the cryptography of SATP is based on <a class='info' href='#RFC3711'>SRTP<span> (</span><span class='info'>Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “The Secure Real-time Transport Protocol (SRTP),” March 2004.</span><span>)</span></a> [RFC3711]. For that reason we recommend to read this document as well (especially chapter 7 Rationale). However some modifications were made in order to fit the changed conditions of SATP. The following section describes the whole cryptography of SATP.
</p>
<a name="anchor23"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1"></a><h3>5.1.
Basic Concepts</h3>
<p>
In order to cope with anycast and packet loss it is important to be able to process one packet on its own without the need for packets from the past as an additional information source. Therefore SATP as well as <a class='info' href='#RFC3711'>SRTP<span> (</span><span class='info'>Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “The Secure Real-time Transport Protocol (SRTP),” March 2004.</span><span>)</span></a> [RFC3711] defines a so called cryptographic context. This context consits of all information which is needed to process a single SATP packet and is divided into packet specific parameters and global parameters. The packet specific parameters can be found in the protocol header and global parameters have to be generated by the key exchange mechanism external to SATP (see <a class='info' href='#sec_key_mgmt'>Section 6<span> (</span><span class='info'>Key Managment and Anycast Synchronization Considerations</span><span>)</span></a>). For anycast sender the global parameters have to be synchronized between all hosts which share the same anycast address. The packet specific parameters MUST NOT be synchronized.<br />
SATP uses two types of keys: master keys and session keys. A session key is meant to be used for a cryptographic transform (encrytion or message authentication) for one packet. The master keys are used to derive packet-specific session keys in a cryptographical secure way.
</p>
<a name="anchor24"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1.1"></a><h3>5.1.1.
Cryptographic Contexts</h3>
<a name="anchor25"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1.1.1"></a><h3>5.1.1.1.
Global Parameters</h3>
<p>
As mentioned above global parameters HAVE TO either be provided by the key exchange mechanism or configured manually.
</p>
<ul class="text">
<li>a master key(s) which MUST be random and kept secret.
</li>
<li>a master salt which MUST be random and MAY be public (RECOMMENDED to be kept secret as well).
</li>
<li>a role specifier used by the key derivation to determine which session keys to generate for outbound or inbound traffic.
</li>
<li>identifier for the key derivation pseudo random function.
</li>
<li>identifier for the encryption algorithm (i.e. cipher and its mode of operation).
</li>
<li>if used an identifier for the authentication algorithm.
</li>
<li>transform specific parameters such as key lengths, see <a class='info' href='#sec_pref_transform'>Section 5.2<span> (</span><span class='info'>Predefined Transforms</span><span>)</span></a>.
</li>
<li>if used the length of the authentication tag which should be truncated to the packet.
</li>
<li>an indicator which specifies if padding is needed or not (presence of padding count field).
</li>
<li>a replay list for each sender (see <a class='info' href='#sec_mapping_context'>Section 5.1.1.3<span> (</span><span class='info'>Mapping SATP packets to Cryptographic Contexts</span><span>)</span></a>), maintained by the receiver which contains the sequence numbers of received and authenticated packets, this lists may be implemented as a sliding window.
</li>
<li>a [ From , To ] value pair which specifies the lifetime of a master key (including the range endpoints), expressed in terms of a pair of 32-bit sequence numbers.
</li>
</ul><p>
</p>
<a name="anchor26"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1.1.2"></a><h3>5.1.1.2.
Packet-Specific Parameters</h3>
<p>
</p>
<ul class="text">
<li>the sequence number
</li>
<li>the sender id
</li>
<li>the mux value
</li>
</ul><p>
</p>
<a name="sec_mapping_context"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1.1.3"></a><h3>5.1.1.3.
Mapping SATP packets to Cryptographic Contexts</h3>
<p>
A cryptographic contexts SHALL be uniquely identifed by the tuple context identifier:
<br />
<br />
context id = [ source address , source port ]
<br />
<br />
In order to cope with anycast sender and replay protection there HAS TO be more than one replay list per context. Each replay list inside a cryptographic context SHALL be uniquely identified by the sender id.<br />
</p>
<a name="anchor27"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1.2"></a><h3>5.1.2.
SATP Packet Processing</h3>
<p>
Before any SATP packet can be processed a cryptographic context HAS TO be initialized by the key management mechanism. After that a SATP sender SHALL do the following to create a SATP packet:
</p>
<ol class="text">
<li>Determine the next sequence number to use.
</li>
<li>Determine the crypotgraphic context as described in <a class='info' href='#sec_mapping_context'>Section 5.1.1.3<span> (</span><span class='info'>Mapping SATP packets to Cryptographic Contexts</span><span>)</span></a>.
</li>
<li>Determine the master key and master salt for the packets sequence number.
</li>
<li>Compute all session keys and session salts which are needed by the encryption transform using the key derivation pseudo random function.
</li>
<li>Encrypt the payload type field concatenated with the payload to produce the encrypted portion of the packet using the encryption algorithm defined by the cryptographic context.
</li>
<li>Fill in sender id, mux and sequence number fields.
</li>
<li>If needed compute the session authentication key using the key derivation pseudo random function.
</li>
<li>Generate the authentication tag over the authenticated portion using the authentication algorithm defined by the cryptographic context and append it to the packet.
</li>
</ol><p>
On receiver side the packet SHALL be processed as follows:
</p>
<ol class="text">
<li>Determine the crypotgraphic context as described in <a class='info' href='#sec_mapping_context'>Section 5.1.1.3<span> (</span><span class='info'>Mapping SATP packets to Cryptographic Contexts</span><span>)</span></a>.
</li>
<li>Determine the master key and master salt for the packets sequence number.
</li>
<li>Check if the packet was replayed using the replay list for the packets sender id.
</li>
<li>If needed compute the session authentication key using the key derivation pseudo random function.
</li>
<li>Generate the authentication tag over the authenticated portion using the authentication algorithm defined by the crpyptographic context and compare it with the tag appended to the received packet. If it is equal remove the tag and move on. If it is not equal drop the packet.
</li>
<li>Store the sequence number in the replay list.
</li>
<li>Compute all session keys and session salts which are needed by the encryption transform using the key derivation pseudo random function.
</li>
<li>Decrypt the encrypted portion using the encryption algorithm defined by the cryptographic context.
</li>
<li>Check if the payload type is supported by this tunnel endpoint and discard the packet in case it isn't supported.
</li>
<li>Remove all fields beside the payload itself from the packet.
</li>
</ol><p>
</p>
<a name="sec_key_derivation"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.1.3"></a><h3>5.1.3.
Key derivation</h3>
<p>
Any encryption or message authentication transform which is used (predefined or newly introduced according to <a class='info' href='#sec_adding_transform'>Section 5.3<span> (</span><span class='info'>Adding SATP Transforms</span><span>)</span></a>) MUST obtain its secret values (keys and salts) using the SATP key derivation. After the key exchange mechanism has signaled all needed parameters (i.e. master key and salt) no additional communiction between sender and receiver is needed until the next rekeying takes place. To achieve this the key derivation uses an pseudo random function seeded by the master key, master salt, the packets sequence number and a label (identifier for the key to compute).
</p><br /><hr class="insert" />
<a name="key_derivation"></a>
<p>SATP key derivation
</p><div style='display: table; width: 0; margin-left: 3em; margin-right: auto'><pre>
packet sequence nummber ----+
|
V
+------------+ master +------------+
| | key | |--> session encryption key
| ext. key |------->| key |
| management | | |--> session encryption salt
| mechanism |------->| derivation |
| | master | |--> session authentication key
+------------+ salt +------------+
</pre></div><table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Figure 7 </b></font><br /></td></tr></table><hr class="insert" />
<p>
<a class='info' href='#RFC3711'>SRTP<span> (</span><span class='info'>Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “The Secure Real-time Transport Protocol (SRTP),” March 2004.</span><span>)</span></a> [RFC3711] defines a pseudo random function as follows: <br />
Let m and n be positive integers. A pseudo-random function family is a set of keyed functions {PRF_n(k,x)} such that for the (secret) random key k, given m-bit x, PRF_n(k,x) is an n-bit string, computationally indistinguishable from random n-bit strings.<br />
<br />
For SATP key generation a pseudo random function with at least m = 128 MUST be used. A predefined transform can be found in <a class='info' href='#sec_pref_kdprf'>Section 5.2.3<span> (</span><span class='info'>Key Derivation Pseudo Random Functions</span><span>)</span></a>.
The input x of the PRF SHOULD be calculated as follows:
</p>
<ol class="text">
<li>Let key_id = label || sequence_number, with label defined as below.
</li>
<li>Let x = key_id XOR master_salt, where key_id and master_salt are aligend so that their least significant bits agree (right-alignment).
</li>
</ol><p>
For each key derived by the key derivation there MUST exist a unique label, a 32-bit constant. In order to increase security SATP uses different session keys for inbound and outbound traffic. The role specifier from the cryptographic context is used to determine which session keys to use for inbound and outbound packets.
The labels can be computed by calculateing the SHA1 hash over an increasing label-index. The label value are the 32 leftmost bits of this hash value.
We currently define 6 labels (label-index from 1 to 6) future extensions may use labels with an index from 7 upwards.
</p><br /><hr class="insert" />
<table class="full" align="center" border="0" cellpadding="2" cellspacing="2">
<col align="left"><col align="left"><col align="center"><col align="center">
<tr><th align="left">key type</th><th align="left">role</th><th align="center">label-index</th><th align="center">label</th></tr>
<tr>
<td align="left">encryption key</td>
<td align="left">left</td>
<td align="center">1</td>
<td align="center">0x356A192B</td>
</tr>
<tr>
<td align="left">encryption key</td>
<td align="left">right</td>
<td align="center">2</td>
<td align="center">0xDA4B9237</td>
</tr>
<tr>
<td align="left">encryption salt</td>
<td align="left">left</td>
<td align="center">3</td>
<td align="center">0x77DE68DA</td>
</tr>
<tr>
<td align="left">encryption salt</td>
<td align="left">right</td>
<td align="center">4</td>
<td align="center">0x1B645389</td>
</tr>
<tr>
<td align="left">authentication key</td>
<td align="left">left</td>
<td align="center">5</td>
<td align="center">0xAC3478D6</td>
</tr>
<tr>
<td align="left">authentication key</td>
<td align="left">right</td>
<td align="center">6</td>
<td align="center">0xC1DFD96E</td>
</tr>
</table>
<br clear="all" />
<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Key Derivation Labels </b></font><br /></td></tr></table><hr class="insert" />
<p>
The role parameter specifies which label should be used for outbound packets. This means a endpoint with role left MUST use the labels marked with left for outgoing packets and expects inbound packets to be encrypted/authenticated using the labels marked with right.
</p>
<a name="sec_pref_transform"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2"></a><h3>5.2.
Predefined Transforms</h3>
<p>
While SATP as well as SRTP allows the use of various encryption and message authentication algorithms interoperable implementations MUST support at least the following transforms. To add additional transforms see <a class='info' href='#sec_adding_transform'>Section 5.3<span> (</span><span class='info'>Adding SATP Transforms</span><span>)</span></a>.
</p>
<a name="anchor28"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.1"></a><h3>5.2.1.
Encryption</h3>
<a name="anchor29"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.1.1"></a><h3>5.2.1.1.
NULL Encryption</h3>
<p>
If confidendtiality of the SATP packet is not an issue the null encryption transform can be used to increase performance. This transform just copies the plaintext input into the ciphertext output wihtout any padding. The identifier for that transfrom SHOULD be NULL and it don't needs any transform specific parameters. It also doesn't need any key or salt values computed by the key derivation.
</p>
<a name="anchor30"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.1.2"></a><h3>5.2.1.2.
AES in Counter Mode</h3>
<p>
The following describes how to use AES in counter mode for SATP encryption. The identifier for that transform SHOULD be AES-CTR-<key_length> or just AES-CTR in which case the key length defaults to 128 bits. Beside the key length there are no additional transfrom specific parameters. This transform needs a key of length <key_length> and a 112 bit salt. These values can be generated using the key derivation pseudo random function as follows:<br />
<br />
session_key = PRF_<key_length>(master_key, x)<br />
session_salt = PRF_112(master_key, x)<br />
with PRF and x defined as in <a class='info' href='#sec_key_derivation'>Section 5.1.3<span> (</span><span class='info'>Key derivation</span><span>)</span></a>.<br />
<br />
Basically AES in counter mode generates a pseudo random keystream seeded by the session key, session salt as well as the sequence number, sender id and mux value of the packet and encrypts a single SATP packet using this stream. The encryption process consits of the generation of that keystream and then bitwise exclusive-oring it onto the packets payload. If the packet length doesn't fit a multiple of 128 bits the remaining bits (least significant) of the keystream are simple ingored. Therefore this transform does not need any padding. Decryption of the packet can be achieved by generating the same keystream and exclusive-oring it onto the encrypted portion.
</p>
<a name="anchor31"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.1.2.1"></a><h3>5.2.1.2.1.
Keystream Generation</h3>
<p>
In principle AES in counter mode consists of encrypting an incrementing integer. However the starting point of the integer value has to be randomized to get a good pseudo random key stream. A keystream consits of several keystream segements with a size of 128 bits (AES blocksize). Each segement can be computed by applying AES with key k on the block CTR. The whole keystream is a concatination of all its successive segements. Therefore a keystream looks as follows:<br />
<br />
AES(session_key, CTR) || AES(session_key, CTR + 1 mod 2^128) || AES(session_key, CTR + 2 mod 2^128) ...<br />
<br />
where the 128 bit value CTR is defined as follows:<br />
<br />
CTR = (session_salt * 2^16) XOR (mux * 2^80) XOR (sender_id * 2^64) XOR (sequence_number * 2^16)<br />
<br />
where each of the four terms are padded with as many leading zeros to form a 128 bit value.
</p>
<p>
Mind that the 16 least siginificant bits of CTR are zero. These bits are used for the counter. Therefore the number of blocks generated for one packet MUST NOT exceed 2^16 to avoid keystream reuse. This means that the packet length MUST NOT exceed 2^16 * 128 bits = 2^23 bits to ensure the security of the encryption.
</p>
<a name="anchor32"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.2"></a><h3>5.2.2.
Authentication and Integrity</h3>
<p>
It is RECOMMENDED to use an authentication tag and if it is used it should be processed as follows. The sender generates the tag over the authenticated portion truncates it to the left-most (most significant) bits to fit the authentication tag length signaled by the key exchange mechanism. After that it simple appends the tag to the packet. The receiver computes the tag in the same way as the sender and compares if with the received tag. If they don't match the packet HAS TO be discarded and the incident SHOULD be logged.
</p>
<a name="anchor33"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.2.1"></a><h3>5.2.2.1.
HMAC-SHA1</h3>
<p>
This transform uses HMAC-SHA1 (as described in <a class='info' href='#RFC2104'>[RFC2104]<span> (</span><span class='info'>Krawczyk, H., Bellare, M., and R. Canetti, “HMAC: Keyed-Hashing for Message Authentication,” February 1997.</span><span>)</span></a>) as message authentication algorithm. The identifier for the transfrom SHOULD be SHA1 and it don't needs any transform specific parameters. The key should be derived using the key derivation pseudo random function:<br />
<br />
session_auth_key = PRF_20(master_key, x)<br />
with PRF and x defined as in <a class='info' href='#sec_key_derivation'>Section 5.1.3<span> (</span><span class='info'>Key derivation</span><span>)</span></a>
</p>
<a name="sec_pref_kdprf"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.3"></a><h3>5.2.3.
Key Derivation Pseudo Random Functions</h3>
<a name="anchor34"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.2.3.1"></a><h3>5.2.3.1.
AES in Counter Mode</h3>
<p>
<a class='info' href='#sec_key_derivation'>Section 5.1.3<span> (</span><span class='info'>Key derivation</span><span>)</span></a> defines a pseudo random function which SHOULD be used to derive session keys and salts. This describes the use of AES in counter mode as PRF. The identifier for this PRF SHOULD be AES-CTR-<key_length> or just AES-CTR in which case the key length defaults to 128 bits. Beside the key length there are no additional transform specific parameters. This transform needs a master key of length key_length and a 112 bit master salt. The pseudo random string consists of several segements with a size of 128 bits (AES blocksize). The whole string can be computed as follows:<br />
<br />
AES(master_key, CTR) || AES(master_key, CTR + 1 mod 2^128) || AES(master_key, CTR + 2 mod 2^128) ...<br />
<br />
where the 128 bit value CTR is defined as x * 2^16, with x defined as in <a class='info' href='#sec_key_derivation'>Section 5.1.3<span> (</span><span class='info'>Key derivation</span><span>)</span></a>.<br />
<br />
This pseudo random function can produce pseudo random strings up to a length of 2^23 bits. If the requested output length n does not fit multiples of 128 bits the output SHOULD be truncated to the n first (left-most) bits. Therefore there are n/128, rounded up, applications of AES needed to produce the output string.
</p>
<a name="sec_adding_transform"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.5.3"></a><h3>5.3.
Adding SATP Transforms</h3>
<p>
If a new transform is to be added to SATP a standard track RFC MUST be written to define the usage of the new transform. Any overlap between the new RFC and this document SHOULD be avoided but it MAY be needed to update some of the information in this document. For example new parameters MAY be added to the cryptographic context or there MAY be additional steps in SATP packet processing.
</p>
<a name="sec_key_mgmt"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.6"></a><h3>6.
Key Managment and Anycast Synchronization Considerations</h3>
<a name="anchor35"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.7"></a><h3>7.
Security Considerations</h3>
<p>
As the cryptography of SATP is based on <a class='info' href='#RFC3711'>SRTP<span> (</span><span class='info'>Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “The Secure Real-time Transport Protocol (SRTP),” March 2004.</span><span>)</span></a> [RFC3711], it basically shares the same security issues. This section will only discuss some small changes. Please read <a class='info' href='#RFC3711'>SRTP RFC3711 section 9<span> (</span><span class='info'>Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “The Secure Real-time Transport Protocol (SRTP),” March 2004.</span><span>)</span></a> [RFC3711] for details.
</p>
<a name="anchor36"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.7.1"></a><h3>7.1.
Replay protection</h3>
<p>
Replay protection is done by a replay list. Every anycast receiver has its own replay list, which SHOULDN'T be syncronised because of massive overhead. This leads to an additional possible attack. An attacker is able to replay a captured packet once to every anycast receiver. This attack is considered be very unlikely because multiple attack hosts in different locations are needed to reach seperate anycast receivers and the number of replays is limited to count of receivers - 1. Such replays might also happen because of routing problems, so a payload protocol HAS TO be robust against a small number of duplicated packages. The window size and position HAS TO be syncronised between multiple anycast receivers to limit this attack.
</p>
<a name="anchor37"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.8"></a><h3>8.
IANA Considerations</h3>
<p>
The protocol is intended to be used on top of IP or on top of UDP (to be compatible with NAT routers), so UDP and IP protocol numbers have to be assiged by IANA.
</p>
<a name="rfc.references"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<a name="rfc.section.9"></a><h3>9.
References</h3>
<a name="rfc.references1"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<h3>9.1. Normative References</h3>
<table width="99%" border="0">
<tr><td class="author-text" valign="top"><a name="RFC3711">[RFC3711]</a></td>
<td class="author-text">Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, “<a href="http://tools.ietf.org/html/rfc3711">The Secure Real-time Transport Protocol (SRTP)</a>,” RFC 3711, March 2004 (<a href="http://www.rfc-editor.org/rfc/rfc3711.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2119">[RFC2119]</a></td>
<td class="author-text"><a href="mailto:sob@harvard.edu">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>,” BCP 14, RFC 2119, March 1997 (<a href="http://www.rfc-editor.org/rfc/rfc2119.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc2119.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc2119.xml">XML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2003">[RFC2003]</a></td>
<td class="author-text"><a href="mailto:perk@watson.ibm.com">Perkins, C.</a>, “<a href="http://tools.ietf.org/html/rfc2003">IP Encapsulation within IP</a>,” RFC 2003, October 1996 (<a href="http://www.rfc-editor.org/rfc/rfc2003.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc2003.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc2003.xml">XML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2104">[RFC2104]</a></td>
<td class="author-text"><a href="mailto:hugo@watson.ibm.com">Krawczyk, H.</a>, <a href="mailto:mihir@cs.ucsd.edu">Bellare, M.</a>, and <a href="mailto:canetti@watson.ibm.com">R. Canetti</a>, “<a href="http://tools.ietf.org/html/rfc2104">HMAC: Keyed-Hashing for Message Authentication</a>,” RFC 2104, February 1997 (<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">TXT</a>).</td></tr>
</table>
<a name="rfc.references2"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<h3>9.2. Informational References</h3>
<table width="99%" border="0">
<tr><td class="author-text" valign="top"><a name="RFC2784">[RFC2784]</a></td>
<td class="author-text"><a href="mailto:dino@procket.com">Farinacci, D.</a>, <a href="mailto:tony1@home.net">Li, T.</a>, <a href="mailto:stan_hanks@enron.net">Hanks, S.</a>, <a href="mailto:dmm@cisco.com">Meyer, D.</a>, and <a href="mailto:pst@juniper.net">P. Traina</a>, “<a href="http://tools.ietf.org/html/rfc2784">Generic Routing Encapsulation (GRE)</a>,” RFC 2784, March 2000 (<a href="http://www.rfc-editor.org/rfc/rfc2784.txt">TXT</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC2401">[RFC2401]</a></td>
<td class="author-text"><a href="mailto:kent@bbn.com">Kent, S.</a> and <a href="mailto:rja@corp.home.net">R. Atkinson</a>, “<a href="http://tools.ietf.org/html/rfc2401">Security Architecture for the Internet Protocol</a>,” RFC 2401, November 1998 (<a href="http://www.rfc-editor.org/rfc/rfc2401.txt">TXT</a>, <a href="http://xml.resource.org/public/rfc/html/rfc2401.html">HTML</a>, <a href="http://xml.resource.org/public/rfc/xml/rfc2401.xml">XML</a>).</td></tr>
<tr><td class="author-text" valign="top"><a name="RFC1546">[RFC1546]</a></td>
<td class="author-text"><a href="mailto:craig@bbn.com">Partridge, C.</a>, <a href="mailto:tmendez@bbn.com">Mendez, T.</a>, and <a href="mailto:milliken@bbn.com">W. Milliken</a>, “<a href="http://tools.ietf.org/html/rfc1546">Host Anycasting Service</a>,” RFC 1546, November 1993 (<a href="http://www.rfc-editor.org/rfc/rfc1546.txt">TXT</a>).</td></tr>
</table>
<a name="rfc.authors"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<h3>Authors' Addresses</h3>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="author-text"> </td>
<td class="author-text">Othmar Gsenger</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Puerstingerstr 32</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Saalfelden 5760</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">AT</td></tr>
<tr><td class="author" align="right">Phone: </td>
<td class="author-text"></td></tr>
<tr><td class="author" align="right">Email: </td>
<td class="author-text"><a href="mailto:satp@gsenger.com">satp@gsenger.com</a></td></tr>
<tr><td class="author" align="right">URI: </td>
<td class="author-text"><a href="http://www.gsenger.com/satp/">http://www.gsenger.com/satp/</a></td></tr>
<tr cellpadding="3"><td> </td><td> </td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Christian Pointner</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Wielandgasse 19</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">Graz 8010</td></tr>
<tr><td class="author-text"> </td>
<td class="author-text">AT</td></tr>
<tr><td class="author" align="right">Phone: </td>
<td class="author-text"></td></tr>
<tr><td class="author" align="right">Email: </td>
<td class="author-text"><a href="mailto:equinox@anytun.org">equinox@anytun.org</a></td></tr>
</table>
<a name="rfc.copyright"></a><br /><hr />
<table summary="layout" cellpadding="0" cellspacing="2" class="TOCbug" align="right"><tr><td class="TOCbug"><a href="#toc"> TOC </a></td></tr></table>
<h3>Full Copyright Statement</h3>
<p class='copyright'>
Copyright © The IETF Trust (2009).</p>
<p class='copyright'>
This document is subject to the rights,
licenses and restrictions contained in BCP 78,
and except as set forth therein,
the authors retain all their rights.</p>
<p class='copyright'>
This document and the information contained herein are provided
on an “AS IS” basis and THE CONTRIBUTOR,
THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST
AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT
THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE.</p>
<h3>Intellectual Property</h3>
<p class='copyright'>
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed
to pertain to the implementation or use of the technology
described in this document or the extent to which any license
under such rights might or might not be available; nor does it
represent that it has made any independent effort to identify any
such rights.
Information on the procedures with respect to
rights in RFC documents can be found in BCP 78 and BCP 79.</p>
<p class='copyright'>
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available,
or the result of an attempt made to obtain a general license or
permission for the use of such proprietary rights by implementers or
users of this specification can be obtained from the IETF on-line IPR
repository at <a href='http://www.ietf.org/ipr'>http://www.ietf.org/ipr</a>.</p>
<p class='copyright'>
The IETF invites any interested party to bring to its attention
any copyrights,
patents or patent applications,
or other
proprietary rights that may cover technology that may be required
to implement this standard.
Please address the information to the IETF at <a href='mailto:ietf-ipr@ietf.org'>ietf-ipr@ietf.org</a>.</p>
</body></html>
|