Telematics SDK - API Reference  v1.64.0
Security Management

Data Structures

struct  telux::sec::LoadConfig
 
struct  telux::sec::CACapacity
 
struct  telux::sec::CALoad
 
class  telux::sec::ICAControlManagerListener
 
class  telux::sec::ICAControlManager
 
struct  telux::sec::EnvironmentInfo
 
struct  telux::sec::CellularSecurityReport
 
struct  telux::sec::SessionStats
 
class  telux::sec::ICellularScanReportListener
 
class  telux::sec::ICellularSecurityManager
 
class  telux::sec::ConnectionSecurityFactory
 ConnectionConnectionSecurityFactory allows creation of CellularSecurityManager and WiFiSecurityManager. More...
 
struct  telux::sec::ECCPoint
 
struct  telux::sec::DataDigest
 
struct  telux::sec::Signature
 
struct  telux::sec::Scalar
 
struct  telux::sec::OperationResult
 
class  telux::sec::ICryptoAcceleratorListener
 
class  telux::sec::ICryptoAcceleratorManager
 
class  telux::sec::ResultParser
 
class  telux::sec::ICryptoParam
 
struct  telux::sec::EncryptedData
 
class  telux::sec::ICryptoManager
 ICryptoManager provides key management and crypto operation support. It uses trusted hardware bound cryptography. All keys generated are bound to the device cryptographically. More...
 
class  telux::sec::CryptoParamBuilder
 
class  telux::sec::IRandomNumberManager
 IRandomNumberManager can be used to generate random number/data. More...
 
class  telux::sec::SecurityFactory
 SecurityFactory allows creation of ICryptoManager and ICryptoAcceleratorManager. More...
 
struct  telux::sec::MLAlgorithmAnalysis
 
struct  telux::sec::SummoningAnalysis
 
struct  telux::sec::WiFiSecurityReport
 
struct  telux::sec::DeauthenticationInfo
 
struct  telux::sec::ApInfo
 
class  telux::sec::IWiFiReportListener
 
class  telux::sec::IWiFiSecurityManager
 

Typedefs

using telux::sec::CryptoOperationTypes = int32_t
 
using telux::sec::BlockModeTypes = int32_t
 
using telux::sec::PaddingTypes = int32_t
 
using telux::sec::DigestTypes = int32_t
 
using telux::sec::AlgorithmTypes = int32_t
 
using telux::sec::CurveTypes = int32_t
 

Enumerations

enum  telux::sec::CellularThreatType {
  telux::sec::CellularThreatType::UNKNOWN = (1 << 1), telux::sec::CellularThreatType::IMPRISON = (1 << 2), telux::sec::CellularThreatType::DOS = (1 << 3), telux::sec::CellularThreatType::DOWNGRADE = (1 << 4),
  telux::sec::CellularThreatType::LOCATION_TRACKED_USING_IMSI = (1 << 5), telux::sec::CellularThreatType::LOCATION_TRACKED_USING_AUTH = (1 << 6), telux::sec::CellularThreatType::PERSUADE = (1 << 7), telux::sec::CellularThreatType::NO_THREAT_DETECTED = (1 << 8),
  telux::sec::CellularThreatType::NO_ENCRYPTION = (1 << 9), telux::sec::CellularThreatType::WEAK_ENCRYPTION = (1 << 10), telux::sec::CellularThreatType::SELF_BLACKLISTING_CELL = (1 << 11), telux::sec::CellularThreatType::UNAUTHENTICATED_SMS = (1 << 12),
  telux::sec::CellularThreatType::UNAUTHENTICATED_EMERGENCY_MESSAGE = (1 << 13), telux::sec::CellularThreatType::IMSI_LEAK = (1 << 14)
}
 
enum  telux::sec::EnvironmentState { telux::sec::EnvironmentState::UNKNOWN, telux::sec::EnvironmentState::SAFE, telux::sec::EnvironmentState::ALERT, telux::sec::EnvironmentState::HOSTILE }
 
enum  telux::sec::ActionType {
  telux::sec::ActionType::NONE, telux::sec::ActionType::DEPRIORITIZED, telux::sec::ActionType::REMOVED_DEPRIORITIZATION, telux::sec::ActionType::CELL_BARRED,
  telux::sec::ActionType::REMOVED_CELL_BARRING, telux::sec::ActionType::INVALID
}
 
enum  telux::sec::RATType {
  telux::sec::RATType::UNKNOWN = 1, telux::sec::RATType::GSM, telux::sec::RATType::WCDMA, telux::sec::RATType::LTE,
  telux::sec::RATType::NR5G
}
 
enum  telux::sec::Mode { telux::sec::Mode::MODE_SYNC, telux::sec::Mode::MODE_ASYNC_POLL, telux::sec::Mode::MODE_ASYNC_LISTENER }
 
enum  telux::sec::RequestPriority { telux::sec::RequestPriority::REQ_PRIORITY_HIGH, telux::sec::RequestPriority::REQ_PRIORITY_NORMAL }
 
enum  telux::sec::ECCCurve {
  telux::sec::ECCCurve::CURVE_SM2, telux::sec::ECCCurve::CURVE_NISTP256, telux::sec::ECCCurve::CURVE_NISTP384, telux::sec::ECCCurve::CURVE_BRAINPOOLP256R1,
  telux::sec::ECCCurve::CURVE_BRAINPOOLP384R1
}
 
enum  telux::sec::OperationType { telux::sec::OperationType::OP_TYPE_VERIFY, telux::sec::OperationType::OP_TYPE_CALCULATE }
 
enum  telux::sec::CryptoOperation { telux::sec::CRYPTO_OP_ENCRYPT = (1 << 1), telux::sec::CRYPTO_OP_DECRYPT = (1 << 2), telux::sec::CRYPTO_OP_SIGN = (1 << 3), telux::sec::CRYPTO_OP_VERIFY = (1 << 4) }
 
enum  telux::sec::BlockMode { telux::sec::BLOCK_MODE_ECB = (1 << 1), telux::sec::BLOCK_MODE_CBC = (1 << 2), telux::sec::BLOCK_MODE_CTR = (1 << 3), telux::sec::BLOCK_MODE_GCM = (1 << 4) }
 
enum  telux::sec::Padding {
  telux::sec::PADDING_NONE = (1 << 1), telux::sec::PADDING_RSA_OAEP = (1 << 2), telux::sec::PADDING_RSA_PSS = (1 << 3), telux::sec::PADDING_RSA_PKCS1_1_5_ENC = (1 << 4),
  telux::sec::PADDING_RSA_PKCS1_1_5_SIGN = (1 << 5), telux::sec::PADDING_PKCS7 = (1 << 6)
}
 
enum  telux::sec::Digest {
  telux::sec::DIGEST_NONE = (1 << 1), telux::sec::DIGEST_MD5 = (1 << 2), telux::sec::DIGEST_SHA1 = (1 << 3), telux::sec::DIGEST_SHA_2_224 = (1 << 4),
  telux::sec::DIGEST_SHA_2_256 = (1 << 5), telux::sec::DIGEST_SHA_2_384 = (1 << 6), telux::sec::DIGEST_SHA_2_512 = (1 << 7)
}
 
enum  telux::sec::Algorithm {
  telux::sec::ALGORITHM_UNKNOWN, telux::sec::ALGORITHM_RSA, telux::sec::ALGORITHM_EC, telux::sec::ALGORITHM_AES,
  telux::sec::ALGORITHM_HMAC
}
 
enum  telux::sec::Curve { telux::sec::CURVE_P_224, telux::sec::CURVE_P_256, telux::sec::CURVE_P_384, telux::sec::CURVE_P_521 }
 
enum  telux::sec::KeyFormat { telux::sec::KEY_FORMAT_X509, telux::sec::KEY_FORMAT_PKCS8, telux::sec::KEY_FORMAT_RAW }
 
enum  telux::sec::RNGSource { telux::sec::RNGSource::QTI_HW_TRNG = 1, telux::sec::RNGSource::DEV_RANDOM = 2 }
 
enum  telux::sec::AnalysisResult { telux::sec::AnalysisResult::NO_RESULT, telux::sec::AnalysisResult::NEW_ASSOCIATION, telux::sec::AnalysisResult::NO_THREAT_DETECTED, telux::sec::AnalysisResult::MALICIOUS }
 

Variables

static const uint32_t telux::sec::CA_RESULT_DATA_LENGTH = 96
 

Detailed Description

This section contains APIs related to security management.


Data Structure Documentation

struct telux::sec::LoadConfig

Specifies how load should be calculated.

Data Fields
uint64_t calculationInterval
struct telux::sec::CACapacity

Represents curve-wise absolute capacity. This value represents capacity as if only that type of curve is used in all crypto operations. For example, a capacity of 3000 for sm2 means, 3000 signature verifications of type sm2 can be done under current operating conditions, when no other type of verifications are performed.

