• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * crypto_types.h
3  *
4  * constants for cipher types and auth func types
5  *
6  * David A. McGrew
7  * Cisco Systems, Inc.
8  */
9 /*
10  *
11  * Copyright(c) 2001-2017 Cisco Systems, Inc.
12  * All rights reserved.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions
16  * are met:
17  *
18  *   Redistributions of source code must retain the above copyright
19  *   notice, this list of conditions and the following disclaimer.
20  *
21  *   Redistributions in binary form must reproduce the above
22  *   copyright notice, this list of conditions and the following
23  *   disclaimer in the documentation and/or other materials provided
24  *   with the distribution.
25  *
26  *   Neither the name of the Cisco Systems, Inc. nor the names of its
27  *   contributors may be used to endorse or promote products derived
28  *   from this software without specific prior written permission.
29  *
30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
33  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
34  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
35  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
36  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
41  * OF THE POSSIBILITY OF SUCH DAMAGE.
42  *
43  */
44 
45 #ifndef SRTP_CRYPTO_TYPES_H
46 #define SRTP_CRYPTO_TYPES_H
47 
48 /*
49  * The null cipher performs no encryption.
50  *
51  * The SRTP_NULL_CIPHER leaves its inputs unaltered, during both the
52  * encryption and decryption operations.  This cipher can be chosen
53  * to indicate that no encryption is to be performed.
54  */
55 #define SRTP_NULL_CIPHER 0
56 
57 /*
58  * AES-128 Integer Counter Mode (AES ICM)
59  *
60  * AES-128 ICM is the variant of counter mode that is used by
61  * Secure RTP.  This cipher uses a 16-octet key concatenated with a
62  * 14-octet offset (or salt) value.
63  */
64 #define SRTP_AES_ICM_128 1
65 
66 /*
67  * AES-192 Integer Counter Mode (AES ICM)
68  *
69  * AES-128 ICM is the variant of counter mode that is used by
70  * Secure RTP.  This cipher uses a 24-octet key concatenated with a
71  * 14-octet offset (or salt) value.
72  */
73 #define SRTP_AES_ICM_192 4
74 
75 /*
76  * AES-256 Integer Counter Mode (AES ICM)
77  *
78  * AES-128 ICM is the variant of counter mode that is used by
79  * Secure RTP.  This cipher uses a 32-octet key concatenated with a
80  * 14-octet offset (or salt) value.
81  */
82 #define SRTP_AES_ICM_256 5
83 
84 /*
85  * AES-128_GCM Galois Counter Mode (AES GCM)
86  *
87  * AES-128 GCM is the variant of galois counter mode that is used by
88  * Secure RTP.  This cipher uses a 16-octet key.
89  */
90 #define SRTP_AES_GCM_128 6
91 
92 /*
93  * AES-256_GCM Galois Counter Mode (AES GCM)
94  *
95  * AES-256 GCM is the variant of galois counter mode that is used by
96  * Secure RTP.  This cipher uses a 32-octet key.
97  */
98 #define SRTP_AES_GCM_256 7
99 
100 /*
101  * The null authentication function performs no authentication.
102  *
103  * The NULL_AUTH function does nothing, and can be selected to indicate
104  * that authentication should not be performed.
105  */
106 #define SRTP_NULL_AUTH 0
107 
108 /*
109  * HMAC-SHA1
110  *
111  * SRTP_HMAC_SHA1 implements the Hash-based MAC using the NIST Secure
112  * Hash Algorithm version 1 (SHA1).
113  */
114 #define SRTP_HMAC_SHA1 3
115 
116 #endif /* SRTP_CRYPTO_TYPES_H */
117