OLD | NEW |
1 Secure RTP (SRTP) Reference Implementation | 1 Secure RTP (SRTP) Reference Implementation |
2 David A. McGrew | 2 David A. McGrew |
3 Cisco Systems, Inc. | 3 Cisco Systems, Inc. |
4 mcgrew@cisco.com | 4 mcgrew@cisco.com |
5 | 5 |
6 | 6 |
7 This package provides an implementation of the Secure Real-time | 7 This package provides an implementation of the Secure Real-time |
8 Transport Protocol (SRTP), the Universal Security Transform (UST), and | 8 Transport Protocol (SRTP), the Universal Security Transform (UST), and |
9 a supporting cryptographic kernel. These mechanisms are documented in | 9 a supporting cryptographic kernel. These mechanisms are documented in |
10 the Internet Drafts in the doc/ subdirectory. The SRTP API is | 10 the Internet Drafts in the doc/ subdirectory. The SRTP API is |
11 documented in include/srtp.h, and the library is in libsrtp.a (after | 11 documented in include/srtp.h, and the library is in libsrtp.a (after |
12 compilation). An overview and reference manual is available in | 12 compilation). An overview and reference manual is available in |
13 doc/libsrtp.pdf. The PDF documentation is more up to date than this | 13 doc/libsrtp.pdf. The PDF documentation is more up to date than this |
14 file. | 14 file. |
15 | 15 |
16 | 16 |
17 Installation: | 17 Installation: |
18 | 18 |
19 ./configure [ options ] # GNU autoconf script | 19 ./configure [ options ] # GNU autoconf script |
20 make # or gmake if needed; use GNU make | 20 make # or gmake if needed; use GNU make |
21 | 21 |
22 The configure script accepts the following options: | 22 The configure script accepts the following options: |
23 | 23 |
24 --help provides a usage summary | 24 --help provides a usage summary |
25 --disable-debug compile without the runtime debugging system | 25 --disable-debug compile without the runtime debugging system |
26 --enable-syslog use syslog for error reporting | 26 --enable-syslog use syslog for error reporting |
27 --disable-stdout use stdout for error reporting | 27 --disable-stdout use stdout for error reporting |
28 --enable-console use /dev/console for error reporting | 28 --enable-console use /dev/console for error reporting |
| 29 --enable-openssl use OpenSSL crypto primitives |
29 --gdoi use GDOI key management (disabled at present) | 30 --gdoi use GDOI key management (disabled at present) |
30 | 31 |
31 By default, debbuging is enabled and stdout is used for debugging. | 32 By default, debugging is enabled and stdout is used for debugging. |
32 You can use the above configure options to have the debugging output | 33 You can use the above configure options to have the debugging output |
33 sent to syslog or the system console. Alternatively, you can define | 34 sent to syslog or the system console. Alternatively, you can define |
34 ERR_REPORTING_FILE in include/conf.h to be any other file that can be | 35 ERR_REPORTING_FILE in include/conf.h to be any other file that can be |
35 opened by libSRTP, and debug messages will be sent to it. | 36 opened by libSRTP, and debug messages will be sent to it. |
36 | 37 |
37 This package has been tested on Mac OS X (powerpc-apple-darwin1.4), | 38 This package has been tested on Mac OS X (powerpc-apple-darwin1.4), |
38 Cygwin (i686-pc-cygwin), and Sparc (sparc-sun-solaris2.6). Previous | 39 Cygwin (i686-pc-cygwin), and Sparc (sparc-sun-solaris2.6). Previous |
39 versions have been tested on Linux and OpenBSD on both x86 and sparc | 40 versions have been tested on Linux and OpenBSD on both x86 and sparc |
40 platforms. | 41 platforms. |
41 | 42 |
(...skipping 28 matching lines...) Expand all Loading... |
70 roc_driver extended sequence number functions | 71 roc_driver extended sequence number functions |
71 replay_driver replay database (n.b. not used in libsrtp) | 72 replay_driver replay database (n.b. not used in libsrtp) |
72 cipher_driver ciphers | 73 cipher_driver ciphers |
73 auth_driver hash functions | 74 auth_driver hash functions |
74 | 75 |
75 The app rtpw is a simple rtp application which reads words from | 76 The app rtpw is a simple rtp application which reads words from |
76 /usr/dict/words and then sends them out one at a time using [s]rtp. | 77 /usr/dict/words and then sends them out one at a time using [s]rtp. |
77 Manual srtp keying uses the -k option; automated key management | 78 Manual srtp keying uses the -k option; automated key management |
78 using gdoi will be added later. | 79 using gdoi will be added later. |
79 | 80 |
80 usage: rtpw [-d <debug>]* [-k <key> [-a][-e]] [-s | -r] dest_ip dest_port | 81 usage: rtpw [-d <debug>]* [-k|b <key> [-a][-e <key size>][-g]] [-s | -r] dest_ip
dest_port |
81 or rtpw -l | 82 or rtpw -l |
82 | 83 |
83 Either the -s (sender) or -r (receiver) option must be chosen. | 84 Either the -s (sender) or -r (receiver) option must be chosen. |
84 | 85 |
85 The values dest_ip, dest_port are the ip address and udp port to | 86 The values dest_ip, dest_port are the ip address and udp port to |
86 which the dictionary will be sent, respectively. | 87 which the dictionary will be sent, respectively. |
87 | 88 |
88 options: | 89 options: |
89 | 90 |
90 -s (s)rtp sender - causes app to send words | 91 -s (s)rtp sender - causes app to send words |
91 | 92 |
92 -r» » (s)rtp receive - causes app to receve words | 93 -r» » (s)rtp receive - causes app to receive words |
93 | 94 |
94 -k <key> use srtp master key <key>, where the | 95 -k <key> use srtp master key <key>, where the |
95 key is a hexadecimal value (without the | 96 key is a hexadecimal value (without the |
96 leading "0x") | 97 leading "0x") |
97 | 98 |
98 -e encrypt/decrypt (for data confidentiality) | 99 -b <key> same as -k but with base64 encoded key |
| 100 |
| 101 -e <keysize> encrypt/decrypt (for data confidentiality) |
99 (requires use of -k option as well) | 102 (requires use of -k option as well) |
| 103 (use 128, 192, or 256 for keysize) |
| 104 |
| 105 -g use AES-GCM mode (must be used with -e) |
100 | 106 |
101 -a message authentication | 107 -a message authentication |
102 (requires use of -k option as well) | 108 (requires use of -k option as well) |
103 | 109 |
104 -l list debug modules | 110 -l list debug modules |
105 | 111 |
106 -d <debug> turn on debugging for module <debug> | 112 -d <debug> turn on debugging for module <debug> |
| 113 -i specify input/output file |
| 114 (instead of using dictionary file) |
107 | 115 |
108 | 116 |
109 In order to get random 30-byte values for use as key/salt pairs , you | 117 In order to get random 30-byte values for use as key/salt pairs , you |
110 can use the following bash function to format the output of | 118 can use the following bash function to format the output of |
111 /dev/random (where that device is available). | 119 /dev/random (where that device is available). |
112 | 120 |
113 function randhex() { | 121 function randhex() { |
114 cat /dev/random | od --read-bytes=32 --width=32 -x | awk '{ print $2 $3 $4 $5
$6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 }' | 122 cat /dev/random | od --read-bytes=32 --width=32 -x | awk '{ print $2 $3 $4 $5
$6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 }' |
115 } | 123 } |
116 | 124 |
117 | 125 |
118 An example of an SRTP session using two rtpw programs follows: | 126 An example of an SRTP session using two rtpw programs follows: |
119 | 127 |
120 set k=c1eec3717da76195bb878578790af71c4ee9f859e197a414a78d5abc7451 | 128 set k=c1eec3717da76195bb878578790af71c4ee9f859e197a414a78d5abc7451 |
121 | 129 |
122 [sh1]$ test/rtpw -s -k $k -ea 0.0.0.0 9999 | 130 [sh1]$ test/rtpw -s -k $k -e 128 -a 0.0.0.0 9999 |
123 Security services: confidentiality message authentication | 131 Security services: confidentiality message authentication |
124 set master key/salt to C1EEC3717DA76195BB878578790AF71C/4EE9F859E197A414A78D5ABC
7451 | 132 set master key/salt to C1EEC3717DA76195BB878578790AF71C/4EE9F859E197A414A78D5ABC
7451 |
125 setting SSRC to 2078917053 | 133 setting SSRC to 2078917053 |
126 sending word: A | 134 sending word: A |
127 sending word: a | 135 sending word: a |
128 sending word: aa | 136 sending word: aa |
129 sending word: aal | 137 sending word: aal |
130 ... | 138 ... |
131 | 139 |
132 [sh2]$ test/rtpw -r -k $k -ea 0.0.0.0 9999 | 140 [sh2]$ test/rtpw -r -k $k -e 128 -a 0.0.0.0 9999 |
133 security services: confidentiality message authentication | 141 security services: confidentiality message authentication |
134 set master key/salt to C1EEC3717DA76195BB878578790AF71C/4EE9F859E197A414A78D5ABC
7451 | 142 set master key/salt to C1EEC3717DA76195BB878578790AF71C/4EE9F859E197A414A78D5ABC
7451 |
135 19 octets received from SSRC 2078917053 word: A | 143 19 octets received from SSRC 2078917053 word: A |
136 19 octets received from SSRC 2078917053 word: a | 144 19 octets received from SSRC 2078917053 word: a |
137 20 octets received from SSRC 2078917053 word: aa | 145 20 octets received from SSRC 2078917053 word: aa |
138 21 octets received from SSRC 2078917053 word: aal | 146 21 octets received from SSRC 2078917053 word: aal |
139 ... | 147 ... |
140 | 148 |
141 Implementation Notes | 149 Implementation Notes |
142 | 150 |
(...skipping 22 matching lines...) Expand all Loading... |
165 sequence number in a random place, and the SRTP layer just jumps | 173 sequence number in a random place, and the SRTP layer just jumps |
166 forward to that number at its first invocation. An earlier | 174 forward to that number at its first invocation. An earlier |
167 version of this library used initial sequence numbers that are | 175 version of this library used initial sequence numbers that are |
168 less than 32,768; this trick is no longer required as the | 176 less than 32,768; this trick is no longer required as the |
169 rdbx_estimate_index(...) function has been made smarter. | 177 rdbx_estimate_index(...) function has been made smarter. |
170 | 178 |
171 * The replay window is 128 bits in length, and is hard-coded to this | 179 * The replay window is 128 bits in length, and is hard-coded to this |
172 value for now. | 180 value for now. |
173 | 181 |
174 | 182 |
OLD | NEW |