Data Fields
uint32_t sm2
uint32_t nist256
uint32_t nist384
uint32_t bp256
uint32_t bp384
struct telux::sec::CALoad

Represents curve-wise absolute load as calculated in the time window defined by LoadConfig::loadCalculationInterval. For example, a value of 1000 for sm2 means, in that time window, 1000 sm2 type verification were completed. This verification includes both passed and failed signature.

Data Fields
uint32_t sm2
uint32_t nist256
uint32_t nist384
uint32_t bp256
uint32_t bp384
class telux::sec::ICAControlManagerListener

Receives load and capacity updates.

Public Member Functions

virtual void onCapacityUpdate (struct CACapacity newCapacity)
 
virtual void onLoadUpdate (struct CALoad currentLoad)
 
virtual ~ICAControlManagerListener ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICAControlManagerListener::~ICAControlManagerListener ( )
virtual

Destructor for ICAControlManagerListener.

Member Function Documentation

virtual void telux::sec::ICAControlManagerListener::onCapacityUpdate ( struct CACapacity  newCapacity)
virtual

Invoked to provide an updated capacity.

Parameters
[in]newCapacityNew capacity as per current allowed conditions.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::sec::ICAControlManagerListener::onLoadUpdate ( struct CALoad  currentLoad)
virtual

Invoked to provide load on crypto accelerator, as observed during time window defined by LoadConfig::loadCalculationInterval.

Parameters
[in]currentLoadLoad as observed in the set time window.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::sec::ICAControlManager

Public Member Functions

virtual telux::common::ErrorCode registerListener (std::weak_ptr< ICAControlManagerListener > listener)=0
 
virtual telux::common::ErrorCode deRegisterListener (std::weak_ptr< ICAControlManagerListener > listener)=0
 
virtual telux::common::ErrorCode startMonitoring (LoadConfig loadConfig)=0
 
virtual telux::common::ErrorCode stopMonitoring ()=0
 
virtual telux::common::ErrorCode getCapacity (CACapacity &capacity)=0
 
virtual ~ICAControlManager ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICAControlManager::~ICAControlManager ( )
virtual

Destructor of ICAControlManager. Cleans up as applicable.

Member Function Documentation

virtual telux::common::ErrorCode telux::sec::ICAControlManager::registerListener ( std::weak_ptr< ICAControlManagerListener listener)
pure virtual

Registers the given listener to get load and capacity updates in ICAControlManagerListener::onLoadUpdate() and ICAControlManagerListener::onCapacityUpdate() methods.

Capacity updates are received whenever capacity changes. Load updates are received as per parameters specified with startMonitoring().

Parameters
[in]listenerReceives load and capacity updates
Returns
telux::common::Status::SUCCESS if the listener is registered, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICAControlManager::deRegisterListener ( std::weak_ptr< ICAControlManagerListener listener)
pure virtual

Unregisters the given listener registered previously with registerListener().

Parameters
[in]listenerListener to deregister
Returns
telux::common::Status::SUCCESS if the listener is unregistered, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICAControlManager::startMonitoring ( LoadConfig  loadConfig)
pure virtual

Starts monitoring and reporting load calculated based on the parameters specified. Calculated load is received by ICAControlManagerListener::onLoadUpdate() periodically as per time interval specified.

On platforms with access control enabled, caller needs to have TELUX_SEC_CA_CTRL_LOAD_OPS permission to invoke this API successfully.

Parameters
[in]loadConfigDefines load calculation parameters
Returns
telux::common::Status::SUCCESS if the monitoring started, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICAControlManager::stopMonitoring ( )
pure virtual

Stops monitoring the load calculation previosuly started by startMonitoring().

On platforms with access control enabled, caller needs to have TELUX_SEC_CA_CTRL_LOAD_OPS permission to invoke this API successfully.

Returns
telux::common::Status::SUCCESS if the monitoring stopped, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICAControlManager::getCapacity ( CACapacity capacity)
pure virtual

Provides current verification capacity of the crypto accelerator.

Parameters
[out]capacitycurrent capacity of the crypto accelerator
Returns
telux::common::Status::SUCCESS if the capacity is fetched, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
struct telux::sec::EnvironmentInfo

Describes an overall cellular environment's information.

Data Fields
EnvironmentState environmentState

Please refer EnvironmentState for details.

struct telux::sec::CellularSecurityReport

Represents security scan report for a cellular connection per base station.

Data Fields
uint32_t threatScore

The higher the score higher the possibility of a compromised/malicious base station. The range of valid values for the score is configurable in the platform. The default range is 0 to 500.

uint32_t cellId

Unique identifier of a cell operated by a mobile network operator.

uint32_t pid

Physical cell id; identifier of a cell in the physical layer of the cellular technology.

string mcc

Mobile country code to uniquely identify a mobile network operator (carrier).

string mnc

Mobile network code to uniquely identify a mobile network operator (carrier).

vector< CellularThreatType > threats

Types of the threat identified. Please refer CellularThreatType for more details.

ActionType actionType

Action taken based on the policy configured and threat score.

RATType rat

Radio access technology being used for communication between the device and the base station (2G/GERAN, 3G/WCDMA, 4G/LTE and 5G/NR).

struct telux::sec::SessionStats

For the current session, it represents a high-level summary of the security stats gathered till now. This gives an overall idea about the operational cellular environment.

This can be useful in cases for example, to decide whether a security sensitive operation should be deferred to a later time or place with less hostile environment or extra preventive measures should be activated.

Data Fields
uint32_t reportsCount

Number of the reports received.

uint32_t thresholdCrossedCount

Number of times hostile score threshold was crossed. This count depends on the value of the threshold configured in the platform. This count increments each time the threat score increases beyond this threshold.

vector< CellularThreatType > threats

Different types of threats detected.

uint32_t averageThreatScore

An average score (average of CellularSecurityReport::threatScore).

ActionType lastAction

Last action that was taken based on the policy configured, when a malicious activity was detected.

bool anyActionTaken

Set to true, if an action was taken, when the score crossed hostile threshold.

class telux::sec::ICellularScanReportListener

Receives security scan reports when a change in cellular environment is detected. For example;

  1. Device connects to a given cell tower.
  2. Device moves between different cell towers.
  3. A new cellular base station is detected.
  4. There is a change in the threat score beyond defined threshold.

Public Member Functions

virtual void onScanReportAvailable (CellularSecurityReport report, EnvironmentInfo environmentInfo)
 
virtual ~ICellularScanReportListener ()
 
- Public Member Functions inherited from telux::common::IServiceStatusListener
virtual void onServiceStatusChange (ServiceStatus status)
 
virtual ~IServiceStatusListener ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICellularScanReportListener::~ICellularScanReportListener ( )
virtual

Destructor for ICellularScanReportListener.

Member Function Documentation

virtual void telux::sec::ICellularScanReportListener::onScanReportAvailable ( CellularSecurityReport  report,
EnvironmentInfo  environmentInfo 
)
virtual

Invoked to provide a security scan report for cellular connection environment.

Parameters
[in]reportCellularSecurityReport result of the cellular security scanning
[in]environmentInfoEnvironmentInfo overall environment information
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::sec::ICellularSecurityManager

Provides support for detecting, monitoring and generating security threat scan report for cellular connections.

When a change in the cellular operating environment is detected, information about the environment is gathered and analyzed for targeted, general purpose attacks and anomalies. This information is then provided as a security scan report.

The report includes information such as, IMSI leak, tracking location of the device, denial of service, man-in-the-middle attack, spam or phishing SMS, fake emergency messages and rogue base stations.

Public Member Functions

virtual telux::common::ErrorCode registerListener (std::weak_ptr< ICellularScanReportListener > reportListener)=0
 
virtual telux::common::ErrorCode deRegisterListener (std::weak_ptr< ICellularScanReportListener > reportListener)=0
 
virtual telux::common::ErrorCode getCurrentSessionStats (SessionStats &sessionStats)=0
 
virtual ~ICellularSecurityManager ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICellularSecurityManager::~ICellularSecurityManager ( )
virtual

Destructor of ICellularSecurityManager. Cleans up as applicable.

Member Function Documentation

virtual telux::common::ErrorCode telux::sec::ICellularSecurityManager::registerListener ( std::weak_ptr< ICellularScanReportListener reportListener)
pure virtual

Registers given listener to receive cellular security scan report.

On platforms with access control enabled, caller needs to have TELUX_SEC_CCS_REPORT permission to invoke this API successfully.

ICellularScanReportListener::onCellularScanReportAvailable()

Parameters
[in]reportListenerReceives security scan reports
Returns
telux::common::ErrorCode::SUCCESS, if the listener is registered, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICellularSecurityManager::deRegisterListener ( std::weak_ptr< ICellularScanReportListener reportListener)
pure virtual

Unregisters the given listener registered previously with registerListener().

On platforms with access control enabled, caller needs to have TELUX_SEC_CCS_REPORT permission to invoke this API successfully.

Parameters
[in]reportListenerListener to unregister
Returns
telux::common::ErrorCode::SUCCESS, if the listener is deregistered, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICellularSecurityManager::getCurrentSessionStats ( SessionStats sessionStats)
pure virtual

Gets current session statistics such as average score, number of reports generated, and threat types detected etc.

A session starts when a listener is registered using ICellularSecurityManager::registerListener and ends when it is deregistered using ICellularSecurityManager::deRegisterListener.

On platforms with access control enabled, caller needs to have TELUX_SEC_CCS_REPORT permission to invoke this API successfully.

Parameters
[out]sessionStatsSessionStats will contain current session's stats upon method return
Returns
Status telux::common::ErrorCode::SUCCESS, if the stats are fetched successfully, otherwise, an appropriate error code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::sec::ConnectionSecurityFactory

ConnectionConnectionSecurityFactory allows creation of CellularSecurityManager and WiFiSecurityManager.

Public Member Functions

virtual std::shared_ptr< ICellularSecurityManagergetCellularSecurityManager (telux::common::ErrorCode &ec)=0
 
virtual std::shared_ptr< IWiFiSecurityManagergetWiFiSecurityManager (telux::common::ErrorCode &ec)=0
 

Static Public Member Functions

static ConnectionSecurityFactorygetInstance ()
 

Member Function Documentation

static ConnectionSecurityFactory& telux::sec::ConnectionSecurityFactory::getInstance ( )
static

Gets the ConnectionSecurityFactory instance.

virtual std::shared_ptr<ICellularSecurityManager> telux::sec::ConnectionSecurityFactory::getCellularSecurityManager ( telux::common::ErrorCode ec)
pure virtual

Provides an ICellularSecurityManager instance that detects and monitors security threats and generates security scan reports for cellular connections.

Parameters
[out]ectelux::common::ErrorCode::SUCCESS if ICellularSecurityManager is created successfully, otherwise, an appropriate error code
Returns
ICellularSecurityManager instance or nullptr, if an error occurred
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual std::shared_ptr<IWiFiSecurityManager> telux::sec::ConnectionSecurityFactory::getWiFiSecurityManager ( telux::common::ErrorCode ec)
pure virtual

Provides an IWiFiSecurityManager instance that detects and monitors security threats and generates security analysis reports for WiFi connections.

Parameters
[out]ectelux::common::ErrorCode::SUCCESS if IWiFiSecurityManager is created successfully, otherwise, an appropriate error code
Returns
IWiFiSecurityManager instance or nullptr, if an error occurred
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
struct telux::sec::ECCPoint

Represents a point on an elliptic curve.

Data Fields
uint8_t * x
size_t xLength
uint8_t * y
size_t yLength
struct telux::sec::DataDigest

Represents digest of the data whose signature is to be verified.

Data Fields
uint8_t * digest
size_t digestLength
struct telux::sec::Signature

Represents signature of the digest to be verified.

Data Fields
uint8_t * rSignature
uint8_t * sSignature
size_t rsLength
struct telux::sec::Scalar

Represents scalar value to be used with an ECQV operation.

Data Fields
uint8_t * scalar
size_t scalarLength
struct telux::sec::OperationResult

Represents a result obtained from the crypto accelerator. The value of an individual field must only be interpreted through helper methods in ResultParser.

Data Fields
uint32_t reserved:4
uint32_t id:12
uint32_t operationType:3
uint32_t result:4
uint32_t errCode:9
uint8_t data[CA_RESULT_DATA_LENGTH]
class telux::sec::ICryptoAcceleratorListener

Receives ECC signature verification and ECQV calculation result.

Public Member Functions

virtual void onVerificationResult (uint32_t uniqueId, telux::common::ErrorCode errorCode, std::vector< uint8_t > resultData)
 
virtual void onCalculationResult (uint32_t uniqueId, telux::common::ErrorCode errorCode, std::vector< uint8_t > resultData)
 
virtual ~ICryptoAcceleratorListener ()
 
- Public Member Functions inherited from telux::common::IServiceStatusListener
virtual void onServiceStatusChange (ServiceStatus status)
 
virtual ~IServiceStatusListener ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICryptoAcceleratorListener::~ICryptoAcceleratorListener ( )
virtual

Destructor for ICryptoAcceleratorListener.

Member Function Documentation

virtual void telux::sec::ICryptoAcceleratorListener::onVerificationResult ( uint32_t  uniqueId,
telux::common::ErrorCode  errorCode,
std::vector< uint8_t >  resultData 
)
virtual

Invoked to provide an ECC signature verification result.

Parameters
[in]uniqueIdUnique request identifier. This is the same as what was passed to ICryptoAcceleratorManager::eccPostDigestForVerification()
[in]errorCodetelux::common::ErrorCode::SUCCESS, if signature passed validation, telux::common::ErrorCode::VERIFICATION_FAILED if all inputs were correct, verification completed and signature was invalid, an appropriate error code in all other cases
[in]resultDataContains the r' (computed r-component of the signature)
virtual void telux::sec::ICryptoAcceleratorListener::onCalculationResult ( uint32_t  uniqueId,
telux::common::ErrorCode  errorCode,
std::vector< uint8_t >  resultData 
)
virtual

Invoked to provide an ECQV calculation result.

Parameters
[in]uniqueIdUnique request identifier. This is the same as what was passed to ICryptoAcceleratorManager::ecqvPostDataForMultiplyAndAdd()
[in]errorCodetelux::common::ErrorCode::SUCCESS, if calculation succeeded, otherwise, an appropriate error code
[in]resultDataOutput point Q (Q=kP+A). For CURVE_SM2, CURVE_NISTP256 and CURVE_BRAINPOOLP256R1, byte from 0 to 31 contains x-coordinate, and byte from 32 to 63 contains y-coordinate. For CURVE_NISTP384 and CURVE_BRAINPOOLP384R1, byte from 0 to 47 contains x-coordinate, and byte from 48 to 95 contains y-coordinate.
class telux::sec::ICryptoAcceleratorManager

Provides support for ECC based signature verification and calculation related crypto operations.

APIs with asynchronous and synchronous semantics are provided for the same operation, providing flexibility to optimally support multiple client solutions.

Clients that prefer to invoke verifications from a thread and consume the results on a different thread should use the asynchronous APIs. Clients that prefer to invoke verification APIs and block until the result is ready, should use the synchronous APIs.

Public Member Functions

virtual telux::common::ErrorCode eccPostDigestForVerification (const DataDigest &digest, const ECCPoint &publicKey, const Signature &signature, telux::sec::ECCCurve curve, uint32_t uniqueId, telux::sec::RequestPriority priority)=0
 
virtual telux::common::ErrorCode ecqvPostDataForMultiplyAndAdd (const ECCPoint &multiplicandPoint, const ECCPoint &addendPoint, const Scalar &scalar, telux::sec::ECCCurve curve, uint32_t uniqueId, telux::sec::RequestPriority priority)=0
 
virtual telux::common::ErrorCode getAsyncResults (std::vector< OperationResult > &results, uint32_t numResultsToRead, int32_t timeout, uint32_t &numResultsRead)=0
 
virtual telux::common::ErrorCode eccVerifyDigest (const DataDigest &digest, const ECCPoint &publicKey, const Signature &signature, telux::sec::ECCCurve curve, uint32_t uniqueId, telux::sec::RequestPriority priority, std::vector< uint8_t > &resultData)=0
 
virtual telux::common::ErrorCode ecqvPointMultiplyAndAdd (const ECCPoint &multiplicandPoint, const ECCPoint &addendPoint, const Scalar &scalar, telux::sec::ECCCurve curve, uint32_t uniqueId, telux::sec::RequestPriority priority, std::vector< uint8_t > &resultData)=0
 
virtual ~ICryptoAcceleratorManager ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICryptoAcceleratorManager::~ICryptoAcceleratorManager ( )
virtual

Destructor of ICryptoAcceleratorManager. Cleans up as applicable.

Member Function Documentation

virtual telux::common::ErrorCode telux::sec::ICryptoAcceleratorManager::eccPostDigestForVerification ( const DataDigest digest,
const ECCPoint publicKey,
const Signature signature,
telux::sec::ECCCurve  curve,
uint32_t  uniqueId,
telux::sec::RequestPriority  priority 
)
pure virtual

Sends hashed ECC data to the crypto accelerator for integrity verification using the given public key and signature.

Verification result is received by the ICryptoAcceleratorListener::onVerificationResult() method for MODE_ASYNC_LISTENER. For MODE_ASYNC_POLL, getAsyncResults() is used to obtain the results.

Parameters
[in]digestDigest of data
[in]publicKeyUncompressed public key used to verify the signature
[in]signatureSignature of the digest
[in]curveECC curve on which given public key lies
[in]uniqueIdUnique identifier for each request. This number must be unique across all requests for which results are pending. Once the result for a request is received, the same number can be reused. Valid value range is 0 <= uniqueId <= 4095.
[in]priorityRelative priority indicating this digest should be verified before any other low priority digest
Returns
telux::common::ErrorCode::SUCCESS, if the data is sent to the accelerator, otherwise an appropriate error code
virtual telux::common::ErrorCode telux::sec::ICryptoAcceleratorManager::ecqvPostDataForMultiplyAndAdd ( const ECCPoint multiplicandPoint,
const ECCPoint addendPoint,
const Scalar scalar,
telux::sec::ECCCurve  curve,
uint32_t  uniqueId,
telux::sec::RequestPriority  priority 
)
pure virtual

Sends data to the crypto accelerator to perform a point multiplication and addition for 'Short Weierstrass' curves; Q=kP+A.

Calculation result is received by the ICryptoAcceleratorListener::onCalculationResult() method for MODE_ASYNC_LISTENER. For MODE_ASYNC_POLL, getAsyncResults() is used to obtain the results.

Parameters
[in]multiplicandPointPoint to multiply (P). In context of public key reconstruction, it represents the reconstruction value
[in]addendPointPoint to add (A). In context of public key reconstruction, it represents the CA public key
[in]scalarScalar for the scalar multiplication (k). In context of public key reconstruction, it represents the hash construct
[in]curveECC curve associated with point P and A
[in]uniqueIdUnique identifier for each request. This number must be unique across all requests for which results are pending. Once the result for a request is received, the the same number can be reused. Valid value range is 0 <= uniqueId <= 4095.
[in]priorityRelative priority indicating this calculation should be performed before any other low priority operation
Returns
telux::common::ErrorCode::SUCCESS, if the data is sent to the accelerator, otherwise an appropriate error code
virtual telux::common::ErrorCode telux::sec::ICryptoAcceleratorManager::getAsyncResults ( std::vector< OperationResult > &  results,
uint32_t  numResultsToRead,
int32_t  timeout,
uint32_t &  numResultsRead 
)
pure virtual

When using Mode::MODE_ASYNC_POLL, ICryptoAcceleratorManager::eccPostDigestForVerification() and ICryptoAcceleratorManager::ecqvPostDataForMultiplyAndAdd() APIs are used to send request.

The result of these request is obtained asynchronously using this method. It blocks until result(s) is available or timeout occurs.

Caller should allocate sufficient memory pointed by 'results'.

Parameters
[in,out]resultsBuffer that will contain the results
[in]numResultsToReadNumber of the results to read
[in]timeoutTime to wait (in milliseconds) for the result(s). Specifying a negative value means an infinite timeout. Zero value means return immediately (there may or may not be any results read).
[out]numResultsReadNumber of results actually read
Returns
telux::common::ErrorCode::SUCCESS, if the result(s) are obtained successfully, otherwise an appropriate error code
virtual telux::common::ErrorCode telux::sec::ICryptoAcceleratorManager::eccVerifyDigest ( const DataDigest digest,
const ECCPoint publicKey,
const Signature signature,
telux::sec::ECCCurve  curve,
uint32_t  uniqueId,
telux::sec::RequestPriority  priority,
std::vector< uint8_t > &  resultData 
)
pure virtual

Verifies the signature of the digest using given public key.

Parameters
[in]digestDigest of data
[in]publicKeyUncompressed public key used to verify the signature
[in]signatureSignature of the digest
[in]curveECC curve on which given public key lies
[in]uniqueIdUnique identifier for each request. This number must be unique across all requests for which results are pending. Once the result for a request is received, the same number can be reused. Valid value range is 0 <= uniqueId <= 4095.
[in]priorityRelative priority indicating this digest should be verified before any other low priority digest
[out]resultDataContains the r' prime (computed r-component of the signature)
Returns
telux::common::ErrorCode::SUCCESS, if signature passed validation, telux::common::ErrorCode::VERIFICATION_FAILED if all inputs were correct, verification completed and signature was invalid, an appropriate error code in all other cases
virtual telux::common::ErrorCode telux::sec::ICryptoAcceleratorManager::ecqvPointMultiplyAndAdd ( const ECCPoint multiplicandPoint,
const ECCPoint addendPoint,
const Scalar scalar,
telux::sec::ECCCurve  curve,
uint32_t  uniqueId,
telux::sec::RequestPriority  priority,
std::vector< uint8_t > &  resultData 
)
pure virtual

Performs a point multiplication and addition for 'Short Weierstrass' curves; Q=kP+A with the help of accelerator. This can be used, for example; to reconstruct a public key, using 'Elliptic Curve Qu-Vanstone (ECQV)' implicit certificate scheme.

Parameters
[in]multiplicandPointPoint to multiply (P). In context of public key reconstruction, it represents the reconstruction value
[in]addendPointPoint to add (A). In context of public key reconstruction, it represents the CA public key
[in]scalarScalar for the scalar multiplication (k). In context of public key reconstruction, it represents the hash construct
[in]curveECC curve associated with point P and A
[in]uniqueIdUnique identifier for each request. This number must be unique across all requests for which results are pending. Once the result for a request is received, the the same number can be reused. Valid value range is 0 <= uniqueId <= 4095.
[in]priorityRelative priority indicating this calculation should be performed before any other low priority operation
[out]resultDataOutput point Q (Q=kP+A). For CURVE_SM2, CURVE_NISTP256 and CURVE_BRAINPOOLP256R1, byte from 0 to 31 contains x-coordinate, and byte from 32 to 63 contains y-coordinate. For CURVE_NISTP384 and CURVE_BRAINPOOLP384R1, byte from 0 to 47 contains x-coordinate, and byte from 48 to 95 contains y-coordinate.
Returns
telux::common::ErrorCode::SUCCESS, if the calculation succeeded, otherwise an appropriate error code
class telux::sec::ResultParser

Provides helpers to parse fields in the OperationResult.

Static Public Member Functions

static uint32_t getId (const OperationResult &result)
 
static OperationType getOperationType (const OperationResult &result)
 
static telux::common::ErrorCode getErrorCode (const OperationResult &result)
 
static telux::common::ErrorCode getCAErrorCode (const OperationResult &result)
 
static uint8_t * getData (OperationResult &result)
 

Member Function Documentation

static uint32_t telux::sec::ResultParser::getId ( const OperationResult result)
static

Gets the unique identifier associated with the result.

Parameters
[in]resultResult obtained from ICryptoAcceleratorManager::getAsyncResults()
Returns
Unique identifier associated with the result. This is the same as what was passed in request
static OperationType telux::sec::ResultParser::getOperationType ( const OperationResult result)
static

Gets the type of operation corresponding to this result; values are and OperationType::OP_TYPE_VERIFY and OperationType::OP_TYPE_CALCULATE.

Parameters
[in]resultResult obtained from ICryptoAcceleratorManager::getAsyncResults()
Returns
Operation type - OperationType::OP_TYPE_VERIFY for signature verification, OperationType::OP_TYPE_CALCULATE for point calculation.
static telux::common::ErrorCode telux::sec::ResultParser::getErrorCode ( const OperationResult result)
static

Indicates if the operation passed.

Parameters
[in]resultResult obtained from ICryptoAcceleratorManager::getAsyncResults()
Returns
For ECC verification, telux::common::ErrorCode::SUCCESS, if signature passed validation, telux::common::ErrorCode::VERIFICATION_FAILED if all inputs were correct, verification completed and signature was invalid, an appropriate error code in all other cases. For ECQV calculation, telux::common::ErrorCode::SUCCESS, if the calculation succeeded, an appropriate error code in all other cases
static telux::common::ErrorCode telux::sec::ResultParser::getCAErrorCode ( const OperationResult result)
static

Provides a crypto accelerator hardware specific error code to further identify the actual error. Should be used only if getErrorCode() indicates an error occurred.

Parameters
[in]resultResult obtained from ICryptoAcceleratorManager::getAsyncResults()
Returns
Error code - telux::common::ErrorCode::* as obtained from the accelerator
static uint8_t* telux::sec::ResultParser::getData ( OperationResult result)
static

Gets the actual result data. For ECC verification, it contains r-prime and for ECQV it contains coordinates.

Parameters
[in]resultResult obtained from ICryptoAcceleratorManager::getAsyncResults()
Returns
Pointer to the data, For ECC verification contains r-prime, For ECQV calculatio contains coordinates
class telux::sec::ICryptoParam

Specifies how a crypto operation should be performed. An instance of this must be created only thorough CryptoParamBuilder.

Public Member Functions

virtual ~ICryptoParam ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICryptoParam::~ICryptoParam ( )
virtual
struct telux::sec::EncryptedData

Represents encrypted data and optional nonce.

Data Fields
vector< uint8_t > encryptedText

Encrypted text.

vector< uint8_t > nonce

Generated nonce.

class telux::sec::ICryptoManager

ICryptoManager provides key management and crypto operation support. It uses trusted hardware bound cryptography. All keys generated are bound to the device cryptographically.

Public Member Functions

