/external/webrtc/webrtc/common_audio/ |
lapped_transform.cc | 38 size_t block_length = RealFourier::ComplexLength( local 40 RTC_CHECK_EQ(parent_->cplx_length_, block_length); 59 size_t block_length, 65 block_length_(block_length),
|
lapped_transform.h | 45 // made internally); |window| should have length equal to |block_length|. 46 // |block_length| defines the length of a block, in samples. 53 size_t block_length,
|
/external/webrtc/webrtc/modules/rtp_rtcp/source/rtcp_packet/ |
dlrr_unittest.cc | 48 uint16_t block_length = ByteReader<uint16_t>::ReadBigEndian(&kBlock[2]); local 49 EXPECT_TRUE(dlrr.Parse(kBlock, block_length)); 95 uint16_t block_length = ByteReader<uint16_t>::ReadBigEndian(&buffer[2]); local 96 EXPECT_EQ(used_buffer_size, (block_length + 1) * 4u); 97 EXPECT_TRUE(parsed.Parse(buffer, block_length));
|
/external/autotest/client/site_tests/cellular_MbimComplianceDataTransfer/ |
cellular_MbimComplianceDTS0612.py | 43 if nth.block_length > self.device_context.max_in_data_transfer_size: 48 if nth.block_length > self.device_context.max_in_data_transfer_size:
|
/system/keymaster/ |
iso18033kdf.cpp | 79 size_t block_length = min(digest_size_, output_len - block_start); local 80 memcpy(output + block_start, digest_result.get(), block_length);
|
/external/srtp/doc/ |
draft-irtf-cfrg-icm-00.txt | 97
Crypto Forum Research Group David A. McGrew
Internet Draft Cisco Systems, Inc.
Expires April, 2003 October, 2002
Integer Counter Mode
<draft-irtf-cfrg-icm-00.txt>
Status of this Memo
This document is an Internet Draft and is in full conformance with
all provisions of Section 10 of RFC-2026. Internet Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas,
and working groups. Note that other groups may also distribute
working documents as Internet Drafts.
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."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
1. Abstract
This document specifies Integer Counter Mode (ICM), a mode of
operation of a block cipher which defines an indexed keystream
generator (which generates a keystream segment given an index).
This mode is efficient, parallelizable, and has been proven secure
given realistic assumptions about the block cipher. Test vectors
are provided for AES.
Counter Mode admits many variations. The variant specified in
this document is secure and flexible, yet it enables a single
implementation of a keystream generator to suffice in different
application domains.
McGrew [Page 1]
Internet Draft Integer Counter Mode October, 2002
2. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in RFC-2119 [B97].
3. Introduction
Counter Mode is a way to define a pseudorandom keystream generator
using a block cipher [CTR]. The keystream can be used for additive
encryption, key derivation, or any other application requiring
pseudorandom data.
In ICM, the keystream is logically broken into segments. Each
segment is identified with a segment index, and the segments have
equal lengths. This segmentation makes ICM especially appropriate
for securing packet-based protocols.
4. ICM
In this section, ICM keystream generation and encryption are
defined.
4.1. ICM Parameters
The following parameters are used in ICM. These parameters MUST
remain fixed for any given use of a key.
Parameter Meaning
-----------------------------------------------------------------
BLOCK_LENGTH the number of octets in the cipher block
KEY_LENGTH the number of octets in the cipher key
OFFSET_LENGTH the number of octets in the offset
SEGMENT_INDEX_LENGTH the number of octets in the segment index
BLOCK_INDEX_LENGTH the number of octets in the block index
4.2. Keystream Segments
Conceptually, ICM is a keystream generator that takes a secret key
and a segment index as an input and then outputs a keystream
segment. The segmentation lends itself to packet encryption, as
each keystream segment can be used to encrypt a distinct packet.
A counter is a value containing BLOCK_LENGTH octets which is
McGrew [Page 2]
Internet Draft Integer Counter Mode October, 2002
incremented using an increment function based on integer addition,
to produce a sequence of distinct values which are used as inputs to
the block cipher. (In the context of this specification, an integer
is an octet string, the most significant of which is the first.)
The output blocks of the cipher are concatenated to form the
keystream segment. The first octet of the segment is the first
octet of the first output block, and so on. A schematic of this
process is shown in Figure 1.
Figure 1. The generation of a keystream segment given a segment
index and a block cipher key K. Here C[i] and S[i] denote the ith
counter and keystream block, respectively.
segment
index
|
v
C[0] -----> C[1] -----> C[2] -----> ...
| | |
v v v
+---+ +---+ +---+
K->| E | K->| E | K->| E | ...
+---+ +---+ +---+
| | |
v v v
S[0] S[1] S[2] ...
The ith counter C[i] of the keystream segment with segment index s
is defined as
C[i] = (i + s * (256^BLOCK_INDEX_LENGTH)) (+) r
where r denotes the shifted Offset, which is defined as the Offset
times 256^(BLOCK_LENGTH - OFFSET_LENGTH). (This multiplication
left-shifts the Offset so that it is aligned with the leftmost
edge of the block.) Here ^ denotes exponentiation and (+) denotes
the bitwise exclusive-or operation.
The number of blocks in any segment MUST NOT exceed
256^BLOCK_INDEX_LENGTH. The number of segments MUST NOT exceed
256^SEGMENT_INDEX_LENGTH. These restrictions ensure the uniqueness
of each block cipher input. They also imply that each segment
contains no more than (256^BLOCK_INDEX_LENGTH)*BLOCK_LENGTH octets.
The sum of SEGMENT_INDEX_LENGTH and BLOCK_INDEX_LENGTH MUST NOT
exceed BLOCK_LENGTH / 2. This requirement protects the ICM
keystream generator from potentially failing to be pseudorandom (see
McGrew [Page 3]
Internet Draft Integer Counter Mode October, 2002
the rationale).
Figure 2. An illustration of the structure of a counter with
BLOCK_LENGTH = 8, SEGMENT_INDEX_LENGTH = 2, and BLOCK_INDEX_LENGTH
= 2. The field marked `null' is not part of either the block
or segment indices.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| null |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| segment index | block index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
4.3. ICM Encryption
Unless otherwise specified, ICM encryption consists of bitwise
exclusive-oring the keystream into the plaintext to produce
the ciphertext.
4.4 ICM KEY
An ICM key consists of the block cipher key and an Offset. The
Offset is an integer with OFFSET_LENGTH octets, which is used to
`randomize' the logical starting point of keystream. The Offset is
crucial to providing security; see the rationale. The value of
OFFSET_LENGTH SHOULD be at least half that of BLOCK_LENGTH.
For the purposes of transporting an ICM key, e.g. in a signaling
protocol, that key SHOULD be considered a sequence of octets in
which the block cipher key precedes the Offset.
5. Implementation Considerations
Implementation of the `add one modulo 2^m' operation is simple. For
example, with BLOCK_LENGTH = 8 (m=64), it can be implemented in C as
if (!++x) ++y;
where x and y are 32-bit unsigned integers in network byte order.
The implementation of general purpose addition modulo 2^m is
slightly more complicated.
The fact that the Offset is left-aligned enables an implementation
McGrew [Page 4]
Internet Draft Integer Counter Mode October, 2002
to avoid propagating carry values outside of the block index and/or
the segment index. Choosing an OFFSET_LENGTH value equal to half
that of BLOCK_LENGTH avoids all of these carries, since the Offset
is then shifted so that it occupies the most significant octets of
the block, while the block and segment indices occupy the least
significant ones.
6. Parameters and Test Vectors for AES
This section provides ICM parameters and test vectors for AES
with a 128 bit block size and 128 bit key (that is, with a
BLOCK_LENGTH and KEY_LENGTH of 16).
All integers are expressed in hexadecimal. Each consecutive pair of
h (…) [all...] |
/external/webrtc/webrtc/modules/audio_coding/neteq/tools/ |
packet_unittest.cc | 120 int block_length, 130 rtp_data[2] |= block_length >> 8; 131 rtp_data[3] = block_length & 0xFF; 155 int block_length = 10 * i; local 158 payload_type, timestamp_offset, block_length, last_block, payload_ptr);
|
/hardware/intel/common/omx-components/videocodec/libvpx_internal/libvpx/ |
webmenc.c | 216 unsigned int block_length; local 272 block_length = (unsigned int)pkt->data.frame.sz + 4; 273 block_length |= 0x10000000; 274 Ebml_Serialize(glob, &block_length, sizeof(block_length), 4);
|
/hardware/broadcom/libbt/src/ |
bt_vendor_brcm_a2dp.c | 211 switch(codec_info->block_length) { 213 codec_info->block_length = CODEC_INFO_SBC_BLOCK_4; break; 215 codec_info->block_length = CODEC_INFO_SBC_BLOCK_8; break; 217 codec_info->block_length = CODEC_INFO_SBC_BLOCK_12; break; 219 codec_info->block_length = CODEC_INFO_SBC_BLOCK_16; break; 258 parsed_info->block_length = *codec_info & A2D_SBC_IE_BLOCKS_MSK; 269 if(MULTI_BIT_SET(parsed_info->block_length)) 282 __FUNCTION__, status, parsed_info->sampling_freq, parsed_info->channel_mode, parsed_info->block_length, 570 UINT8_TO_STREAM(p, brcm_vnd_a2dp_pdata.codec_info.block_length);
|
/external/llvm/lib/Fuzzer/ |
FuzzerSHA1.cpp | 49 #define BLOCK_LENGTH 64 52 uint32_t buffer[BLOCK_LENGTH/4]; 56 uint8_t keyBuffer[BLOCK_LENGTH]; 141 if (s->bufferOffset == BLOCK_LENGTH) {
|
/external/autotest/client/cros/cellular/mbim_compliance/ |
mbim_data_transfer.py | 281 block_length=ntb_curr_offset, 318 if len(raw_ntb_frame) != self.nth.block_length: 322 len(raw_ntb_frame), self.nth.block_length)) 512 ('H', 'block_length'), 534 ('I', 'block_length'),
|
mbim_data_transfer_unittest.py | 129 self.assertEqual(nth.block_length, 144)
|
/external/mesa3d/src/gallium/auxiliary/gallivm/ |
lp_bld_sample_aos.c | 65 * \param block_length is the length of the pixel block along the 77 unsigned block_length, 121 lp_build_sample_partial_offset(int_coord_bld, block_length, coord, stride, 179 * \param block_length is the length of the pixel block along the 193 unsigned block_length, 220 if (block_length != 1) { 267 lp_build_sample_partial_offset(int_coord_bld, block_length, coord0, stride, 269 lp_build_sample_partial_offset(int_coord_bld, block_length, coord1, stride, 341 * \param block_length is the length of the pixel block along the 354 unsigned block_length, [all...] |
lp_bld_sample.c | [all...] |
lp_bld_sample.h | 389 unsigned block_length,
|
/external/autotest/client/cros/audio/ |
audio_analysis.py | 278 block_length = len(test_signal) 279 number_of_movings = len(golden_signal) - block_length + 1 285 end = start + block_length
|
/external/ImageMagick/coders/ |
gif.c | 1120 block_length, local 1831 block_length; local [all...] |
/external/wpa_supplicant_8/src/tls/ |
tlsv1_record.c | 178 /* opaque IV[Cipherspec.block_length] */ 379 /* Remove opaque IV[Cipherspec.block_length] */
|
/external/webrtc/webrtc/modules/rtp_rtcp/source/ |
rtp_sender.cc | 1249 uint8_t block_length = 0; local [all...] |
rtcp_packet.h | 108 size_t block_length, // Size in 32bit words - 1.
|
/toolchain/binutils/binutils-2.25/gas/config/ |
tc-arm.h | 266 int block_length; member in struct:current_it
|
tc-arm.c | [all...] |
/external/v8/test/cctest/ |
test-regexp.cc | 1582 unsigned block_length = block_end - block_start + 1; local [all...] |
/hardware/broadcom/libbt/include/ |
uipc_msg.h | 556 UINT8 block_length; member in struct:__anon30409
|