AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Enumerations | Functions
Cryptography API

Cryptographic Functions for ACSDK. More...

Namespaces

 alexaClientSDK::cryptoInterfaces
 Cryptographic Types and Interfaces.
 
 alexaClientSDK::cryptoInterfaces::test
 Test stubs and mocks for Cryptography API.
 

Classes

class  alexaClientSDK::cryptoInterfaces::CryptoCodecInterface
 Crypto codec (cipher) interface. More...
 
class  alexaClientSDK::cryptoInterfaces::CryptoFactoryInterface
 Crypto API factory interface. More...
 
class  alexaClientSDK::cryptoInterfaces::DigestInterface
 Digest computation interface. More...
 
class  alexaClientSDK::cryptoInterfaces::KeyFactoryInterface
 Key factory interface. More...
 
class  alexaClientSDK::cryptoInterfaces::KeyStoreInterface
 Key Store Interface. More...
 

Enumerations

enum  alexaClientSDK::cryptoInterfaces::AlgorithmType {
  alexaClientSDK::cryptoInterfaces::AlgorithmType::AES_256_CBC = 1, alexaClientSDK::cryptoInterfaces::AlgorithmType::AES_256_CBC_PAD = 2, alexaClientSDK::cryptoInterfaces::AlgorithmType::AES_128_CBC = 3, alexaClientSDK::cryptoInterfaces::AlgorithmType::AES_128_CBC_PAD = 4,
  alexaClientSDK::cryptoInterfaces::AlgorithmType::AES_256_GCM = 5, alexaClientSDK::cryptoInterfaces::AlgorithmType::AES_128_GCM = 6
}
 Enumeration of all supported encryption protocols. More...
 
enum  alexaClientSDK::cryptoInterfaces::DigestType { alexaClientSDK::cryptoInterfaces::DigestType::SHA_256 = 1, alexaClientSDK::cryptoInterfaces::DigestType::MD5 = 2 }
 Enumeration of all supported digest algorithms. More...
 

Functions

std::ostream & alexaClientSDK::cryptoInterfaces::operator<< (std::ostream &out, AlgorithmType value)
 Helper method to write algorithm type as a literal constant. More...
 
std::ostream & alexaClientSDK::cryptoInterfaces::operator<< (std::ostream &out, DigestType value)
 Helper method to write digest type as a literal constant. More...
 

Detailed Description

Cryptographic Functions for ACSDK.

This module provides APIs for encrypting and decrypting data, and for computing secure digests.

There are two ways for data encryption and decryption: through user-space cryptographic functions, accessible through alexaClientSDK::cryptoInterfaces::CryptoFactoryInterface and through hardware security module (HSM) accessible through alexaClientSDK::cryptoInterfaces::KeyStoreInterface.

When using alexaClientSDK::cryptoInterfaces::CryptoFactoryInterface user can generate keys and initialization vectors through alexaClientSDK::cryptoInterfaces::KeyFactoryInterface to use with cryptographic functions. When working with alexaClientSDK::cryptoInterfaces::KeyStoreInterface, keys must be pre-provisioned by device manufacturer and those keys can be used through references (aliases).

See also
Cryptographic Functions Implementation
Hardware Security Module Functions
alexaClientSDK::cryptoInterfaces
alexaClientSDK::cryptoInterfaces::test

Enumeration Type Documentation

◆ AlgorithmType

Enumeration of all supported encryption protocols.

This enumeration defines cipher type, key size, mode of operation, and padding.

Enumerator
AES_256_CBC 

AES 256 CBC.

AES Encryption with 256 bit key size and cipher block chaining.

AES_256_CBC_PAD 

AES 256 CBC with Padding.

AES Encryption with 256 bit key size, cipher block chaining, and PKCS#7 padding.

AES_128_CBC 

AES 128 CBC.

AES Encryption with 128 bit key size and cipher block chaining.

AES_128_CBC_PAD 

AES 128 CBC with Padding.

AES Encryption with 128 bit key size, cipher block chaining, and PKCS#7 padding.

AES_256_GCM 

AES 256 GCM.

AES Encryption with 256 bit key size and Galois/Counter mode. This algorithm belongs to Authenticated Encryption / Authenticated Decryption (AEAD) family.

AES_128_GCM 

AES 128 GCM.

AES Encryption with 128 bit key size and Galois/Counter mode. This algorithm belongs to Authenticated Encryption / Authenticated Decryption (AEAD) family.

◆ DigestType

Enumeration of all supported digest algorithms.

This enumeration provides list of supported digest algorithms.

Enumerator
SHA_256 

SHA-256 digest algorithm.

Secure Hash Algorithm 2 with 256 bit digest.

See also
https://en.wikipedia.org/wiki/SHA-2
MD5 

MD5 digest algorithm.

Message Digest algorithm 5 with 128 bit digest.

See also
https://en.wikipedia.org/wiki/MD5

Function Documentation

◆ operator<<() [1/2]

std::ostream& alexaClientSDK::cryptoInterfaces::operator<< ( std::ostream &  out,
DigestType  value 
)

Helper method to write digest type as a literal constant.

This method enables logging functions to accept digest type as a value.

Parameters
[in]outOutput stream.
[in]valueValue to write.
Returns
Output stream.

◆ operator<<() [2/2]

std::ostream& alexaClientSDK::cryptoInterfaces::operator<< ( std::ostream &  out,
AlgorithmType  value 
)

Helper method to write algorithm type as a literal constant.

This method enables logging functions to accept algorithm type as a value.

Parameters
[in]outOutput stream.
[in]valueValue to write.
Returns
Output stream.

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0