virtual telux::common::ErrorCode generateKey (std::shared_ptr< ICryptoParam > cryptoParam, std::vector< uint8_t > &keyBlob)=0
 
virtual telux::common::ErrorCode importKey (std::shared_ptr< ICryptoParam > cryptoParam, telux::sec::KeyFormat keyFmt, std::vector< uint8_t > const &keyData, std::vector< uint8_t > &keyBlob)=0
 
virtual telux::common::ErrorCode exportKey (telux::sec::KeyFormat keyFmt, std::vector< uint8_t > const &keyBlob, std::vector< uint8_t > &keyData)=0
 
virtual telux::common::ErrorCode upgradeKey (std::shared_ptr< ICryptoParam > cryptoParam, std::vector< uint8_t > const &oldKeyBlob, std::vector< uint8_t > &newKeyBlob)=0
 
virtual telux::common::ErrorCode signData (std::shared_ptr< ICryptoParam > cryptoParam, std::vector< uint8_t > const &keyBlob, std::vector< uint8_t > const &plainText, std::vector< uint8_t > &signature)=0
 
virtual telux::common::ErrorCode verifyData (std::shared_ptr< ICryptoParam > cryptoParam, std::vector< uint8_t > const &keyBlob, std::vector< uint8_t > const &plainText, std::vector< uint8_t > const &signature)=0
 
virtual telux::common::ErrorCode encryptData (std::shared_ptr< ICryptoParam > cryptoParam, std::vector< uint8_t > const &keyBlob, std::vector< uint8_t > const &plainText, std::shared_ptr< EncryptedData > &encryptedData)=0
 
virtual telux::common::ErrorCode decryptData (std::shared_ptr< ICryptoParam > cryptoParam, std::vector< uint8_t > const &keyBlob, std::vector< uint8_t > const &encryptedText, std::vector< uint8_t > &decryptedText)=0
 
virtual ~ICryptoManager ()
 

Constructor & Destructor Documentation

virtual telux::sec::ICryptoManager::~ICryptoManager ( )
virtual

Destroys the ICryptoManager instance. Performs cleanup as applicable.

Member Function Documentation

virtual telux::common::ErrorCode telux::sec::ICryptoManager::generateKey ( std::shared_ptr< ICryptoParam cryptoParam,
std::vector< uint8_t > &  keyBlob 
)
pure virtual

Generates key and provides it in the form of a corresponding key blob. The key's secret is encrypted in this key blob.

On platforms with access control enabled, the caller needs to have TELUX_SEC_KEY_OPS permission to successfully invoke this API.

Parameters
[in]cryptoParamSpecifications of the key.
[out]keyBlobKey blob representing the key.
Returns
telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICryptoManager::importKey ( std::shared_ptr< ICryptoParam cryptoParam,
telux::sec::KeyFormat  keyFmt,
std::vector< uint8_t > const &  keyData,
std::vector< uint8_t > &  keyBlob 
)
pure virtual

Creates a key blob from the given key data.

On platforms with access control enabled, the caller needs to have TELUX_SEC_KEY_OPS permission to successfully invoke this API.

Parameters
[in]cryptoParamSpecifications of the key
[in]keyFmtFormat in which the key should be imported (KeyFormat)
[in]keyDataKey's data, in the specified format, to be imported.
[out]keyBlobKey blob created from the given key data.
Returns
telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICryptoManager::exportKey ( telux::sec::KeyFormat  keyFmt,
std::vector< uint8_t > const &  keyBlob,
std::vector< uint8_t > &  keyData 
)
pure virtual

Generates equivalent key data from the given key blob.

On platforms with access control enabled, the caller needs to have TELUX_SEC_KEY_OPS permission to successfully invoke this API.

Parameters
[in]keyFmtKeyFormat Format in which key should be exported.
[in]keyBlobKey blob representing the key to be exported.
[out]keyDataKey's data generated from the given key blob.
Returns
telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICryptoManager::upgradeKey ( std::shared_ptr< ICryptoParam cryptoParam,
std::vector< uint8_t > const &  oldKeyBlob,
std::vector< uint8_t > &  newKeyBlob 
)
pure virtual

Upgrades the given key if it has expired. For example, This API can be used when a key has expired due to a system software upgrade.

On platforms with access control enabled, the caller needs to have TELUX_SEC_KEY_OPS permission to successfully invoke this API.

Parameters
[in]cryptoParamInput parameters passed to the upgrade algorithm. Specifically, unique data should be set if it was used when the key was originally created.
[in]oldKeyBlobKey blob representing the key to be upgraded.
[out]newKeyBlobKey blob representing the upgraded key.
Returns
telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICryptoManager::signData ( std::shared_ptr< ICryptoParam cryptoParam,
std::vector< uint8_t > const &  keyBlob,
std::vector< uint8_t > const &  plainText,
std::vector< uint8_t > &  signature 
)
pure virtual

Generates a signature to verify the integrity of the given data.

On platforms with access control enabled, the caller needs to have TELUX_SEC_SIGN_OPS permission to successfully invoke this API.

Parameters
[in]cryptoParamInput parameters passed to the signature generation algorithm.
[in]keyBlobKey blob to sign given data.
[in]plainTextData to be signed.
[out]signatureSignature generated for the given data.
Returns
telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICryptoManager::verifyData ( std::shared_ptr< ICryptoParam cryptoParam,
std::vector< uint8_t > const &  keyBlob,
std::vector< uint8_t > const &  plainText,
std::vector< uint8_t > const &  signature 
)
pure virtual

Verifies integrity of the given data through its signature.

On platforms with access control enabled, the caller needs to have TELUX_SEC_SIGN_OPS permission to successfully invoke this API.

Parameters
[in]cryptoParamInput parameters passed to the signature validation algorithm.
[in]keyBlobKey blob to verify the given data.
[in]plainTextData to be verified.
[in]signatureSignature of the data.
Returns
telux::common::ErrorCode::SUCCESS if verification is passed otherwise telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICryptoManager::encryptData ( std::shared_ptr< ICryptoParam cryptoParam,
std::vector< uint8_t > const &  keyBlob,
std::vector< uint8_t > const &  plainText,
std::shared_ptr< EncryptedData > &  encryptedData 
)
pure virtual

Encrypts data per the given inputs to the encryption algorithm.

On platforms with access control enabled, the caller needs to have TELUX_SEC_ENCRYPTION_OPS permission to successfully invoke this API.

Parameters
[in]cryptoParamInput parameters passed to the encryption algorithm.
[in]keyBlobKey blob to be used for encryption.
[in]plainTextData to be encrypted.
[out]encryptedDataEncrypted data and nonce, if CryptoParamBuilder::setCallerNonce() was not set when creating keys for encryption/decryption).
Returns
telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::ICryptoManager::decryptData ( std::shared_ptr< ICryptoParam cryptoParam,
std::vector< uint8_t > const &  keyBlob,
std::vector< uint8_t > const &  encryptedText,
std::vector< uint8_t > &  decryptedText 
)
pure virtual

Decrypts data per the given inputs to the decryption algorithm.

On platforms with access control enabled, the caller needs to have TELUX_SEC_ENCRYPTION_OPS permission to successfully invoke this API.

Parameters
[in]cryptoParamInput parameters passed to the decryption algorithm.
[in]keyBlobKey blob to be used for decryption.
[in]encryptedTextEncrypted data to be decrypted.
[out]decryptedTextDecrypted data.
Returns
telux::common::ErrorCode as appropriate.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::sec::CryptoParamBuilder

CryptoParamBuilder helps setup input parameters for a given crypto operation.

Public Member Functions

 CryptoParamBuilder ()
 
CryptoParamBuilder setAlgorithm (AlgorithmTypes algorithm)
 
CryptoParamBuilder setCryptoOperation (CryptoOperationTypes operation)
 
CryptoParamBuilder setDigest (DigestTypes digest)
 
CryptoParamBuilder setPadding (PaddingTypes padding)
 
CryptoParamBuilder setKeySize (int32_t keySize)
 
CryptoParamBuilder setMinimumMacLength (int32_t minMacLength)
 
CryptoParamBuilder setMacLength (int32_t macLength)
 
CryptoParamBuilder setBlockMode (BlockModeTypes blockMode)
 
CryptoParamBuilder setCurve (int32_t curve)
 
CryptoParamBuilder setCallerNonce (bool callerNonce)
 
CryptoParamBuilder setPublicExponent (uint64_t publicExponent)
 
CryptoParamBuilder setInitVector (std::vector< uint8_t > initVector)
 
CryptoParamBuilder setUniqueData (std::vector< uint8_t > uniqueData)
 
CryptoParamBuilder setAssociatedData (std::vector< uint8_t > associatedData)
 
std::shared_ptr< ICryptoParambuild (void)
 

Constructor & Destructor Documentation

telux::sec::CryptoParamBuilder::CryptoParamBuilder ( )

Allocates an instance of CryptoParamBuilder.

Member Function Documentation

CryptoParamBuilder telux::sec::CryptoParamBuilder::setAlgorithm ( AlgorithmTypes  algorithm)

When generating keys, specifies with which algorithm the keys will be used. For crypto operations, specifies the algorithm to use. Use telux::sec::Algorithm enumeration to define this.

CryptoParamBuilder telux::sec::CryptoParamBuilder::setCryptoOperation ( CryptoOperationTypes  operation)

When generating keys, specifies the crypto operation(s) for which the key will be used. For crypto operations, specifies the operation itself (encrypting/decrypting/ signing/verifying). Use telux::sec::CryptoOperation enumeration to define this. Multiple operation values can be OR'ed (|).

CryptoParamBuilder telux::sec::CryptoParamBuilder::setDigest ( DigestTypes  digest)

When generating keys, specifies the digest algorithm(s) that may be used with the key to perform signing and verifying operations using RSA, ECDSA, and HMAC keys. For crypto operations, specifies exact digest algorithm to be used. Use telux::sec::Digest enumeration to define this. Multiple values can be OR'ed (|).

CryptoParamBuilder telux::sec::CryptoParamBuilder::setPadding ( PaddingTypes  padding)

When generating keys, specifies the padding modes that may be used with the RSA and AES key. For crypto operations, specifies the exact padding to be used. Use telux::sec::Padding enumeration to define this. Multiple padding values can be OR'ed (|).

CryptoParamBuilder telux::sec::CryptoParamBuilder::setKeySize ( int32_t  keySize)

When generating keys, specifies the size in bits, of the key, measured in the regular way for the key's algorithm.

  • For RSA keys, specifies the size of the public modulus.
  • For AES keys, specifies length of the secret key material.
  • For HMAC keys, specifies the key size in bits.
  • For EC keys, selects the EC group.
CryptoParamBuilder telux::sec::CryptoParamBuilder::setMinimumMacLength ( int32_t  minMacLength)

When generating keys, specifies minimum length of the MAC in bits that can be requested or verified with this key for HMAC keys and AES keys that support GCM mode.

CryptoParamBuilder telux::sec::CryptoParamBuilder::setMacLength ( int32_t  macLength)

For crypto operations, specifies requested length of a MAC or GCM (which is guaranteed to be no less then minimum length of the MAC/GCM used when generating the key).

CryptoParamBuilder telux::sec::CryptoParamBuilder::setBlockMode ( BlockModeTypes  blockMode)

When generating keys, specifies the block cipher mode(s) with which this key can be used. For crypto operations, specifies the exact block mode to be used. Use telux::sec::BlockMode enumeration to define this. Multiple block mode values can be OR'ed (|).

CryptoParamBuilder telux::sec::CryptoParamBuilder::setCurve ( int32_t  curve)

When generating the keys using an EC algorithm, only key size, only curve, or both key size and curve can be specified. If only key size is specified, the appropriate NIST curve is selected automatically. If only curve is specified, the given curve is used. If both are specified, the given curve is used and key size is validated.

CryptoParamBuilder telux::sec::CryptoParamBuilder::setCallerNonce ( bool  callerNonce)

When generating AES key, if callerNonce is set to true, it specifies that an explicit nonce will be supplied by the caller during encryption and decryption using setInitVector(). If the callerNonce is set to false (or not set), platform will generate the nonce during encryption. This nonce should be passed during decryption.

CryptoParamBuilder telux::sec::CryptoParamBuilder::setPublicExponent ( uint64_t  publicExponent)

When generating an RSA key, specifies the value of the public exponent for an RSA key pair (necessary for all RSA keys).

CryptoParamBuilder telux::sec::CryptoParamBuilder::setInitVector ( std::vector< uint8_t >  initVector)

When performing AES crypto operations, specifies the initialization vector to be used.

CryptoParamBuilder telux::sec::CryptoParamBuilder::setUniqueData ( std::vector< uint8_t >  uniqueData)

When generating or importing a key, an optional arbitrary value can be supplied through this method. In all subsequent use of the key, this value must be supplied again. The data given is bound to the key cryptographically. This data ties the key to the caller.

CryptoParamBuilder telux::sec::CryptoParamBuilder::setAssociatedData ( std::vector< uint8_t >  associatedData)

When encrypting/decrypting data, this specifies optional associated data to be used. This is applicable only for AES-GCM algorithm.

std::shared_ptr<ICryptoParam> telux::sec::CryptoParamBuilder::build ( void  )

Creates an instance of ICryptoParam based on the setter methods invoked on the builder. After building the builder's state is reset.

class telux::sec::IRandomNumberManager

IRandomNumberManager can be used to generate random number/data.

Public Member Functions

virtual telux::common::ErrorCode getRandomNumber (uint32_t &generatedNumber)=0
 
virtual telux::common::ErrorCode getRandomNumber (uint64_t &generatedNumber)=0
 
virtual telux::common::ErrorCode getRandomData (std::vector< uint8_t > &generatedData, size_t &dataLength)=0
 
virtual ~IRandomNumberManager ()
 

Constructor & Destructor Documentation

virtual telux::sec::IRandomNumberManager::~IRandomNumberManager ( )
virtual

Destroys the IRandomNumberManager instance. Performs cleanup as applicable.

Member Function Documentation

virtual telux::common::ErrorCode telux::sec::IRandomNumberManager::getRandomNumber ( uint32_t &  generatedNumber)
pure virtual

Gets a 32 bit random number.

Parameters
[out]generatedNumberrandom number generated
Returns
telux::common::ErrorCode::SUCCESS if the random number is generated successfully otherwise an appropriate error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::IRandomNumberManager::getRandomNumber ( uint64_t &  generatedNumber)
pure virtual

Gets a 64 bit random number.

Parameters
[out]generatedNumberrandom number generated
Returns
telux::common::ErrorCode::SUCCESS if the random number is generated successfully otherwise an appropriate error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::IRandomNumberManager::getRandomData ( std::vector< uint8_t > &  generatedData,
size_t &  dataLength 
)
pure virtual

Gets random data bytes up to the length defined by generatedData.size(). The dataLength gives how many bytes are actually generated.

Parameters
[out]generatedDatawill contain random data
[out]dataLengthnumber of bytes generated
Returns
telux::common::ErrorCode::SUCCESS if the random data is generated successfully otherwise an appropriate error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::sec::SecurityFactory

Public Member Functions

virtual std::shared_ptr< ICryptoManagergetCryptoManager (telux::common::ErrorCode &ec)=0
 
virtual std::shared_ptr< ICryptoAcceleratorManagergetCryptoAcceleratorManager (telux::common::ErrorCode &ec, Mode mode, std::weak_ptr< ICryptoAcceleratorListener > cryptoAccelListener=std::weak_ptr< ICryptoAcceleratorListener >())=0
 
virtual std::shared_ptr< ICAControlManagergetCAControlManager (telux::common::ErrorCode &ec)=0
 
virtual std::shared_ptr< IRandomNumberManagergetRandomNumberManager (RNGSource generatorSource, telux::common::ErrorCode &ec)=0
 

Static Public Member Functions

static SecurityFactorygetInstance ()
 

Member Function Documentation

static SecurityFactory& telux::sec::SecurityFactory::getInstance ( )
static

Gets the SecurityFactory instance.

virtual std::shared_ptr<ICryptoManager> telux::sec::SecurityFactory::getCryptoManager ( telux::common::ErrorCode ec)
pure virtual

Instantiates a CryptoManager instance that can be used to perform key management and cryptographic operations.

Parameters
[out]ectelux::common::ErrorCode::SUCCESS if ICryptoManager is created successfully, otherwise, an appropriate error code
Returns
ICryptoManager instance
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual std::shared_ptr<ICryptoAcceleratorManager> telux::sec::SecurityFactory::getCryptoAcceleratorManager ( telux::common::ErrorCode ec,
Mode  mode,
std::weak_ptr< ICryptoAcceleratorListener cryptoAccelListener = std::weak_ptr< ICryptoAcceleratorListener >() 
)
pure virtual

Provides a CryptoAcceleratorManager instance that can be used to perform cryptographic operations requiring elliptic-curve cryptography (ECC) verifications and calculations.

Providing ICryptoAcceleratorListener instance is mandatory when using Mode::MODE_ASYNC_LISTENER. It is not required with modes, Mode::MODE_SYNC and Mode::MODE_ASYNC_POLL for cryptographic operations.

To receive subsystem-restart (SSR) updates, application must provide ICryptoAcceleratorListener instance (irrespective of Mode::*) and implement method telux::common::IServiceStatusListener::onServiceStatusChange().

Specifying mode (Mode::*) defines how an application will send request and receive cryptographic results.

Passing listener determines whether an application is also interested in SSR updates in addition to cryptographic results or not.

On platforms with access control enabled, caller needs to have TELUX_SEC_ACCELERATOR_MGR permission to invoke this API successfully.

