TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::DVS042< CIPHER, > Class Template Reference

DVS 042 cipher block chaining mode. More...

#include <tsDVS042.h>

Inheritance diagram for ts::DVS042< CIPHER, >:
Collaboration diagram for ts::DVS042< CIPHER, >:

Public Member Functions

 DVS042 ()
 Constructor.
 
bool setShortIV (const ByteBlock &iv)
 Set a new initialization vector for short blocks.
 
bool setShortIV (const void *iv_data, size_t iv_length)
 Set a new initialization vector for short blocks.
 

Protected Member Functions

 DVS042 (const BlockCipherProperties &props, bool ignore_short_iv=false)
 Constructor for subclasses which add some properties, such as fixed IV.
 

Static Protected Member Functions

static const BlockCipherPropertiesPROPERTIES ()
 Properties of this algorithm.
 

Detailed Description

template<class CIPHER, typename std::enable_if< std::is_base_of< BlockCipher, CIPHER >::value >::type * = nullptr>
class ts::DVS042< CIPHER, >

DVS 042 cipher block chaining mode.

DVS 042 has been renamed as "ANSI/SCTE 52 2003". It used to be available at http://www.scte.org/documents/pdf/ANSISCTE522003DVS042.pdf This file is no longer online. The next iteration of this standard is now "ANSI/SCTE 52 2008", available at http://www.scte.org/documents/pdf/Standards/ANSI_SCTE%2052%202008.pdf

The only noticeable difference between the two versions is the handling of messages shorter than the block size. In the 2003 (DVS 042) version, the same IV (called "whitener" in the standard) is used for long and short messages. In the 2008 version, a different "whitener2" must be used for messages shorter than the block size.

The ATIS-0800006 standard (IDSA) uses the same chaining mode and residue processing as DVS-042 but is based on AES instead of DES.

Template Parameters
CIPHERA subclass of ts::BlockCipher, the underlying block cipher.

Constructor & Destructor Documentation

◆ DVS042()

template<class CIPHER , typename std::enable_if< std::is_base_of< BlockCipher, CIPHER >::value >::type * = nullptr>
ts::DVS042< CIPHER, >::DVS042 ( const BlockCipherProperties props,
bool  ignore_short_iv = false 
)
protected

Constructor for subclasses which add some properties, such as fixed IV.

Parameters
[in]propsConstant reference to a block of properties of this block cipher.
[in]ignore_short_ivIngnore short IV, use the standard IV for short blocks.

Member Function Documentation

◆ setShortIV() [1/2]

template<class CIPHER , typename std::enable_if< std::is_base_of< BlockCipher, CIPHER >::value >::type * = nullptr>
bool ts::DVS042< CIPHER, >::setShortIV ( const void *  iv_data,
size_t  iv_length 
)

Set a new initialization vector for short blocks.

The method setIV() sets the IV for long blocks (longer than the block size) and short blocks (shorter than the block size). The latter can then be overwritten using setShortIV().

Parameters
[in]iv_dataAddress of initialization vector for short blocks.
[in]iv_lengthIV length in bytes.
Returns
True on success, false on error.

◆ setShortIV() [2/2]

template<class CIPHER , typename std::enable_if< std::is_base_of< BlockCipher, CIPHER >::value >::type * = nullptr>
bool ts::DVS042< CIPHER, >::setShortIV ( const ByteBlock iv)
inline

Set a new initialization vector for short blocks.

The method setIV() sets the IV for long blocks (longer than the block size) and short blocks (shorter than the block size). The latter can then be overwritten using setShortIV().

Parameters
[in]ivInitialization vector for short blocks.
Returns
True on success, false on error.

◆ PROPERTIES()

template<class CIPHER , typename std::enable_if< std::is_base_of< BlockCipher, CIPHER >::value >::type * = nullptr>
static const BlockCipherProperties & ts::DVS042< CIPHER, >::PROPERTIES ( )
inlinestaticprotected

Properties of this algorithm.

Returns
A constant reference to the properties.

The documentation for this class was generated from the following file: