AUTOSAR SWS Cryptography Pages 2
AUTOSAR SWS Cryptography Pages 2
AUTOSAR AP R22-11
7.4.1.3 Hashing
In order to support these mechanism, the FC Crypto must provide three basic build-
ing blocks:
• A key generation algorithm
• An signing algorithm
• A verifying algorithm
The FC Crypto shall support Message Authentication Code generation as de-
scribed in [14] and in [15].
This identifier is encoded with the common name as defined in chapter 7.5. MAC al-
gorithms can be constructed from other Cryptographic primitives, like crypto-
graphic hash functions (as in the case of HMAC), which are specified in chapter 7.4.1.3,
or from Block Cipher algorithms, as defined in chapter 7.4.1.5.1. Both variants are
supported by the FC Crypto. However, the Crypto Provider can either directly
access the cryptographic algorithm or use the exposed interfaces provided by the
CryptoAPI.
The context handles two different use cases, when an application or Functional
Cluster start processing or generation of the hash-value:
• The context was fresh initialized. No former data was stored in the context, so the
Crypto Provider can start the calculation on the new data stream (depending
from the primitive).
• The context was used previously. Thus, previous stored content will be deleted,
the context is rest to a fresh initialization state, and the calculation is started on
the new given data stream.
Some Cryptographic primitives require an Initialization Vector to guarantee
randomness or freshness during the data processing. When an application or Func-
tional Cluster specifies a cryptographic primitive, which requires an IV, as MAC al-
gorithms, the caller must provide the IV. Otherwise the Crypto Provider will throw
an error.
[SWS_CRYPT_01202]{DRAFT} dAt initialization phase the context allows to specify an
optional Initialization Vector (IV) or Nonce value. If IV size is greater than maximally
by the algorithm supported length, then an FC Crypto uses the leading bytes only.c
(RS_CRYPTO_02203)
[SWS_CRYPT_01201]{DRAFT} dThe function ara::crypto::cryp::MessageAu-
thnCodeCtx::Start shall initialize the context for a new data stream processing or
generation (depending on the the primitive). The function shall return:
• kUninitializedContext error, if the context was not initialized by deploying
a key.
• kInvalidInputSize error, if the size of provided IV is not supported (i.e. if it is
not enough for the initialization).
• kUnsupported error, if if the base algorithm (or its current implementation) prin-
cipally does not support the IV variation, but provided IV value is not empty.
c(RS_CRYPTO_02203)
[SWS_CRYPT_01203]{DRAFT} Start dThe function ara::crypto::cryp::Mes-
sageAuthnCodeCtx::Start shall initialize the context for a new data stream pro-
cessing or generation (depending on the primitive) with a secret seed. If the size of
the secret seed size is greater than maximum supported by the algorithm then an im-
plementation may use the leading bytes only from the sequence. The function shall
return:
• kUninitializedContext error, if the context was not initialized by deploying
a key.
• kInvalidInputSize error, if the size of provided secret seed is not supported
(i.e. if it is not enough for the initialization).
• kUnsupported if the base algorithm (or its current implementation) principally
does not support the secret seed variation.
• kUsageViolation error, if this transformation type is prohibited by the "allowed
usage" restrictions of the provided Secret Seed object.
c(RS_CRYPTO_02203)
[SWS_CRYPT_01204]{DRAFT} Update dThe functions ara::crypto::cryp:-
:MessageAuthnCodeCtx::Update, ara::crypto::cryp::MessageAuthn-
CodeCtx::Update, ara::crypto::cryp::MessageAuthnCodeCtx::Update
shall update the digest calculation context by a new part of the message. The functions
shall return:
• kProcessingNotStarted error, if the digest calculation was not initiated by a
call of the ara::crypto::cryp::MessageAuthnCodeCtx::Start method.
c(RS_CRYPTO_02203)
[SWS_CRYPT_01207]{DRAFT} Finish dThe function ara::crypto::cryp::Mes-
sageAuthnCodeCtx::Finish shall finalize the hash value calculation, return the
hash value and optionally produce the "signature" object. After the call of this function
no more data can be provided by callingara::crypto::cryp::MessageAuthn-
CodeCtx::Update. The function shall return:
• kProcessingNotStarted error, if ara::crypto::cryp::MessageAuthn-
CodeCtx::Start has not been successfully called before.
• kUsageViolation error, if ara::crypto::cryp::MessageAuthn-
CodeCtx::Update, ara::crypto::cryp::MessageAuthnCodeCtx:-
:Update, ara::crypto::cryp::MessageAuthnCodeCtx::Update has
not been called successfully after the last call to ara::crypto::cryp::Mes-
sageAuthnCodeCtx::Start.
c(RS_CRYPTO_02203)
[SWS_CRYPT_01208]{DRAFT} dIf the signature object is produced by a plain hash-
function then the dependence COUID of the ”signature” should be set to COUID of the
used context. But the hash algorithm ID field of the signature should be set according
to the used algorithm ID.c(RS_CRYPTO_02203)
[SWS_CRYPT_01209]{DRAFT} dIf the signature object is produced by a keyed MAC/
HMAC/AE/AEAD algorithm, then the dependent COUID of the signature should be set
to COUID of the used Symmetric Key. However, the hash algorithm ID field of the
signature should be set to unknown.c(RS_CRYPTO_02203)
[SWS_CRYPT_01210]{DRAFT} GetDigest dThe functions ara::crypto::cryp:-
:MessageAuthnCodeCtx::GetDigest, ara::crypto::cryp::MessageAuth-
nCodeCtx::GetDigest shall provide the hashed output. The CryptoAPI allows
also to specific an offset. This offset informs the Crypto Provider where the posi-
tion of first byte of digest is that should be placed to the output buffer. The functions
shall return:
• kProcessingNotFinished error, if the digest calculation was not finished by
a call of the Finish() method.
• kUsageViolation error, if the buffered digest belongs to a MAC/H-
MAC/AE/AEAD context initialized by a key without kAllowSignature permis-
sion.
c(RS_CRYPTO_02203)
The Key Storage Provider generates and manages the key as described in chap-
ter 7.4.2.2. The key can either be generated or configured in the context of the appli-
cation or Functional Cluster. When the FC Crypto provides the context no key
is given. The application or Functional Cluster will provide the key. The key itself
contains also the encoding as an attribute and will not provided by the application or
Functional Cluster in the call of the CryptoAPI method.
[SWS_CRYPT_01211]{DRAFT} SetKey dThe function ara::crypto::cryp::Mes-
sageAuthnCodeCtx::SetKey shall set (deploy) a key to ara::crypto::cryp:-
:MessageAuthnCodeCtx. The function shall return:
• kIncompatibleObject error, if the provided key object is incompatible with
this Symmetric Key context.
• kUsageViolation error, if the transformation type associated with this context
(taking into account the direction specified by transform) is prohibited by the "al-
lowed usage"restrictions of provided key object.
c(RS_CRYPTO_02203)
[SWS_CRYPT_01213]{DRAFT} Verify dThe CryptoAPI shall ara::crypto::-
cryp::MessageAuthnCodeCtx::Check if previous calculated and internally stored
MAC is valid to an expected ”signature” object. Validation is successful, if value and
Symmetric encryption uses a shared secret (e.g., share key) to encrypt and / or decrypt
an information. Without knowing the key, the information cannot be understood by
anyone. Symmetric cryptography can be categorized by two algorithm classes:
1. Block Cipher: Data with a fixed length is transformed (en/decrypted). The
system can only process complete blocks of data held in its internal memory.
2. Stream Cipher: Information is encrypted as it streams instead of being re-
tained in the system’s memory.
The encryption method, Block Cipher, applies an algorithm with a Symmetric Key
to encrypt an input data. Block Ciphers are commonly used to protect data at rest,
such as on file systems.
[SWS_CRYPT_01502]{DRAFT} dThe interface ara::crypto::cryp::Symmet-
ricBlockCipherCtx::SetKey shall configure this context for encryption or decryp-
tion according to the provided ara::crypto::CryptoTransform and ensure that
the provided ara::crypto::cryp::SymmetricKey is used for the following en/de-
cryption.
• SetKey shall return a CryptoErrorDomain::kIncompatibleObject error,
if the provided Symmetric Key belongs to a different ara::crypto::cryp:-
:CryptoProvider instance.
• SetKey shall return a CryptoErrorDomain::kUsageViolation error, if the
provided transformation direction (CryptoTransform::kEncrypt or Cryp-
toTransform::kDecrypt) does not match the ara::crypto::Allowe-
dUsageFlags (kAllowDataEncryption or kAllowDataDecryption, re-
spectively) of the provided Symmetric Key.
c(RS_CRYPTO_02201)
[SWS_CRYPT_01501]{DRAFT} dOnly the key and transformation direction specified
by the last valid call of ara::crypto::cryp::SymmetricBlockCipherCtx::-
SetKey shall be used for the subsequent encryption or decryption operation.c(RS_-
CRYPTO_02107, RS_CRYPTO_02201)
A Stream Cipher is used for Symmetric Key cryptography, or when the same key
is used to encrypt and decrypt data. Stream Ciphers encrypt pseudo-random se-
quences with bits of plain-text in order to generate cipher-text, usually with XOR.
Stream Ciphers are good for fast implementations with low resource consumption.
These two features help the defender implement resistance strategies in devices that
may not have the resources for a Block Cipher implementation. Stream Ciphers
can be broadly classified into those that work better in hardware and those that work
better in software. Stream Ciphers are commonly used to protect data in motion,
such as encrypting data on the network.
[SWS_CRYPT_01651]{DRAFT} dThe interface ara::crypto::cryp::StreamCi-
pherCtx::GetBlockService shall return a unique pointer to the ara::crypto:-
:cryp::BlockService associated with this context.c(RS_CRYPTO_02107, RS_-
CRYPTO_02201)
[SWS_CRYPT_01658]{DRAFT} dThe interface ara::crypto::cryp::StreamCi-
pherCtx::CountBytesInCache shall return the number of input data bytes cur-
rently held in the context cache.c(RS_CRYPTO_02201)
Note, that the above requirement applies only to block-wise modes when the user
supplied input data that is not a multiple of the block-size. In this case the last data
chunk, which cannot be processed because it is less than the block-size, must be
cached until the next data processing call adds sufficient data to complete the block-
size (and continue processing).
[SWS_CRYPT_01659]{DRAFT} dThe interface ara::crypto::cryp::StreamCi-
pherCtx::SetKey shall configure this context for encryption or decryption according
to the provided ara::crypto::CryptoTransform and ensure that the provided
ara::crypto::cryp::SymmetricKey is used for the following en/decryption.
• SetKey shall return a CryptoErrorDomain::kIncompatibleObject error,
if the provided Symmetric Key belongs to a different ara::crypto::cryp:-
:CryptoProvider instance.
• SetKey shall return a CryptoErrorDomain::kUsageViolation error, if the
provided transformation direction (CryptoTransform::kEncrypt or Cryp-
toTransform::kDecrypt) does not match the ara::crypto::Allowe-
dUsageFlags (kAllowDataEncryption or kAllowDataDecryption) of the
provided Symmetric Key.
c(RS_CRYPTO_02201)
[SWS_CRYPT_01660]{DRAFT} dThe interface ara::crypto::cryp::StreamCi-
pherCtx::GetTransformation shall return the ara::crypto::CryptoTrans-
form that was provided in the last valid call to ara::crypto::cryp::StreamCi-
pherCtx::SetKey.
in the buffer, the subsequent call’s input data shall continue filling the buffer until it can
be processed.
• ProcessBlock shall return a CryptoErrorDomain::kProcessingNot-
Started error, if processing was not started by successfully calling Start or
has already been terminated by successfully calling FinishBytes.
c(RS_CRYPTO_02201)
[SWS_CRYPT_01657]{DRAFT} dThe interface ara::crypto::cryp::StreamCi-
pherCtx::FinishBytes shall apply the configured transformation (encryption or
decryption) to the provided data for the last and final time, and return the result. If
IsBytewiseMode equals FALSE and the provided data is insufficient to end process-
ing with a completely filled internal block-size buffer (cache), then padding shall be
applied according to the algorithm selected when creating this context. For decryption
the padding shall be removed before returning the processed data.
• FinishBytes shall return a CryptoErrorDomain::kProcessingNot-
Started error, if processing was not started by successfully calling Start or
has already been terminated by successfully calling FinishBytes.
c(RS_CRYPTO_02201)
Some Stream Cipher need an exact multiple of the block length in byte. If the length
of the data to be encrypted is not an exact multiple, it must be padded to make it so.
Available padding schemes are for example, [19, PKCS5], [20, PKCS5], [21, PKCS7],
or [22, ANSI X9.23].
Key Wrapping (as defined in [23] and [24]) encapsulates Key Material, which is
used for example to store a key in an unsecure environment or transport a key by an
unsecure channel. Wrapping a key is a kind of encryption of the key and contributes to
confidentiality.
Wrapping a key requires a KEK. With the call of the CryptoAPI interface the KEK is set
(deployed) to the key wrapper algorithm context. Additionally, a ”direction” indicator is
used to define the transformation direction, such as wrapping, unwrapping, signature
calculation, or signature verification.
[SWS_CRYPT_02121]{DRAFT} dThe interface ara::crypto::cryp::Symmet-
ricKeyWrapperCtx::CalculateWrappedKeySize shall calculate the size of the
wrapped key based on the provided keyLength of the key to wrap and return the
result.c(RS_CRYPTO_02208)
[SWS_CRYPT_02122]{DRAFT} dThe interface ara::crypto::cryp::Symmet-
ricKeyWrapperCtx::SetKey shall configure this context for encryption or decryp-
tion according to the provided ara::crypto::CryptoTransform and ensure the
provided ara::crypto::cryp::SymmetricKey is used as the key-encryption-key
(KEK) for subsequent processing in this context.
• SetKey shall return a CryptoErrorDomain::kIncompatibleObject error,
if the provided Symmetric Key belongs to a different ara::crypto::cryp:-
:CryptoProvider instance.
• kUninitializedContext, if ara::crypto::cryp::SignerPrivate-
Ctx::SetKey was not called before.
• kInvalidInputSize, if a supplied ara::crypto::ReadOnlyMemRegion
parameter’s size is incompatible with the configured signature algorithm.
c(RS_CRYPTO_02204)
[SWS_CRYPT_02417]{DRAFT} Pre-hashed verification dThe functions ara::-
crypto::cryp::VerifierPublicCtx::VerifyPrehashed, ara::crypto::-
cryp::VerifierPublicCtx::VerifyPrehashed and ara::crypto::cryp:-
:VerifierPublicCtx::VerifyPrehashed shall implement the verification algo-
rithm configured for this context without hashing. Note: hashing has already been
applied by the user. All interfaces shall return
• kProcessingNotFinished, if a ara::crypto::cryp::HashFunc-
tionCtx has been supplied and the hash value computation has not been
finished.
• kUninitializedContext, if ara::crypto::cryp::VerifierPublic-
Ctx::SetKey was not called before.
• kInvalidInputSize, if the supplied ara::crypto::ReadOnlyMemRegion
parameter hashValue or context or signature is incompatible with the con-
figured signature algorithm.
• kInvalidArgument, if the ara::crypto::CryptoAlgId of the provided
ara::crypto::cryp::HashFunctionCtx or the directly provided ara::-
crypto::CryptoAlgId is incompatible with the configured signature algo-
rithm.
• kIncompatibleObject, if the ara::crypto::CryptoAlgId of this context
does not match the ara::crypto::CryptoAlgId of signature; or the required
ara::crypto::CryptoAlgId of the hash is not kAlgIdDefault and the
required hash ara::crypto::CryptoAlgId of this context does not match
hashAlgId or the hash ara::crypto::CryptoAlgId of signature.
• kIncompatibleArguments, if the provided hash ara::crypto::Cryp-
toAlgId is not kAlgIdDefault and the ara::crypto::CryptoAlgId of
the provided signature object does not match the provided hash ara::-
crypto::CryptoAlgId.
• kBadObjectReference, if the provided signature object does not reference the
public key loaded to the context, i.e. if the COUID of the public key in the context
is not equal to the COUID referenced from the signature object.
c(RS_CRYPTO_02204)
[SWS_CRYPT_02418]{DRAFT} Truncation of hash value dThe functions
ara::crypto::cryp::VerifierPublicCtx::VerifyPrehashed and ara::-
crypto::cryp::SignerPrivateCtx::SignPreHashed shall truncate the pro-
vided hash value, if the bitlength of the provided hash value is larger than the bitlength
is setup matching the asymmetric algorithm. Here, the setup can influence the orga-
nization of the cryptographic material, the provided internal buffers for keys, input, or
output data and the buffers length. Some asymmetric cryptographic algorithms need
specific initialization parameters. All the specific needs of an asymmetric algorithm, the
corresponding standards gives detailed insights how to setup internally the Crypto
Provider and its supported Cryptographic primitives.
The Key Storage Provider generates and manages the key as described in chap-
ter 7.4.2.2. The key can either be generated or configured in the context of the appli-
cation or Functional Cluster. When the FC Crypto provides the context no key
is given. The application or Functional Cluster will provide the key. The key itself
contains also the encoding as an attribute and will not provided by the application or
Functional Cluster in the call of the CryptoAPI method.
[SWS_CRYPT_02702]{DRAFT} dThe ara::crypto::cryp::EncryptorPublic-
Ctx::SetKey shall check the allowed-usage flags of the key parameter provided. If
kAllowDataEncryption is not set, a kUsageViolation error shall be returned.
c(RS_CRYPTO_02202)
[SWS_CRYPT_02703]{DRAFT} dThe ara::crypto::cryp::DecryptorPriva-
teCtx::SetKey shall check the allowed-usage flags of the key parameter provided.
If kAllowDataDecryption is not set, a kUsageViolation error shall be returned.c
(RS_CRYPTO_02202)
[SWS_CRYPT_02704]{DRAFT} Encrypting dThe interfaces ara::crypto:-
:cryp::EncryptorPublicCtx::ProcessBlock, ara::crypto::cryp::En-
cryptorPublicCtx::ProcessBlock shall execute the encryption operation using
the deployed public key.c(RS_CRYPTO_02202)
[SWS_CRYPT_02705]{DRAFT} Decrypting dThe interface ara::crypto:-
:cryp::DecryptorPrivateCtx::ProcessBlock, ara::crypto::cryp::De-
cryptorPrivateCtx::ProcessBlock shall execute the decryption operation us-
ing the deployed public key.c(RS_CRYPTO_02202)
[SWS_CRYPT_02706]{DRAFT} dIf the parameter suppressPadding is set to
FALSE, the interface ara::crypto::cryp::EncryptorPublicCtx::Process-
Block shall add padding as specified by the ara::crypto::CryptoAlgId. If
the parameter suppressPadding is set to TRUE, the interface ara::crypto::-
cryp::EncryptorPublicCtx::ProcessBlock shall not add any padding.c(RS_-
CRYPTO_02202)
If a padding shall be applied or how the padding layout looks like, this is encoded in the
common name, as described in chapter 7.5.
[SWS_CRYPT_02726]{DRAFT} Errors of ProcessBlock dThe functions ara:-
:crypto::cryp::DecryptorPrivateCtx::ProcessBlock, ara::crypto::-
cryp::DecryptorPrivateCtx::ProcessBlock shall return
• kUninitializedContext error, if ara::crypto::cryp::EncryptorPub-
licCtx::SetKey was not called before.
Briefly, a key encapsulation mechanism (KEM) works just like a public-key encryption
scheme, except that the encryption algorithm takes no input other than another key.
Therefore, the KEM uses randomly generated Key Material, the key encryption key
(KEK), to encapsulate an input, in this situation a key. The input is encapsulated with
an encryption with a target public key, as given in [26], [27], and [28]. The KEK can be
derived from the encapsulated Key Material or from randomly generated data by
application of a KDF.
[SWS_CRYPT_03000]{DRAFT} Keying-Data dThe interface ara::crypto::-
cryp::KeyEncapsulatorPublicCtx::AddKeyingData shall set the provided
ara::crypto::cryp::RestrictedUseObject as payload to be encapsulated
(keying-data). The interface shall return
• kUsageViolation, if the allowed usage flag kAllowExport of the provided
ara::crypto::cryp::RestrictedUseObject is not set.
• kIncompatibleObject, if the provided ara::crypto::cryp::Restrict-
edUseObject belongs to a different ara::crypto::cryp::Crypto-
Provider instance.
• kInvalidInputSize, if the size of the provided ara::crypto::cryp::-
RestrictedUseObject is not supported by the configured ara::crypto:-
:CryptoAlgId of this context.
c(RS_CRYPTO_02209)
[SWS_CRYPT_03002]{DRAFT} Encapsulation dThe interface ara::crypto:-
:cryp::KeyEncapsulatorPublicCtx::Encapsulate shall execute key-
encapsulation according to the configured ara::crypto::CryptoAlgId of this
context. If the context allows specifying the used key-derivation function and/or
the key-encapsulation-key (KEK) primitive, the interface shall override the initial
context configuration with the provided ara::crypto::cryp::KeyDerivation-
FunctionCtx and ara::crypto::CryptoAlgId. The interface shall return a
byte-vector containing the encapsulated keying-data or
• kUninitializedContext, if ara::crypto::cryp::KeyEncapsulator-
PublicCtx::SetKey and ara::crypto::cryp::KeyEncapsulatorPub-
licCtx::AddKeyingData have not been called successfully before.
• kInvalidArgument, if the provided ara::crypto::cryp::KeyDeriva-
tionFunctionCtx or ara::crypto::CryptoAlgId are incompatible with
the configured ara::crypto::CryptoAlgId of this context.
c(RS_CRYPTO_02209)
[SWS_CRYPT_03003]{DRAFT} Key Decapsulation dThe interface ara::crypto:-
:cryp::KeyDecapsulatorPrivateCtx::DecapsulateKey shall execute key-
decapsulation on the provided ara::crypto::ReadOnlyMemRegion according to
the configured ara::crypto::CryptoAlgId of this context. If the context al-
lows specifying the used key-derivation function and/or the key-encapsulation-key
(KEK) primitive, the interface shall override the initial context configuration with
the provided ara::crypto::cryp::KeyDerivationFunctionCtx and ara::-
crypto::CryptoAlgId (kekAlgId). The interface shall return a non-exportable, non-
storable instance of ara::crypto::cryp::SymmetricKey representing the de-
capsulated keying-data with usage restrictions set according to the provided ara:-
:crypto::AllowedUsageFlags or kAllowKdfMaterialAnyUsage, if ara::-
crypto::AllowedUsageFlags are not provided. The returned object’s ara::-
crypto::CryptoAlgId shall be set to the provided ara::crypto::CryptoAlgId
(keyingDataAlgId). The interface shall return
• kUninitializedContext, if ara::crypto::cryp::KeyEncapsulator-
PublicCtx::SetKey has not been called successfully before.
• kInvalidArgument, if the provided ara::crypto::cryp::KeyDeriva-
tionFunctionCtx or ara::crypto::CryptoAlgId are incompatible with
the configured ara::crypto::CryptoAlgId of this context.
• kInvalidInputSize, if the size of the provided ara::crypto::ReadOnly-
MemRegion is not supported by the configured ara::crypto::CryptoAlgId
of this context.
c(RS_CRYPTO_02209)
[SWS_CRYPT_03004]{DRAFT} Seed Decapsulation dThe interface ara::-
crypto::cryp::KeyDecapsulatorPrivateCtx::DecapsulateSeed shall ex-
ecute key-decapsulation on the provided ara::crypto::ReadOnlyMemRegion ac-
cording to the configured ara::crypto::CryptoAlgId of this context. The inter-
face shall return a non-exportable, non-storable instance of ara::crypto::cryp:-
:SecretSeed representing the decapsulated keying-data with usage restrictions set
according to the provided ara::crypto::AllowedUsageFlags or kAllowKdfMa-
terialAnyUsage, if ara::crypto::AllowedUsageFlags are not provided. The
returned object’s ara::crypto::CryptoAlgId shall be set to the ara::crypto:-
:CryptoAlgId of this context. The interface shall return
• kUninitializedContext, if ara::crypto::cryp::KeyEncapsulator-
PublicCtx::SetKey has not been called successfully before.
• kInvalidInputSize, if the size of the provided ara::crypto::ReadOnly-
MemRegion is not supported by the configured ara::crypto::CryptoAlgId
of this context.
c(RS_CRYPTO_02209)
7.4.1.11 Key Exchange Protocol, Key Exchange Mechanism, and Key Exchange
Scheme
Provider. This kind of decoupling provides some negative impacts. Every ven-
dor can choose the Cryptographic primitives and their names independently.
Then, during development phase of application or Functional Cluster, it is not
clear how to access the needed algorithm. Therefore, a common name is specified,
which allows to develop functionality independent from FC Crypto. The common
name of the algorithm is given in chapter 7.5. With this common name, it is possible
to bind the application or function cluster to the FC Crypto during integration phase.
However, this approaches needs both, the interface to translate the common name to
a vendor specific name and the support from the FC Crypto.
[SWS_CRYPT_03904]{DRAFT} dThe ara::crypto::cryp::CryptoContext::-
GetCryptoPrimitiveId shall return a ara::crypto::cryp::CryptoPrimi-
tiveId of the current used cryptographic algorithm.c(RS_CRYPTO_02308)
[SWS_CRYPT_03905]{DRAFT} dThe ara::crypto::cryp::CryptoPrimi-
tiveId::GetPrimitiveName shall return the common name of the current used
cryptographic algorithm.c(RS_CRYPTO_02308)
[SWS_CRYPT_03906]{DRAFT} dThe ara::crypto::cryp::CryptoPrimi-
tiveId::GetPrimitiveId shall return the ara::crypto::cryp::Crypto-
PrimitiveId of the current used cryptographic algorithm.c(RS_CRYPTO_02308)
This allows a decoupling of the vendor specific implementation and the using applica-
tion. With this freedom a late binding during integration phase is realized.
[SWS_CRYPT_40985]{DRAFT} dThe interface ara::crypto::cryp::Cryp-
toService::GetMaxInputSize shall return the maximum byte-length of data that
the cryptographic context associated with this ara::crypto::cryp::CryptoSer-
vice expects as input for applying its cryptographic transformation. If the provided
parameter suppressPadding equals TRUE, only the number of Bytes available for
the payload shall be returned. If suppressPadding equals FALSE, the returned
number shall equal the supported block size.c(RS_CRYPTO_02309)
Note, several encryption algorithms require a certain number of bytes to be added as
padding to improve cryptographic properties (e.g. RSA encryption PKCS1 v1.5)
c(RS_CRYPTO_02004)
[SWS_CRYPT_40953]{DRAFT} dThe interface ara::crypto::IOInterface::-
IsObjectExportable shall only return TRUE, if kAllowExport is set in the al-
lowed usage flags of the CryptoObject stored in the underlying resource this IOInter-
face points to.c(RS_CRYPTO_02004)
[SWS_CRYPT_40954]{DRAFT} dThe interface ara::crypto::IOInterface::-
IsObjectSession shall return TRUE, if the CryptoObject stored in the underlying
resource this IOInterface points to is volatile and cannot be persisted (session flag set).
The interface shall return FALSE, if the underlying resource this IOInterface points to
• is a Key Slot.
• is is empty.
• is volatile but can be persisted.
c(RS_CRYPTO_02004)
[SWS_CRYPT_40955]{DRAFT} dThe interface ara::crypto::IOInterface::-
IsValid shall only return TRUE, if the underlying resource this IOInterface points to
is a VolatileTrustedContainer or a KeySlot that has not been modified since this IOInt-
erface has been obtained by calling ara::crypto::keys::KeySlot::Open on the
loaded KeySlot instance.c(RS_CRYPTO_02004)
[SWS_CRYPT_40956]{DRAFT} dThe interface ara::crypto::IOInterface::-
IsVolatile shall only return TRUE, if this IOInterface points to a VolatileTrusted-
Container.c(RS_CRYPTO_02004)
[SWS_CRYPT_40957]{DRAFT} dThe interface ara::crypto::IOInterface::-
IsWritable shall only return TRUE, if this IOInterface points to a VolatileTrusted-
Container or this IOInterface has been obtained by calling ara::crypto::keys::-
KeySlot::Open with the writable flag set to TRUE.c(RS_CRYPTO_02004)
The serialization format for exporting/importing is not yet standardized in AUTOSAR.
Therefore it is the responsibility of the platform vendor to adequately de-/serialize Cryp-
toObjects including all relevant meta-data such that CryptoObjects can be transferred
between adaptive machines (of the same vendor) without loss of information and func-
tionality.
[SWS_CRYPT_04202]{DRAFT} Exporting secure objects dThe function ara::-
crypto::cryp::CryptoProvider::ExportSecuredObject shall serialize the
provided CryptoObject and apply the transformation specified by the provided Sym-
metricKeyWrapperCtx. The function shall return the serialized data as a vector of bytes
or
• kIncompatibleObject if the object cannot be exported due to ara::-
crypto::cryp::CryptoObject::IsExportable returning FALSE.
The Key Storage Provider (KSP, namespace ara::crypto::keys) is responsible for se-
cure (confidential and or authentic) storage of different type Key Material (public,
private, secret keys, or seeds) and other security critical cryptographic objects (digital
signatures, hash, MAC HMAC tags). These cryptographic objects are represented as
a Key Slots.
Key Slots used by application are defined by the integrator in the manifest via Cryp-
toKeySlot.
CryptoKeySlotInterface and CryptoKeySlotToPortPrototypeMapping
[SWS_CRYPT_10000]{DRAFT} dThe FC Crypto shall provide access to the Cryp-
toKeySlots for every AdaptiveApplicationSwComponentType. Every Cryp-
toKeySlot is represented by RPortPrototype typed by CryptoKeySlotInter-
face in application design.c(RS_CRYPTO_02004, RS_CRYPTO_02305)
Assignment of CryptoKeySlots to a CryptoProvider is described in the manifest.
So with the usage of a RPortPrototype that is typed by a CryptoKeySlotInter-
face the assignment to CryptoProvider is established.
[SWS_CRYPT_10003]{DRAFT} dThe CryptoAPI shall provide a function to obtain
Crypto Provider. With a call of ara::crypto::cryp::CryptoContext::-
MyProvider the FC Crypto provides the correspinding Crypto Provider of a
Key Slot.c(RS_CRYPTO_02009)
The manifest contains separate deployment data for each Process. The class Cryp-
toKeySlotToPortPrototypeMapping defines the mapping between a Process,
a CryptoKeySlot, and an RPortPrototype. Furthermore, the class Crypto-
ProviderToPortPrototypeMapping defines the mapping between a Process, a
CryptoProvider, and an RPortPrototype. Figure 7.7 shows the relevant model
elements. Additional model elements and links are only shown for context.
Application Design
CryptoKeySlotInterface CryptoProviderInterface
CryptoInterface
+ allocateShadowCopy: Boolean [0..1]
+ cryptoAlgId: String [0..1]
+ cryptoObjectType: CryptoObjectTypeEnum [0..1]
+ slotCapacity: PositiveInteger [0..1]
+ slotType: CryptoKeySlotTypeEnum [0..1]
ARElement
+portPrototype AbstractRequiredPortPrototype AtpBlueprint
+requiredInterface
RPortPrototype AtpBlueprintable
0..1 «isOfType» AtpType
+portPrototype 0..1 PortInterface
{redefines atpType}
«instanceRef»
0..1
Deployment
Identifiable
+keySlot CryptoKeySlot Identifiable
UploadablePackageElement +keySlot
+ allocateShadowCopy: Boolean [0..1] CryptoProvider
CryptoKeySlotToPortPrototypeMapping 0..1
+ cryptoAlgId: String [0..1] 0..*
+ cryptoObjectType: CryptoObjectTypeEnum [0..1] «atpSplitable»
+process 0..1 + slotCapacity: PositiveInteger [0..1]
+ slotType: CryptoKeySlotTypeEnum [0..1] 0..1
AbstractExecutionContext
+cryptoProvider
Process
+process UploadablePackageElement
+ functionClusterAffiliation: String [0..1]
0..1 CryptoProviderToPortPrototypeMapping +cryptoProviderDocumentation 0..1
+ numberOfRestartAttempts: PositiveInteger [0..1]
+ preMapping: Boolean [0..1] ARElement
«instanceRef» Documentation
Key Generation is the process of generating cryptographic keys. There are two types
of Key Generation based on the used cryptographic algorithms:
1. Symmetric Algorithms: A symmetric system consists of a key, which is shared
between the different parties.
[SWS_CRYPT_10300]{DRAFT} Symmetric cryptography dThe FC Crypto
shall support symmetric cryptography.c(RS_CRYPTO_02101).
[SWS_CRYPT_10301]{DRAFT} dThe FC Crypto shall allocate a new Sym-
metric Key object by a call of function ara::crypto::cryp::Crypto-
Provider::GenerateSymmetricKey and fill it by a new randomly generated
value. The function shall return
• kUnknownIdentifier error, if the ara::crypto::CryptoAlgId has
an unsupported value.
• kIncompatibleArguments error, if allowedUsage is incompatible with
target algorithm specified by ara::crypto::CryptoAlgId.
c(RS_CRYPTO_02101).
2. Asymmetric Algorithms: Asymmetric systems consist of public and private key,
which are generated. The public key is used for encryption, key encapsulation, or
signature verification. The private key is used for decryption, key encapsulation,
key exchange, or digital signature calculation.
[SWS_CRYPT_10303]{DRAFT} Asymmetric cryptography dThe FC Crypto
shall support asymmetric cryptography.c(RS_CRYPTO_02101).
[SWS_CRYPT_10304]{DRAFT} dThe FC Crypto shall support the Asymmet-
ric Key generation. The CryptoAPI provide such functionality. The private
key is generated by calling ara::crypto::cryp::CryptoProvider::Gen-
eratePrivateKey.c(RS_CRYPTO_02101)
[SWS_CRYPT_10305]{DRAFT} dThe corresponding public key can be obtained
from a private key object by ara::crypto::cryp::PrivateKey::GetPub-
licKey. This function is part of the CryptoAPI.c(RS_CRYPTO_02002)
[SWS_CRYPT_10306]{DRAFT} dAs private and public key are tightly coupled
which each other, they should have the same COUID. A common COUID shall be
shared for both private and public keys.c(RS_CRYPTO_02005)
Exporting of Key Material is sometimes necessary. This is useful during the setup
of communication channels, for example. Importing Key Material is also important
for a later use. Export and Import facilities of Crypto Provider are described in
7.4.1.13.
Another use case to export and import Key Material is the confidential delivery of
Symmetric Keys, e.g., transport keys. This technique is called data encapsulation
mechanism and provides a ”crypto envelope” or ”digital envelope” that protects the se-
crecy and integrity of data using symmetric-key cryptographic techniques concept. The
FC Crypto provides two contexts, ara::crypto::cryp::KeyAgreementPriva-
teCtx and ara::crypto::cryp::KeyEncapsulatorPublicCtx, which imple-
ments the data encapsulation mechanism. Additionally, it is possible to assure non-
repudiation by adding a digital signature. This is provided via the ara::crypto::-
cryp::HashFunctionCtx and ara::crypto::cryp::SignerPrivateCtx. All
contexts contains two building blocks:
• The encryption algorithm
• The decryption algorithm
[SWS_CRYPT_10403]{DRAFT} dThe FC Crypto shall provide private key agreement
functionality by a specific context. This context is the ara::crypto::cryp::KeyA-
greementPrivateCtx. The CryptoAPI generates this context via an interface. This
interface needs an identifier of the target key-agreement cryptographic algorithm to
setup the correct context.c(RS_CRYPTO_02105)
[SWS_CRYPT_10401]{DRAFT} dKey agreement private context shall provide function-
ality to produce a common secret seed ara::crypto::cryp::SecretSeed.
c(RS_CRYPTO_02007)
[SWS_CRYPT_10402]{DRAFT} dKey agreement private context shall provide function-
ality to produce a common symmetric key.c(RS_CRYPTO_02103)
2. ”Pending” - the CSR was already sent to the CA, but the internal was not yet
updated. Either the CSR was not returned or was not processed.
3. ”Retrieved” - the CSR was returned from the CA, and is either processed or the
processing was not started yet.
When a signed CSR is retrieved, the X.509 Provider will import the CSR and starts
the processing.
[SWS_CRYPT_20304]{DRAFT} dEach CSR is an artifact produced by the X.509
Provider and is stored locally. The CryptoAPI provides an interface to allow an
application or Functional Cluster to trigger the storing.c(RS_CRYPTO_02306)
ARElement
AbstractRequiredPortPrototype AtpBlueprint
+requiredInterface
+portPrototype RPortPrototype AtpBlueprintable
«isOfType» AtpType
0..1
0..1 PortInterface
{redefines atpType}
Deployment
Identifiable Identifiable
CryptoCertificate CryptoKeySlot Identifiable
+keySlot
«instanceRef» + isPrivate: Boolean [0..1] + allocateShadowCopy: Boolean [0..1] CryptoProvider
+ cryptoAlgId: String [0..1] 0..*
+ cryptoObjectType: CryptoObjectTypeEnum [0..1] «atpSplitable»
+cryptoCertificate
+cryptoCertificate
+cryptoKeySlot 0..2
«atpSplitable»
«atpSplitable»
CryptoCertificateToCryptoKeySlotMapping
The X.509 Provider supports the revocation of certificates. This is done by using
standard mechanism, such as certificate revocation lists (CRLs) and certificate trust
lists (CTLs). The X.509 Provider is the organizational part of the FC Crypto,
which handles and stores during run-time these CRLs and CTLs. The CryptoAPI
provides interfaces, which allow application and Functional Clusters to import,
export, and manage these lists.
[SWS_CRYPT_20901]{DRAFT} CRL and CTL usage dThe X.509 Provider shall
support CRL and CTL. The format of CRL and CTL are defined in [33, RFC 5280], [44,
RFC 6518], [45, RFC 8398], and [46, RFC 8399] and is not part of this standard. The
X.509 Provider can store the CRL and the CTL in an own internal used structure.
However, the X.509 Provider can also use the provided information to update the
corresponding elements. The update can be either the deletion of the element or
setting a mark that the element was revoked.c(RS_CRYPTO_02306)
CRL is a list of digital certificates that have been revoked before their expiration date
was reached. This list contains all the serial numbers of the revoked certificates and
the revoked data.
[SWS_CRYPT_20902]{DRAFT} dGiven in [33] the CRL can contain two different states:
1. Revoked: certificates that are irreversibly revoked.
2. Hold: certificates that are marked as temporally invalid.
c(RS_CRYPTO_02306)
Allowed delimiters:
• ’/’ – separator between main components of the whole algorithm specification.
• ’_’ – separator instead of general separation characters (e.g.: ’ ’, ’.’,
’:’, ’-’, ’’) in original name of standard. This delimiter can be applied
between two digits or two letters only!
• ’-’ – separator between a base algorithm name and its precise specifiers that
define key-length or block-length in bits.
• ’+’ – separator between a few base algorithms’ specifications for a cascade
transformation definition.
• ’,’ – separator between a few base algorithms’ specifications for a case if the
whole algorithm is based on a few types of basic transformations.
• ’.’ – separator between a common name of a standard and its specific part or
its version that precises a specification of concrete transformation.
c(RS_CRYPTO_02308)
Examples of well-known algorithm names: ”ECDSA-256”, ”ECDH-256”, ”AES-
128”, ”Camellia-256”, ”3DES-168”, ”ChaCha20”, ”GOST28147_89”,
”SHA1”, ”SHA2-256”, ”GOSTR3410.94”, ”GOSTR3410.2001”,
”GOSTR3410.2012-512”.
Examples of well-known modes names: ”ECB”, ”OFB”, ”CFB”, ”CBC”,
”PCBC”, ”CTR”, ”HMAC”, ”CBC_MAC”, ”OMAC1”, ”OMAC2”, ”VMAC”,
”Poly1305”, ”CCM”, ”GCM”, ”OCB”, ”CWC”, ”EAX”, ”KDF1”, ”KDF2”,
”KDF3”, ”MGF1”.
Examples of the encoding and padding names: ”ANSI_X923”, ”ISO10126”,
”PKCS7”, ”ISO_IEC7816_4”, ”PKCS1.v1_5”, ”OAEP”, ”OAEPplus”,
”SAEP”, ”SAEPplus”, ”PSS”, ”EME”, ”EMSA”.
Examples of fully defined transformations:
• ”ECDSA-384” means ECDSA signature algorithm with private key-length 384
bit.
• ”ECDH-512” means ECDH key agreement algorithm with private key-length 512
bit.
• ”CTRAES-256” means a CTR-mode stream cipher based on AES algorithm with
key-length 256 bit.
• ”CBCAES-192+Camellia-192/PKCS7” means CBC-mode cipher based on
cascade application of AES-192 and Camellia-192 with padding of last block ac-
cording to PKCS#7.
• ”HMACSHA-256” means HMAC based on SHA-256.
If an algorithm support a few variable length parameters then they shall be specified in
following order:
key, IO-block or output digest, IV or input block (e.g.: ”Kalyna-512-256” means
block cipher Kalina with 512-bit key and 256-bit block).
If a transformation is based on a few basic cryptographic algorithms then they shall be
specified in an order corresponding to the level of their application (see example below
for RSA).
Following Mode specifications can be used for RSA-based algorithms:
• ”SIG” – signature primitive (e.g., ”SIGRSA-2048,SHA-
160PKCS1.v1_5,EMSA”)
• ”VER” – verification primitive (e.g., ”VERRSA-2048,SHA-
160PKCS1.v1_5,EMSA”)
• ”ENC” – encryption primitive (e.g., ”ENCRSA-2048,MGF1,SHA-
160PKCS1.v1_5,EME”, ”ENCRSA-4096,MGF1,SHA2-256OAEP,EME”)
• ”DEC” – decryption primitive (e.g., ”DECRSA-2048,MGF1,SHA-
160PKCS1.v1_5,EME”, ”DECRSA-4096,MGF1,SHA2-256OAEP,EME”)
• ”KEM” – Key Encapsulation Mechanism (e.g., ”KEM/RSA-2048,AES-
128,KDF3,SHA-256”)
A supplier should strive to use shortest names of algorithms, sufficient for their unam-
biguous identification.
8 API specification
c(RS_CRYPTO_02207)
[SWS_CRYPT_29030]{DRAFT} d
Kind: class
Symbol: BlockService
Scope: namespace ara::crypto::cryp
Base class: ExtensionService
Syntax: class ara::crypto::cryp::BlockService : public ExtensionService
{...};
Header file: #include "ara/crypto/cryp/block_service.h"
Description: Extension meta-information service for block cipher contexts.
c(RS_CRYPTO_02309)
[SWS_CRYPT_20400]{DRAFT} d
Kind: class
Symbol: CryptoContext
Scope: namespace ara::crypto::cryp
Syntax: class ara::crypto::cryp::CryptoContext {...};
Header file: #include "ara/crypto/cryp/crypto_context.h"
Description: A common interface of a mutable cryptographic context, i.e. that is not binded to a single crypto
object.
c(RS_CRYPTO_02008)
[SWS_CRYPT_20500]{DRAFT} d
Kind: class
Symbol: CryptoObject
Scope: namespace ara::crypto::cryp
Syntax: class ara::crypto::cryp::CryptoObject {...};
Header file: #include "ara/crypto/cryp/cryobj/crypto_object.h"
Description: A common interface for all cryptograhic objects recognizable by the Crypto Provider. This
interface (or any its derivative) represents a non-mutable (after completion) object loadable to a
temporary transformation context.
c(RS_CRYPTO_02005)
[SWS_CRYPT_20600]{DRAFT} d
Kind: class
Symbol: CryptoPrimitiveId
Scope: namespace ara::crypto::cryp
Syntax: class ara::crypto::cryp::CryptoPrimitiveId {...};
Header file: #include "ara/crypto/cryp/cryobj/crypto_primitive_id.h"
Description: Common interface for identification of all Crypto Primitives and their keys & parameters.
c(RS_CRYPTO_02005)
[SWS_CRYPT_20700]{DRAFT} d
Kind: class
Symbol: CryptoProvider
Scope: namespace ara::crypto::cryp
Syntax: class ara::crypto::cryp::CryptoProvider {...};
Header file: #include "ara/crypto/cryp/crypto_provider.h"
Description: Crypto Provider is a "factory" interface of all supported Crypto Primitives and a "trusted
environmet" for internal communications between them. All Crypto Primitives should have an
actual reference to their parent Crypto Provider. A Crypto Provider can be destroyed only after
destroying of all its daughterly Crypto Primitives. Each method of this interface that creates a
Crypto Primitive instance is non-constant, because any such creation increases a references
counter of the Crypto Primitive.
c(RS_CRYPTO_02309)
[SWS_CRYPT_20800]{DRAFT} d
Kind: class
Symbol: DecryptorPrivateCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::DecryptorPrivateCtx : public CryptoContext
{...};
Header file: #include "ara/crypto/cryp/decryptor_private_ctx.h"
Description: Asymmetric Decryption Private key Context interface.
c(RS_CRYPTO_02202)
[SWS_CRYPT_29010]{DRAFT} d
Kind: class
Symbol: DigestService
Scope: namespace ara::crypto::cryp
Base class: BlockService
Syntax: class ara::crypto::cryp::DigestService : public BlockService {...};
Header file: #include "ara/crypto/cryp/digest_service.h"
Description: Extension meta-information service for digest producing contexts.
c(RS_CRYPTO_02309)
[SWS_CRYPT_21000]{DRAFT} d
Kind: class
Symbol: EncryptorPublicCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::EncryptorPublicCtx : public CryptoContext
{...};
Header file: #include "ara/crypto/cryp/encryptor_public_ctx.h"
Description: Asymmetric Encryption Public key Context interface.
c(RS_CRYPTO_02202)
[SWS_CRYPT_29040]{DRAFT} d
Kind: class
Symbol: ExtensionService
Scope: namespace ara::crypto::cryp
Syntax: class ara::crypto::cryp::ExtensionService {...};
Header file: #include "ara/crypto/cryp/extension_service.h"
Description: Basic meta-information service for all contexts.
c(RS_CRYPTO_02309)
[SWS_CRYPT_21100]{DRAFT} d
Kind: class
Symbol: HashFunctionCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::HashFunctionCtx : public CryptoContext
{...};
Header file: #include "ara/crypto/cryp/hash_function_ctx.h"
Description: Hash function interface.
c(RS_CRYPTO_02205)
[SWS_CRYPT_21300]{DRAFT} d
Kind: class
Symbol: KeyAgreementPrivateCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::KeyAgreementPrivateCtx : public Crypto
Context {...};
Header file: #include "ara/crypto/cryp/key_agreement_private_ctx.h"
Description: Key Agreement Private key Context interface (Diffie Hellman or conceptually similar).
c(RS_CRYPTO_02104)
[SWS_CRYPT_21400]{DRAFT} d
Kind: class
Symbol: KeyDecapsulatorPrivateCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::KeyDecapsulatorPrivateCtx : public Crypto
Context {...};
Header file: #include "ara/crypto/cryp/key_decapsulator_private_ctx.h"
Description: Asymmetric Key Encapsulation Mechanism (KEM) Private key Context interface.
c(RS_CRYPTO_02104, RS_CRYPTO_02209)
[SWS_CRYPT_21500]{DRAFT} d
Kind: class
Symbol: KeyDerivationFunctionCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::KeyDerivationFunctionCtx : public Crypto
Context {...};
Header file: #include "ara/crypto/cryp/key_derivation_function_ctx.h"
Description: Key Derivation Function interface.
c(RS_CRYPTO_02103)
[SWS_CRYPT_21800]{DRAFT} d
Kind: class
Symbol: KeyEncapsulatorPublicCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::KeyEncapsulatorPublicCtx : public Crypto
Context {...};
Header file: #include "ara/crypto/cryp/key_encapsulator_public_ctx.h"
Description: Asymmetric Key Encapsulation Mechanism (KEM) Public key Context interface.
c(RS_CRYPTO_02104, RS_CRYPTO_02209)
[SWS_CRYPT_22100]{DRAFT} d
Kind: class
Symbol: MessageAuthnCodeCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::MessageAuthnCodeCtx : public CryptoContext
{...};
Header file: #include "ara/crypto/cryp/message_authn_code_ctx.h"
Description: Keyed Message Authentication Code Context interface definition (MAC/HMAC).
c(RS_CRYPTO_02203)
[SWS_CRYPT_22200]{DRAFT} d
Kind: class
Symbol: MsgRecoveryPublicCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::MsgRecoveryPublicCtx : public CryptoContext
{...};
Header file: #include "ara/crypto/cryp/msg_recovery_public_ctx.h"
Description: A public key context for asymmetric recovery of a short message and its signature verification
(RSA-like). Restricted groups of trusted subscribers can use this primitive for simultaneous
provisioning of confidentiality, authenticity and non-repudiation of short messages, if the public
key is generated appropriately and kept in secret. If (0 == BlockCryptor::ProcessBlock(...)) then
the input message-block is violated.
c(RS_CRYPTO_02202, RS_CRYPTO_02204)
[SWS_CRYPT_22500]{DRAFT} d
Kind: class
Symbol: PrivateKey
Scope: namespace ara::crypto::cryp
Base class: RestrictedUseObject
Syntax: class ara::crypto::cryp::PrivateKey : public RestrictedUseObject
{...};
5
4
Header file: #include "ara/crypto/cryp/cryobj/private_key.h"
Description: Generalized Asymmetric Private Key interface.
c(RS_CRYPTO_02002, RS_CRYPTO_02403)
[SWS_CRYPT_22700]{DRAFT} d
Kind: class
Symbol: PublicKey
Scope: namespace ara::crypto::cryp
Base class: RestrictedUseObject
Syntax: class ara::crypto::cryp::PublicKey : public RestrictedUseObject
{...};
Header file: #include "ara/crypto/cryp/cryobj/public_key.h"
Description: General Asymmetric Public Key interface.
c(RS_CRYPTO_02202)
[SWS_CRYPT_22900]{DRAFT} d
Kind: class
Symbol: RandomGeneratorCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::RandomGeneratorCtx : public CryptoContext
{...};
Header file: #include "ara/crypto/cryp/random_generator_ctx.h"
Description: Interface of Random Number Generator Context.
c(RS_CRYPTO_02206)
[SWS_CRYPT_24800]{DRAFT} d
Kind: class
Symbol: RestrictedUseObject
Scope: namespace ara::crypto::cryp
Base class: CryptoObject
Syntax: class ara::crypto::cryp::RestrictedUseObject : public CryptoObject
{...};
Header file: #include "ara/crypto/cryp/cryobj/restricted_use_object.h"
Description: A common interface for all objects supporting the usage restriction.
c(RS_CRYPTO_02008)
[SWS_CRYPT_23000]{DRAFT} d
Kind: class
Symbol: SecretSeed
Scope: namespace ara::crypto::cryp
5
4
Base class: RestrictedUseObject
Syntax: class ara::crypto::cryp::SecretSeed : public RestrictedUseObject
{...};
Header file: #include "ara/crypto/cryp/cryobj/secret_seed.h"
Description: Secret Seed object interface. This object contains a raw bit sequence of specific length (without
any filtering of allowed/disallowed values)! The secret seed value can be loaded only to a
non-key input of a cryptographic transformation context (like IV/salt/nonce)! Bit length of the
secret seed is specific to concret crypto algorithm and corresponds to maximum of its input/
output/salt block-length.
c(RS_CRYPTO_02007)
[SWS_CRYPT_23200]{DRAFT} d
Kind: class
Symbol: SigEncodePrivateCtx
Scope: namespace ara::crypto::cryp
Base class: CryptoContext
Syntax: class ara::crypto::cryp::SigEncodePrivateCtx : public CryptoContext
{...};
Header file: #include "ara/crypto/cryp/sig_encode_private_ctx.h"
Description: A private key context for asymmetric signature calculation and short message encoding
(RSA-like). Restricted groups of trusted subscribers can use this primitive for simultaneous
provisioning of confidentiality, authenticity and non-repudiation of short messages, if the public
key is generated appropriately and kept in secret.
c(RS_CRYPTO_02202, RS_CRYPTO_02204)
[SWS_CRYPT_29000]{DRAFT} d
Kind: class
Symbol: SignatureService
Scope: namespace ara::crypto::cryp
Base class: ExtensionService
Syntax: class ara::crypto::cryp::SignatureService : public ExtensionService
{...};
Header file: #include "ara/crypto/cryp/signature_service.h"
Description: Extension meta-information service for signature contexts.
c(RS_CRYPTO_02309)
[SWS_CRYPT_23300]{DRAFT} d
Kind: class
Symbol: Signature
Scope: namespace ara::crypto::cryp
Base class: CryptoObject
Syntax: class ara::crypto::cryp::Signature : public CryptoObject {...};
Header file: #include "ara/crypto/cryp/cryobj/signature.h"
5