Parameters
[out]ectelux::common::ErrorCode::SUCCESS if ICryptoAcceleratorManager is created successfully, otherwise, an appropriate error code
[in]modeDefines how users obtain verification and calculation results
[in]cryptoAccelListenerOptional, listener for ECC signature verification and ECQV calculation results
Returns
ICryptoAcceleratorManager instance
virtual std::shared_ptr<ICAControlManager> telux::sec::SecurityFactory::getCAControlManager ( telux::common::ErrorCode ec)
pure virtual

Provides an ICAControlManager instance that can be used to collect statistical information about usage of the crypto accelerator.

On platforms with access control enabled, caller needs to have TELUX_SEC_CA_CONTROL_MGR permission to invoke this API successfully.

Parameters
[out]ectelux::common::ErrorCode::SUCCESS if the ICAControlManager is created successfully, otherwise, an appropriate error code
Returns
ICAControlManager instance
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual std::shared_ptr<IRandomNumberManager> telux::sec::SecurityFactory::getRandomNumberManager ( RNGSource  generatorSource,
telux::common::ErrorCode ec 
)
pure virtual

Provides an IRandomNumberManager instance that can be used to generate random number/data.

Parameters
[in]generatorSourceRandom number generator source to use
[out]ectelux::common::ErrorCode::SUCCESS if the IRandomNumberManager is created successfully, telux::common::ErrorCode::INCOMPATIBLE_STATE if the platform has been configured to use a RNG that does not correspond to the RNGSource passed to the API, otherwise, an appropriate error code.
Returns
IRandomNumberManager instance
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
struct telux::sec::MLAlgorithmAnalysis

Machine learning algorithm threat analysis result per AP.

Data Fields
uint32_t threatScore

Higher threat scores indicate a higher possibility that the AP is malicious; range is 0 to 100.

AnalysisResult result

Result of the security analysis for a given AP.

struct telux::sec::SummoningAnalysis

Summoning attack threat analysis result.

Data Fields
AnalysisResult result

Result of the security analysis for a given AP.

struct telux::sec::WiFiSecurityReport

Represents the security report for a Wi-Fi AP.

Data Fields
string ssid

Network interface name of the AP.

string bssid

MAC address of the AP.

bool isConnectedToAP

True if the device is connected to this AP.

bool isOpenAP

True if devices can connect to this AP without authentication.

MLAlgorithmAnalysis mlAlgorithmAnalysis

Machine learning algorithm threat analysis result.

SummoningAnalysis summoningAnalysis

Summoning attack threat analysis result.

struct telux::sec::DeauthenticationInfo

Represents information about a deauthentication attack.

Data Fields
int deauthenticationReason

Reason code why disassociation or deauthentication occurred as specified by the IEEE 802.11 standard.

bool didAPInitiateDisconnect

True if the AP initiated the disconnection.

uint32_t threatScore

Higher threat scores indicate a higher possibility that this is a deauthentication attack; range is 0 to 100.

struct telux::sec::ApInfo

Represents a WiFi access point.

Data Fields
string ssid

Network interface name of the AP.

string bssid

MAC address of the AP.

class telux::sec::IWiFiReportListener

Receives security analysis reports for the Wi-Fi APs detected while scanning for APs in the vicinity and provides a listener for deauthentication attacks.

Public Member Functions

virtual void onReportAvailable (WiFiSecurityReport report)
 
virtual void onDeauthenticationAttack (DeauthenticationInfo deauthenticationInfo)
 
virtual void isTrustedAP (ApInfo accessPoint, bool &isTrusted)
 
virtual ~IWiFiReportListener ()
 

Constructor & Destructor Documentation

virtual telux::sec::IWiFiReportListener::~IWiFiReportListener ( )
virtual

IWiFiReportListener destructor.

Member Function Documentation

virtual void telux::sec::IWiFiReportListener::onReportAvailable ( WiFiSecurityReport  report)
virtual

Notifies that the implementation completed a threat analysis and that the report is available This analysis is performed at various triggers, for example, when a scan for APs is triggered the implementation will perform an analysis and provide a report for every AP it sees in the vicinity.

Parameters
[in]reportWiFiSecurityReport result of the Wi-Fi security analysis.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::sec::IWiFiReportListener::onDeauthenticationAttack ( DeauthenticationInfo  deauthenticationInfo)
virtual

Notifies that a deauthentication attack is identified.

Parameters
[in]deauthenticationInfoDeauthenticationInfo security analysis information.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::sec::IWiFiReportListener::isTrustedAP ( ApInfo  accessPoint,
bool &  isTrusted 
)
virtual

Gets user confirmation that the given AP is trusted. This is called only once when the device connects to this AP for the very first time. If the application trusts the given AP, it should set 'isTrusted' to True. Otherwise it should be set to false.

Once the users confirms that an AP is trusted, this information is saved internally and used later to detect threats like evil twin attacks.

On platforms with access control enabled, the caller needs to have the TELUX_SEC_WCS_CONFIG permission to successfully invoke this API.

Parameters
[in]accessPointApInfo provides information about an AP.
[in]isTrustedTrue if trusted; false otherwise.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::sec::IWiFiSecurityManager

Provides support for detecting, monitoring, and generating security reports for Wi-Fi APs.

Public Member Functions

virtual telux::common::ErrorCode registerListener (std::weak_ptr< IWiFiReportListener > reportListener)=0
 
virtual telux::common::ErrorCode deregisterListener (std::weak_ptr< IWiFiReportListener > reportListener)=0
 
virtual telux::common::ErrorCode getTrustedApList (std::vector< ApInfo > &trustedAPList)=0
 
virtual telux::common::ErrorCode removeApFromTrustedList (ApInfo apInfo)=0
 
virtual ~IWiFiSecurityManager ()
 

Constructor & Destructor Documentation

virtual telux::sec::IWiFiSecurityManager::~IWiFiSecurityManager ( )
virtual

IWiFiSecurityManager destructor; cleans up as applicable.

Member Function Documentation

virtual telux::common::ErrorCode telux::sec::IWiFiSecurityManager::registerListener ( std::weak_ptr< IWiFiReportListener reportListener)
pure virtual

Registers the given listener to receive Wi-Fi connection security reports. These reports will be received by IWiFiReportListener::onReportAvailable().

On platforms with access control enabled, the caller needs to have the TELUX_SEC_WCS_REPORT permission to successfully invoke this API.

Parameters
[in]reportListenerReceives security reports.
Returns
telux::common::ErrorCode::SUCCESS, if the listener is registered, otherwise, an appropriate error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::IWiFiSecurityManager::deregisterListener ( std::weak_ptr< IWiFiReportListener reportListener)
pure virtual

Unregisters the given listener registered previously with registerListener().

On platforms with access control enabled, the caller needs to have the TELUX_SEC_WCS_REPORT permission to successfully invoke this API.

Parameters
[in]reportListenerListener to unregister.
Returns
telux::common::ErrorCode::SUCCESS, if the listener is deregistered, otherwise, an appropriate error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::IWiFiSecurityManager::getTrustedApList ( std::vector< ApInfo > &  trustedAPList)
pure virtual

Lists all the trusted APs.

On platforms with access control enabled, the caller needs to have the TELUX_SEC_WCS_INFO permission to successfully invoke this API.

Parameters
[in]trustedAPListList of trusted APs ( ApInfo ).
Returns
telux::common::ErrorCode::SUCCESS, if the list is retrived otherwise, an appropriate error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::ErrorCode telux::sec::IWiFiSecurityManager::removeApFromTrustedList ( ApInfo  apInfo)
pure virtual

Removes the given AP from the saved list of trusted APs. If the device connects to the same AP again, ::isTrustedAP() will be invoked again.

On platforms with access control enabled, the caller needs to have the TELUX_SEC_WCS_CONFIG permission to successfully invoke this API.

Parameters
[in]apInfoAP to distrust ( ApInfo ).
Returns
telux::common::ErrorCode::SUCCESS, if the AP is distrusted otherwise, an appropriate error code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.

Typedef Documentation

using telux::sec::CryptoOperationTypes = typedef int32_t

List of operation types consisting of entries from CryptoOperation. Multiple values can be OR'ed together, for example, (CRYPTO_OP_ENCRYPT | CRYPTO_OP_DECRYPT).

using telux::sec::BlockModeTypes = typedef int32_t

List of block mode types consisting of entries from BlockMode. Multiple values can be OR'ed together, for example, (BLOCK_MODE_ECB | BLOCK_MODE_CBC).

using telux::sec::PaddingTypes = typedef int32_t

List of padding types to use consisting of entries from Padding. Multiple values can be OR'ed together, for example, (PADDING_PKCS7 | PADDING_RSA_PSS).

using telux::sec::DigestTypes = typedef int32_t

List of digest types to use consisting of entries from Digest. Multiple values can be OR'ed together, for example, (DIGEST_SHA_2_256 | DIGEST_SHA_2_512).

using telux::sec::AlgorithmTypes = typedef int32_t

Specifies the algorithm to use; valid values are listed in Algorithm.

using telux::sec::CurveTypes = typedef int32_t

Specifies the curve to use; valid values are listed in Curve.

Enumeration Type Documentation

Describes the cellular threats detected.

Enumerator
UNKNOWN 

No scoring (analysis) has been performed yet or it is in-progress. For example; during cell reselection, a device may be camped to a new cell and may remain idle (not exchanging data over cellular network). During this time scoring is not done. When device uses cellular network for actual use, scoring is done.

IMPRISON 

Base station (BS) configuration is preventing the device from connecting to the neighboring base stations.

DOS 

BS intercepts or jams signals to and from the device such that it results in a denial of cellular service.

DOWNGRADE 

BS is forcing the device to downgrade to use less secure cellular service. For example; downgrade from LTE to second-generation cellular network (2G).

LOCATION_TRACKED_USING_IMSI 

BS is continuously tracking location of the device.

LOCATION_TRACKED_USING_AUTH 

BS is continuously tracking location of the device using the authentication process.

PERSUADE 

BS portrays itself as the best option for the UE to select.

NO_THREAT_DETECTED 

No threat has been detected for this base station.

NO_ENCRYPTION 

GSM EDGE radio access network (GERAN) BS is not using encryption.

WEAK_ENCRYPTION 

GERAN BS is using weak encryption.

SELF_BLACKLISTING_CELL 

When using long-term evolution (LTE), BS blacklisted itself on physical layer cell identity (PCI) and E-UTRA absolute radio frequency channel number (EARFCN).

UNAUTHENTICATED_SMS 

On a unauthenticated GERAN, a short message service (SMS) was received.

UNAUTHENTICATED_EMERGENCY_MESSAGE 

On an unauthenticated GERAN, an emergency message was received.

IMSI_LEAK 

The international mobile subscriber identity (IMSI) of the device has leaked in an unencrypted state to an unauthenticated base station.

Describes the state of the cellular environment observed by the device.

Enumerator
UNKNOWN 

No scoring (analysis) has been performed yet or it is in-progress.

SAFE 

Device and base station have authenticated each other and connected.

ALERT 

Environment is potentially unsafe to operate. There may be potentially malicious BS. The threat score has crossed configured threshold at least once. More analysis needed to conclude, if the environment is safe.

HOSTILE 

Environment is hostile and threats have been detected. For example, compromised/malicious base stations are detected in the environment.

Based on the policy configured on the device, certain actions are taken automatically. For example; when a compromised/malicious BS is detected, it is blacklisted (cell barring) for a certain period of time (hence device will not be able to connect to it).

When configured action has been taken, a security report is generated. In that report, ActionType represents exact action taken.

Enumerator
NONE 

No specific action taken.

DEPRIORITIZED 

Priority of this cell for selection is reduced so that other cells get more priority for cell selection/reselection during device attempting to camp to a cell.

REMOVED_DEPRIORITIZATION 

Priority of this cell (previously deprioritized) for selection is resumed to regular status.

CELL_BARRED 

This cell has been barred (device will not camp to this cell).

REMOVED_CELL_BARRING 

Cell barring has been removed from this previously barred cell. This cell can be considered for connection, during cell selection/reselection process.

INVALID 

The configured action was outside the allowed range of actions.

enum telux::sec::RATType
strong

Defines all the cell info types.

Enumerator
UNKNOWN 
GSM 
WCDMA 
LTE 
NR5G 
enum telux::sec::Mode
strong

Defines how the user gets verification and calculation results.

Enumerator
MODE_SYNC 

ICryptoAcceleratorManager::eccVerifyDigest() and ICryptoAcceleratorManager::ecqvPointMultiplyAndAdd() APIs are used to send verification and calculation data and obtain results synchronously.

MODE_ASYNC_POLL 

ICryptoAcceleratorManager::eccPostDigestForVerification() and ICryptoAcceleratorManager::ecqvPostDataForMultiplyAndAdd() APIs are used to send verification and calculation data. Results are obtained via ICryptoAcceleratorManager::getAsyncResults() API.

MODE_ASYNC_LISTENER 

ICryptoAcceleratorManager::eccPostDigestForVerification() and ICryptoAcceleratorManager::ecqvPostDataForMultiplyAndAdd() APIs are used to send verification and calculation data. Results are obtained asynchronously in ICryptoAcceleratorListener::onVerificationResult() and ICryptoAcceleratorListener::onCalculationResult() callbacks.

Relative priority of the request.

Enumerator
REQ_PRIORITY_HIGH 

High priority

REQ_PRIORITY_NORMAL 

Lower priority (compared to high priority data)

enum telux::sec::ECCCurve
strong

Elliptic curve used by ECC algorithm.

Enumerator
CURVE_SM2 
CURVE_NISTP256 
CURVE_NISTP384 
CURVE_BRAINPOOLP256R1 
CURVE_BRAINPOOLP384R1 

Type of operation carried by crypto accelerator.

Enumerator
OP_TYPE_VERIFY 
OP_TYPE_CALCULATE 

Specifies the operation for which the key can be used. A key can be used for multiple operation types.

Enumerator
CRYPTO_OP_ENCRYPT 

Key will be used for encryption.

CRYPTO_OP_DECRYPT 

Key will be used for decryption.

CRYPTO_OP_SIGN 

Key will be used for signing.

CRYPTO_OP_VERIFY 

Key will be used for verification.

Specifies the block cipher mode(s) with which the AES key may be used.

Enumerator
BLOCK_MODE_ECB 

Electronic code block mode

BLOCK_MODE_CBC 

Cipher block chain mode

BLOCK_MODE_CTR 

Counter-based mode

BLOCK_MODE_GCM 

Galois/counter mode

Padding modes that may be applied to plain text for encryption operations. Only cryptographically-appropriate pairs are specified here.

Enumerator
PADDING_NONE 

No padding.

PADDING_RSA_OAEP 

RSA optimal asymmetric encryption padding.

PADDING_RSA_PSS 

RSA probabilistic signature scheme.

PADDING_RSA_PKCS1_1_5_ENC 

RSA PKCS#1 v1.5 padding for encryption.

PADDING_RSA_PKCS1_1_5_SIGN 

RSA PKCS#1 v1.5 padding for signing.

PADDING_PKCS7 

Public-key cryptography standard.

Specifies the digest algorithms that may be used with the key to perform signing and verification operations using RSA, ECDSA, and HMAC keys. The digest used during signing or verification must match the digest associated with the key when the key was generated.

Enumerator
DIGEST_NONE 

No digest.

DIGEST_MD5 

Message-digest algorithm.

DIGEST_SHA1 

Secure hash algorithm 1

DIGEST_SHA_2_224 

Secure hash algorithm 2, digest 224.

DIGEST_SHA_2_256 

Secure hash algorithm 2, digest 256.

DIGEST_SHA_2_384 

Secure hash algorithm 2, digest 384.

DIGEST_SHA_2_512 

Secure hash algorithm 2, digest 512.

Algorithm for signing, verification, encryption, and decryption operations.

Enumerator
ALGORITHM_UNKNOWN 

Unspecified algorithm.

ALGORITHM_RSA 

RSA (Rivest–Shamir–Adleman) algorithm.

ALGORITHM_EC 

Elliptic-curve algorithm.

ALGORITHM_AES 

Advanced encryption standard algorithm.

ALGORITHM_HMAC 

Hash-based message authentication code algorithm.

NIST curves used with ECDSA.

Enumerator
CURVE_P_224 

NIST curve P-224.

CURVE_P_256 

NIST curve P-256.

CURVE_P_384 

NIST curve P-384.

CURVE_P_521 

NIST curve P-521.

Formats for key import and export.

Enumerator
KEY_FORMAT_X509 

Public key export.

KEY_FORMAT_PKCS8 

Asymmetric key pair import.

KEY_FORMAT_RAW 

Symmetric key import and export.

enum telux::sec::RNGSource
strong

Specifies source of the random number generator.

Enumerator
QTI_HW_TRNG 

True random number generator (TRNG) on Qualcomm Technologies Inc. (QTI) platform. This is FIPS compliant.

DEV_RANDOM 

Linux /dev/random device is used as the random number provider. It is based on ChaCha20 stream cipher and uses events from timer, platform, bootloader, hardware random number generator, interrupts, input and disk devices for entropy purpose.

Security analysis result for a given access point (AP).

Enumerator
NO_RESULT 

There was no result for this AP because either the device is moving or the AP is on the fringes of signal strength.

NEW_ASSOCIATION 

This is the first time this AP is used for a connection and no previous references exist.

NO_THREAT_DETECTED 

The AP appears safe.

MALICIOUS 

The AP is not safe.

Variable Documentation

const uint32_t telux::sec::CA_RESULT_DATA_LENGTH = 96
static

Length of the unparsed raw result from the crypto accelerator.