DEENESPTFRRUARHIKOZHNL

类 ara::crypto::cryp::CryptoProvider

[SWS_CRYPT_20700] Upstream: RS_CRYPTO_02305, RS_CRYPTO_02307, RS_CRYPTO_02401

class CryptoProvider {...};

CryptoProviderInterface representing one implementation of a set of cryptographic primitives with a key storage.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::cryp

用户指南人工智能生成

用作创建和管理加密上下文、算法及密钥对象的中心工厂。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 0bf253450f85 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用作创建和管理加密上下文、算法及密钥对象的中心工厂。

该类用作提供加密原语以及创建和管理加密密钥与上下文的中心工厂([SWS_CRYPT_20742]、[SWS_CRYPT_20721])。实例既不可拷贝也不可移动,并通过共享指针进行管理([SWS_CRYPT_20701]、[SWS_CRYPT_41005])。不兼容算法或资源耗尽等错误通过 ara::core::Result 类型安全地返回([SWS_CRYPT_30098])。

上下文

类 ara::crypto::cryp::CryptoProvider 构成了在 AUTOSAR Adaptive 栈中提供加密操作和算法的中心接口。作为抽象层,它汇集了加密原语的具体实现以及对密钥和存储结构的访问。在典型的系统架构中,CryptoProvider 充当应用逻辑、持久密钥存储与专用处理上下文之间的中介和工厂。应用程序通过该 Provider 请求用于对称加密([SWS_CRYPT_20742])、非对称加密([SWS_CRYPT_20750]、[SWS_CRYPT_20751])、数字签名([SWS_CRYPT_20756]、[SWS_CRYPT_20757])、散列函数([SWS_CRYPT_20747])、消息认证([SWS_CRYPT_20746])或密钥交换协议([SWS_CRYPT_20758]、[SWS_CRYPT_20752])的专用上下文。同时,Provider 与底层 KeySlot 交互,以实例化存储的密钥([SWS_CRYPT_20762]、[SWS_CRYPT_20764])。

ProviderKontext Anwendung Anwendung CryptoProvider CryptoProvider Anwendung->CryptoProvider KeySlot KeySlot CryptoProvider->KeySlot CryptoContext CryptoContext CryptoProvider->CryptoContext CryptoObject CryptoObject CryptoProvider->CryptoObject

上下文图:CryptoProvider 作为工厂及应用程序、上下文与 KeySlot 之间中介的嵌入情况。来源:[SWS_CRYPT_20742]、[SWS_CRYPT_20756]、[SWS_CRYPT_20762]。

生命周期

CryptoProvider 的实例在拷贝和移动操作方面具有严格的语义:拷贝构造函数([SWS_CRYPT_41005])和移动构造函数([SWS_CRYPT_41006])以及相应的赋值运算符([SWS_CRYPT_30216]、[SWS_CRYPT_30217])均被显式删除(delete)。因此,实例的生命周期通常通过引用或共享所有权进行控制,为此基于 std::shared_ptr 定义了类型别名 CryptoProvider::Sptr([SWS_CRYPT_20701])。清理通过虚默认析构函数([SWS_CRYPT_20710])完成。Provider 的所有接口方法均被指定为异常安全(exception safe)且线程安全(thread-safe),因此允许从多个线程进行并发访问,而无需在 Provider 级别进行外部同步。

使用路径

典型的使用路径包括密钥提供、实例化合适的加密上下文以及随后执行转换。首先,应用程序创建或导入所需的密钥材料。为此,CryptoProvider 提供了诸如 GenerateSymmetricKey([SWS_CRYPT_20721])、GeneratePrivateKey([SWS_CRYPT_20722])、ImportPublicKey([SWS_CRYPT_20732])或从现有 KeySlot 加载([SWS_CRYPT_20762]、[SWS_CRYPT_20763])等方法。基于该算法,可以通过 GetDefaultAllowedUsage 确定默认权限([SWS_CRYPT_20955])。在下一步中,应用程序通过工厂方法创建各自的上下文,例如 AuthCipherCtx([SWS_CRYPT_20745])或 SignerPrivateCtx([SWS_CRYPT_20756])。此外,Provider 通过 GenerateRandomData([SWS_CRYPT_30098])提供随机数据,或通过 GetSecureCounter([SWS_CRYPT_20098])提供单调递增的计数值。为了进行安全交换,可以使用 ExportSecuredKey 受保护地导出密钥材料([SWS_CRYPT_20728])。

密钥与上下文生成应用CryptoProviderAuthCipherCtxGenerateSymmetricKey(algId, allowedUsage)Erzeugt SymmetricKey::SptrResult<SymmetricKey::Sptr>CreateAuthCipherCtx(algId)InstanziierungResult<AuthCipherCtx::Sptr>

时序图:密钥生成与创建 Authenticated-Cipher 上下文的流程。来源:[SWS_CRYPT_20721]、[SWS_CRYPT_20745]。

错误场景

CryptoProvider 的方法通过带有来自 ara::crypto::CryptoErrc 的值的返回类型 ara::core::Result 来报告错误。操作失败时适用回滚语义。主要错误场景包括:

本指南仅基于 AUTOSAR R25-11 的 ara::crypto::cryp::CryptoProvider 接口定义。

成员图

类图

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__crypto__cryp__CryptoProvider844 CryptoProvider + CryptoProvider() + operator=() + ~CryptoProvider() + CreateAuthCipherCtx() + CreateDecryptorPrivateCtx() + CreateEncryptorPublicCtx() + CreateHashFunctionCtx() + CreateKeyAgreementPrivateCtx() + CreateKeyDecapsulatorPrivateCtx() + CreateKeyDerivationFunctionCtx() + CreateKeyEncapsulatorPublicCtx() + CreateMessageAuthnCodeCtx() + CreateProtectedKeyImportCtx() + CreateRandomGeneratorCtx() + CreateSignerPrivateCtx() + CreateSymmetricCipherCtx() … 16 weitere

详细视图

请在大纲中选择一个条目。

构造函数和析构函数

Copy-Constructor.

重载 CryptoProvider 2
CryptoProvider (const CryptoProvider &)=delete; SWS_CRYPT_41005
CryptoProvider (CryptoProvider &&)=delete; SWS_CRYPT_41006

Destructor.

virtual ~CryptoProvider () noexcept=default;

方法

Create a symmetric authenticated cipher context.

virtual ara::core::Result< AuthCipherCtx::Sptr > CreateAuthCipherCtx (AlgId algId) noexcept=0;

Create a decryption private key context.

virtual ara::core::Result< DecryptorPrivateCtx::Sptr > CreateDecryptor PrivateCtx (AlgId algId) noexcept=0;

Create an encryption public key context.

virtual ara::core::Result< EncryptorPublicCtx::Sptr > CreateEncryptor PublicCtx (AlgId algId) noexcept=0;

Create a hash function context.

virtual ara::core::Result< HashFunctionCtx::Sptr > CreateHashFunction Ctx (AlgId algId) noexcept=0;

Create a key-agreement private key context.

virtual ara::core::Result< KeyAgreementPrivateCtx::Sptr > CreateKey AgreementPrivateCtx (AlgId algId) noexcept=0;

Create a key-decapsulator private context of a Key Encapsulation Mechanism (KEM).

virtual ara::core::Result< KeyDecapsulatorPrivateCtx::Sptr > CreateKey DecapsulatorPrivateCtx (AlgId algId) noexcept=0;

Create a key derivation function context.

virtual ara::core::Result< KeyDerivationFunctionCtx::Sptr > CreateKey DerivationFunctionCtx (AlgId algId) noexcept=0;

Create a key-encapsulator public context of a Key Encapsulation Mechanism (KEM).

virtual ara::core::Result< KeyEncapsulatorPublicCtx::Sptr > CreateKey EncapsulatorPublicCtx (AlgId algId) noexcept=0;

Create a symmetric message authentication code context.

virtual ara::core::Result< MessageAuthnCodeCtx::Sptr > CreateMessage AuthnCodeCtx (AlgId algId) noexcept=0;

The interface shall create a protected key import context.

Create a Random Number Generator (RNG) context.

virtual ara::core::Result< RandomGeneratorCtx::Sptr > CreateRandom GeneratorCtx (AlgId algId) noexcept=0;

Create a signature private key context.

virtual ara::core::Result< SignerPrivateCtx::Sptr > CreateSigner PrivateCtx (AlgId algId) noexcept=0;

Create a symmetric cipher context.

virtual ara::core::Result< SymmetricCipherCtx::Sptr > CreateSymmetric CipherCtx (AlgId algId) noexcept=0;

Create a symmetric key-wrap algorithm context.

Create a signature verification public key context.

virtual ara::core::Result< VerifierPublicCtx::Sptr > CreateVerifier PublicCtx (AlgId algId) noexcept=0;

The interface shall format the data referenced by the specified key, securely wrap this payload and serialize the secured payload into the provided output buffer. The format shall be specified implicitly by the AlgId. The formatted payload shall be wrapped according to the specified algId using the kek; if kek is not provided, ExportSecuredKey shall apply a key-encryption-key implictly defined by the algId or the default key-encryption-key of the CryptoProvider.

virtual ara::core::Result< std::size_t > ExportSecuredKey (AlgId alg Id, CryptoObject::Sptr key, ReadWriteMemRegion resultBuffer, ara::core::Optional< SymmetricKey::Sptr > kek) noexcept=0;

Generate a new public/private key pair and return the private key. The public key can be retrieved via the function PrivateKey::GetPublicKey() The allowed usage flags of the Public Key are set based on the allowed usage of the PrivateKey: • kAllowDataDecryption --> kAllowDataEncryption • kAllowSigGeneration --> kAllowSigVerification • kAllowKeyAgreement --> kAllowKeyAgreement • kAllowKeyUnwrapping --> kAllowKeyWrapping Additionally, the allowed usage: • kAllowPlaintextExport • kAllowPersist are set for the public key.

virtual ara::core::Result< PrivateKey::Sptr > GeneratePrivateKey (Alg Id algId, AllowedUsageFlags privateKeyAllowedUsage) noexcept=0;

Fill the provided output data buffer randomData with random data.

virtual ara::core::Result< void > GenerateRandomData (ReadWriteMem Region randomData) noexcept=0;

Generate a new symmetric key.

virtual ara::core::Result< SymmetricKey::Sptr > GenerateSymmetricKey (AlgId algId, AllowedUsageFlags allowedUsage) noexcept=0;

Get a CryptoProvider specific default set of allowedUsages for the provided AlgId. The returned allowedUsages shall not contain kAllowPlaintextExport, kAllowPersist and kAllowSecuredExport.

virtual ara::core::Result< AllowedUsageFlags > GetDefaultAllowedUsage (AlgId algId) noexcept=0;

Obtain provider specific identification data.

virtual ara::core::Result< void > GetProviderID (ara::core::Optional< ReadOnlyMemRegion > in, ReadWriteMemRegion idData) noexcept=0;

Get the required size of the output buffer for ID data used by GetProviderID.

virtual ara::core::Result< std::size_t > GetProviderIdSize () noexcept=0;

Get the current value of the secure counter of this CryptoProvider. The current counter value is guaranteed to be stricly larger than any previously returned counter value.

ara::core::Result< SecureCounter > GetSecureCounter () noexcept;

Import a serialized private key.

virtual ara::core::Result< PrivateKey::Sptr > ImportPrivateKey (Read OnlyMemRegion serialized, AllowedUsageFlags allowedUsage, FormatId formatId, ara::core::Optional< AlgId > algId) noexcept=0;

Import a serialized public key.

virtual ara::core::Result< PublicKey::Sptr > ImportPublicKey (ReadOnly MemRegion serialized, AllowedUsageFlags allowedUsage, FormatId format Id, ara::core::Optional< AlgId > algId) noexcept=0;

Import a serialized symmetric key.

virtual ara::core::Result< SymmetricKey::Sptr > ImportSymmetricKey (ReadOnlyMemRegion serialized, AllowedUsageFlags allowedUsage, Format Id formatId, ara::core::Optional< AlgId > algId) noexcept=0;

Load a private key from the provided KeySlot.

virtual ara::core::Result< PrivateKey::Sptr > LoadPrivateKey (Key Slot::Sptr keySlot) noexcept=0;

Load a public key from the provided KeySlot.

virtual ara::core::Result< PublicKey::Sptr > LoadPublicKey (Key Slot::Sptr keySlot) noexcept=0;

Load a symmetric key from the provided KeySlot.

virtual ara::core::Result< SymmetricKey::Sptr > LoadSymmetricKey (Key Slot::Sptr keySlot) noexcept=0;

运算符

operator= 函数 2

Copy-assign another CryptoProvider to this instance.

重载 = 2
CryptoProvider & operator= (const CryptoProvider &other)=delete; SWS_CRYPT_30216
CryptoProvider & operator= (CryptoProvider &&other)=delete; SWS_CRYPT_30217

类型别名

Sptr 类型别名

Shared pointer of the CryptoProvider.

方法文档

函数 CreateAuthCipherCtx [SWS_CRYPT_20745] Upstream: RS_CRYPTO_02207, RS_AP_00144

virtual ara::core::Result< AuthCipherCtx::Sptr > CreateAuthCipherCtx (AlgId algId) noexcept=0;

Create a symmetric authenticated cipher context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 11ce33c6da44 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

方法 CreateAuthCipherCtx 用于创建对称认证加密的上下文([SWS_CRYPT_20745])。它在类 ara::crypto::cryp::CryptoProvider 中被定义为纯虚接口,并通过头文件 ara/crypto/cryp/crypto_provider.h 引入([SWS_CRYPT_20745])。

用法与语义

作为输入参数传入 algId,用于标识目标加密算法([SWS_CRYPT_20745])。该函数同步工作且不抛出异常(noexcept)([SWS_CRYPT_20745])。执行成功时,它返回一个带有指向所创建实例 AuthCipherCtx::Sptr 的智能指针的 ara::core::Result([SWS_CRYPT_20745])。

错误处理

在发生错误时,将在 ara::core::Result 中返回具有回滚语义的相应错误代码([SWS_CRYPT_20745]):

  • ara::crypto::CryptoErrc::kInvalidArgument:当 algId 未指定对称认证流密码算法时([SWS_CRYPT_20745])。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:当为 algId 传入了不受支持的值时([SWS_CRYPT_20745])。

并发性

CreateAuthCipherCtx 的调用被指定为线程安全(thread-safe)且异常安全(exception safe)([SWS_CRYPT_20745])。

本文本自动生成。所有技术陈述均有规范证据支持。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result< AuthCipherCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from symmetric authenticated stream cipher
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20745
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20745@rel:R25-11#f1d8844a
Content hash
f1d8844a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20745
Status: valid/unmigrated Version: rel:R25-11#39b58f01 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20745@rel:R25-11#39b58f01
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f26e531e2026-09-30
  • R19-11rel:R19-11#068856e02026-10-14
  • R20-11rel:R20-11#07ae27852026-10-14
  • R21-11rel:R21-11#35bf37702026-10-14
  • R22-11rel:R22-11#69962f862026-10-14
  • R23-11rel:R23-11#ca5aac9e2026-10-14
  • R24-11rel:R24-11#7d9792cd2026-10-14
  • R25-11rel:R25-11#39b58f012026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateDecryptorPrivateCtx [SWS_CRYPT_20751] Upstream: RS_CRYPTO_02202, RS_AP_00144

virtual ara::core::Result< DecryptorPrivateCtx::Sptr > CreateDecryptor PrivateCtx (AlgId algId) noexcept=0;

Create a decryption private key context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 7d14bb93ecba 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的方法 CreateDecryptorPrivateCtx 用于根据 [SWS_CRYPT_20751] 创建使用私钥进行非对称解密的上下文。作为输入参数,该函数需要 algId,用于指定所需非对称加密或解密算法的标识符。Interpretation:该调用很可能是同步执行的,因为签名直接返回一个 ara::core::Result,成功时该对象包含指向所创建上下文(DecryptorPrivateCtx::Sptr)的智能指针 [SWS_CRYPT_20751]。 问题 Q-45d1c4a1b2133f4c (未决)

错误处理

如果无法创建上下文,错误将通过返回的 ara::core::Result 传递。如果为参数 algId 传入了不受支持的值,这将具体导致具有回滚语义的错误代码 ara::crypto::CryptoErrc::kUnknownIdentifier [SWS_CRYPT_20751]。

并发性与限制

该函数被定义为 noexcept 并保证异常安全性(exception safe)[SWS_CRYPT_20751]。对于来自多个线程的并发访问,该方法被指定为 thread-safe [SWS_CRYPT_20751]。由于签名在头文件 ara/crypto/cryp/crypto_provider.h 中被声明为纯虚方法,具体实现由相应的 Provider 实现负责 [SWS_CRYPT_20751]。

此使用说明自动生成,完全基于 AUTOSAR Adaptive 版本 R25-11 的规范数据。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target asymmetric encryption/decryption algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<DecryptorPrivateCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if AlgId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20751
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20751@rel:R25-11#af64644b
Content hash
af64644b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20751
Status: valid/unmigrated Version: rel:R25-11#9ad4a16f Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20751@rel:R25-11#9ad4a16f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d0572a212026-09-30
  • R19-11rel:R19-11#958150e62026-10-14
  • R20-11rel:R20-11#db1918e82026-10-14
  • R21-11rel:R21-11#d03527eb2026-10-14
  • R22-11rel:R22-11#19548e8e2026-10-14
  • R23-11rel:R23-11#b4b720e52026-10-14
  • R24-11rel:R24-11#00b7d5452026-10-14
  • R25-11rel:R25-11#9ad4a16f2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateEncryptorPublicCtx [SWS_CRYPT_20750] Upstream: RS_CRYPTO_02202, RS_AP_00144

virtual ara::core::Result< EncryptorPublicCtx::Sptr > CreateEncryptor PublicCtx (AlgId algId) noexcept=0;

Create an encryption public key context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f47db9d84d9a 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

纯虚接口方法 CreateEncryptorPublicCtx 属于类 ara::crypto::cryp::CryptoProvider,并通过头文件 ara/crypto/cryp/crypto_provider.h 声明 [SWS_CRYPT_20750]。其任务是实例化用于使用公钥进行非对称加密操作的新上下文 [SWS_CRYPT_20750]。

用法:调用同步进行,并指定类型为 AlgId 的参数 algId,该参数确定所需非对称加密或解密算法的标识符 [SWS_CRYPT_20750]。该方法在 ara::core::Result 中返回结果,成功时提供指向所创建上下文的类型为 EncryptorPublicCtx::Sptr 的智能指针 [SWS_CRYPT_20750]。

错误处理:如果参数 algId 包含不受支持的算法值,则调用失败并在 ara::core::Result 中返回错误代码 ara::crypto::CryptoErrc::kUnknownIdentifier [SWS_CRYPT_20750]。对于这种错误情况,指定了显式的回滚语义 [SWS_CRYPT_20750]。

并发性与异常安全性:该接口被声明为 noexcept,视为异常安全(exception safe),并被明确指定为线程安全(thread-safe)[SWS_CRYPT_20750]。

本段文本由 AI 基于规范生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target asymmetric encryption/decryption algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<EncryptorPublicCtx::Sptr>Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if AlgId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20750
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20750@rel:R25-11#0d1ccbcb
Content hash
0d1ccbcb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20750
Status: valid/unmigrated Version: rel:R25-11#645c8167 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20750@rel:R25-11#645c8167
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8b735d082026-09-30
  • R19-11rel:R19-11#245f8fcf2026-10-14
  • R20-11rel:R20-11#56691f5f2026-10-14
  • R21-11rel:R21-11#f1e172112026-10-14
  • R22-11rel:R22-11#e5ba293e2026-10-14
  • R23-11rel:R23-11#128841ba2026-10-14
  • R24-11rel:R24-11#e48790ba2026-10-14
  • R25-11rel:R25-11#645c81672026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateHashFunctionCtx [SWS_CRYPT_20747] Upstream: RS_CRYPTO_02205, RS_AP_00144

virtual ara::core::Result< HashFunctionCtx::Sptr > CreateHashFunction Ctx (AlgId algId) noexcept=0;

Create a hash function context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: d5d380ddf0c0 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

方法 CreateHashFunctionCtx 用于实例化加密哈希上下文([SWS_CRYPT_20747])。它作为类 ara::crypto::cryp::CryptoProvider 的纯虚接口通过头文件 ara/crypto/cryp/crypto_provider.h 提供。

用法与参数

该调用同步进行,并需要 algId(类型为 AlgId)作为输入参数,用于标识所需的加密算法([SWS_CRYPT_20747])。作为返回值,该函数提供一个 ara::core::Result<HashFunctionCtx::Sptr>,成功时包含指向所创建上下文的智能指针。

错误处理

如果创建失败,ara::core::Result 将包含具有回滚语义的相应错误代码([SWS_CRYPT_20747]):

  • ara::crypto::CryptoErrc::kInvalidArgument:当传入的 algId 被指定为哈希函数以外的其他算法类型时返回([SWS_CRYPT_20747])。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:如果为 algId 传入了不受支持的标识符,则发生([SWS_CRYPT_20747])。

并发性与限制

该函数被声明为 noexcept,并被指定为异常安全(“exception safe”)([SWS_CRYPT_20747])。此外,该调用是线程安全的(“thread-safe”),因此允许从多个线程在 CryptoProvider 的同一实例上进行并发调用([SWS_CRYPT_20747])。

该文本由 AI 基于规范 R25-11 生成。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result< HashFunctionCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from hash function
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20747
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20747@rel:R25-11#979eaee2
Content hash
979eaee2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20747
Status: valid/unmigrated Version: rel:R25-11#a65adf82 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20747@rel:R25-11#a65adf82
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f2f9f89e2026-09-30
  • R19-11rel:R19-11#27d8bfbe2026-10-14
  • R20-11rel:R20-11#8ae2344a2026-10-14
  • R21-11rel:R21-11#5db0d9fb2026-10-14
  • R22-11rel:R22-11#f8120b092026-10-14
  • R23-11rel:R23-11#cd6826a42026-10-14
  • R24-11rel:R24-11#8ca5ca262026-10-14
  • R25-11rel:R25-11#a65adf822026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateKeyAgreementPrivateCtx [SWS_CRYPT_20758] Upstream: RS_CRYPTO_02104, RS_AP_00144

virtual ara::core::Result< KeyAgreementPrivateCtx::Sptr > CreateKey AgreementPrivateCtx (AlgId algId) noexcept=0;

Create a key-agreement private key context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: f0aaacbed75d 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::crypto::cryp::CryptoProvider 的方法 CreateKeyAgreementPrivateCtx 用于根据 [SWS_CRYPT_20758] 创建用于密钥协商(KeyAgreementPrivateCtx)的私钥上下文。声明通过头文件 #include "ara/crypto/cryp/crypto_provider.h" 提供。

使用与调用

作为传入参数,该同步方法需要类型为 AlgId 的标识符 algId,用于指定所期望的 Key-Agreement 加密算法。作为返回值,该函数提供一个 ara::core::Result<KeyAgreementPrivateCtx::Sptr>,成功时封装了指向新创建上下文实例的智能指针 [SWS_CRYPT_20758]。

错误处理

如果实例化失败,返回的 ara::core::Result 将包含具有回滚语义的错误码 [SWS_CRYPT_20758]:

  • ara::crypto::CryptoErrc::kInvalidArgument:当参数 algId 指定的加密算法不同于密钥协商流程时发生。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:在标识符 algId 具有不受支持的值时返回。

并发性与安全性

该接口声明为 noexcept,并定义为异常安全(exception safe)。此外,该调用被指定为线程安全(thread-safe),因此允许在 CryptoProvider 的同一实例上进行并发调用 [SWS_CRYPT_20758]。

本使用说明基于 AUTOSAR R25-11 规范自动生成。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target key-agreement crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result< KeyAgreementPrivateCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from key-agreement
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20758
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20758@rel:R25-11#da1a8d16
Content hash
da1a8d16
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20758
Status: valid/unmigrated Version: rel:R25-11#768fe78c Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20758@rel:R25-11#768fe78c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#64be1dbd2026-09-30
  • R19-11rel:R19-11#b377ec0f2026-10-14
  • R20-11rel:R20-11#8e18e3592026-10-14
  • R21-11rel:R21-11#d272fd992026-10-14
  • R22-11rel:R22-11#4a3ac1a22026-10-14
  • R23-11rel:R23-11#ad3845082026-10-14
  • R24-11rel:R24-11#c10793c52026-10-14
  • R25-11rel:R25-11#768fe78c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateKeyDecapsulatorPrivateCtx [SWS_CRYPT_20753] Upstream: RS_CRYPTO_02104, RS_CRYPTO_02209, RS_AP_00144

virtual ara::core::Result< KeyDecapsulatorPrivateCtx::Sptr > CreateKey DecapsulatorPrivateCtx (AlgId algId) noexcept=0;

Create a key-decapsulator private context of a Key Encapsulation Mechanism (KEM).

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 29715a46f6b0 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的方法 CreateKeyDecapsulatorPrivateCtx 用于为密钥封装机制(KEM)创建用于密钥解封装的私有上下文 [SWS_CRYPT_20753]。它期望类型为 AlgId 的 algId 作为输入参数,用于标识所需的 KEM 加密算法 [SWS_CRYPT_20753]。该函数同步工作并在 ara::core::Result<KeyDecapsulatorPrivateCtx::Sptr> 中返回结果,成功时其中封装了指向新实例化上下文的智能指针 [SWS_CRYPT_20753]。

错误处理

如果在创建上下文时发生错误,则通过具有回滚语义的 ara::core::Result 报告该错误 [SWS_CRYPT_20753]:

  • ara::crypto::CryptoErrc::kInvalidArgument:参数 algId 指定了一个非非对称 KEM 方案的加密算法 [SWS_CRYPT_20753]。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:参数 algId 具有不受支持的值 [SWS_CRYPT_20753]。

并发性与执行安全性

该接口被声明为 noexcept,并被指定为异常安全(exception safe)[SWS_CRYPT_20753]。此外,执行设计为线程安全(thread-safe)[SWS_CRYPT_20753]。

本使用说明基于 AUTOSAR Adaptive R25-11 规范。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target KEM crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result< KeyDecapsulatorPrivateCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from asymmetric KEM
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20753
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20753@rel:R25-11#f755e561
Content hash
f755e561
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20753
Status: valid/unmigrated Version: rel:R25-11#2a254e1e Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20753@rel:R25-11#2a254e1e
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ce72d5082026-09-30
  • R19-11rel:R19-11#8ce1bc4c2026-10-14
  • R20-11rel:R20-11#c151a2bd2026-10-14
  • R21-11rel:R21-11#d9e99bf42026-10-14
  • R22-11rel:R22-11#34ef693d2026-10-14
  • R23-11rel:R23-11#fc9a47332026-10-14
  • R24-11rel:R24-11#8a7533962026-10-14
  • R25-11rel:R25-11#2a254e1e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateKeyDerivationFunctionCtx [SWS_CRYPT_20748] Upstream: RS_CRYPTO_02103, RS_AP_00144

virtual ara::core::Result< KeyDerivationFunctionCtx::Sptr > CreateKey DerivationFunctionCtx (AlgId algId) noexcept=0;

Create a key derivation function context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: a0b8a7f1dfa2 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::crypto::cryp::CryptoProvider 的方法 CreateKeyDerivationFunctionCtx 用于为密钥派生函数创建执行上下文([SWS_CRYPT_20748])。作为输入参数,将传递类型为 AlgId 的标识符 algId,该标识符指定所需的目标加密算法。同步调用返回一个 ara::core::Result,该返回值在成功执行时提供指向所创建上下文(KeyDerivationFunctionCtx::Sptr)的智能指针([SWS_CRYPT_20748])。

如果在实例化时发生错误,则在回滚语义下返回带有相应错误码的结果([SWS_CRYPT_20748]):

  • ara::crypto::CryptoErrc::kInvalidArgument:参数 algId 指定了一个非密钥派生函数的加密算法([SWS_CRYPT_20748])。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:传入的标识符 algId 具有不受支持的值([SWS_CRYPT_20748])。

该接口被声明为纯虚函数,指定为 noexcept,并强制归类为 thread-safe 以及 exception safe([SWS_CRYPT_20748])。通过头文件 #include "ara/crypto/cryp/crypto_provider.h" 包含。该函数对应上级需求 [RS_CRYPTO_02103] 和 [RS_AP_00144]。

本使用说明由 AI 自动生成,并基于 AUTOSAR Adaptive Platform R25-11 规范。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result< KeyDerivationFunctionCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from key derivation function
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20748
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20748@rel:R25-11#e5d013f7
Content hash
e5d013f7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20748
Status: valid/unmigrated Version: rel:R25-11#87a97504 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20748@rel:R25-11#87a97504
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#ce0d4c1b2026-09-30
  • R19-11rel:R19-11#529d87c72026-10-14
  • R20-11rel:R20-11#69f8e53c2026-10-14
  • R21-11rel:R21-11#6c13fa4d2026-10-14
  • R22-11rel:R22-11#38efa8462026-10-14
  • R23-11rel:R23-11#bad3069e2026-10-14
  • R24-11rel:R24-11#248bba532026-10-14
  • R25-11rel:R25-11#87a975042026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateKeyEncapsulatorPublicCtx [SWS_CRYPT_20752] Upstream: RS_CRYPTO_02104, RS_CRYPTO_02209, RS_AP_00144

virtual ara::core::Result< KeyEncapsulatorPublicCtx::Sptr > CreateKey EncapsulatorPublicCtx (AlgId algId) noexcept=0;

Create a key-encapsulator public context of a Key Encapsulation Mechanism (KEM).

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: efe36f596de1 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的方法 CreateKeyEncapsulatorPublicCtx 用于为密钥封装机制(Key Encapsulation Mechanism,KEM)创建公钥上下文 [SWS_CRYPT_20752]。为此需要引入头文件 #include "ara/crypto/cryp/crypto_provider.h" [SWS_CRYPT_20752]。调用同步进行:传入 algId 作为输入参数,用于指定 KEM 的目标加密算法。执行成功时,该方法返回封装在 ara::core::Result 中的指向所创建上下文(KeyEncapsulatorPublicCtx::Sptr)的智能指针 [SWS_CRYPT_20752]。

错误处理

如果在创建过程中发生错误,将采用回滚语义,且 ara::core::Result 包含来自 ara::crypto::CryptoErrc 的特定错误代码 [SWS_CRYPT_20752]:

  • ara::crypto::CryptoErrc::kInvalidArgument:当参数 algId 指定了非非对称 KEM 的加密算法时返回 [SWS_CRYPT_20752]。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:如果参数 algId 具有不受支持的值,则报告 [SWS_CRYPT_20752]。

并发性与安全性

接口函数被声明为 noexcept,并被归类为异常安全(exception safe)和线程安全(thread-safe)[SWS_CRYPT_20752]。因此,可以安全地从并发上下文中调用它而无需外部同步 [SWS_CRYPT_20752]。

本使用说明基于 AUTOSAR Adaptive R25-11 规范。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target KEM crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result< KeyEncapsulatorPublicCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from asymmetric KEM
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20752
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20752@rel:R25-11#1a63253f
Content hash
1a63253f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20752
Status: valid/unmigrated Version: rel:R25-11#80eb6ba8 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20752@rel:R25-11#80eb6ba8
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#eb9642562026-09-30
  • R19-11rel:R19-11#c59c43e42026-10-14
  • R20-11rel:R20-11#4d2fccee2026-10-14
  • R21-11rel:R21-11#aecc69b32026-10-14
  • R22-11rel:R22-11#9fd887092026-10-14
  • R23-11rel:R23-11#2013b4922026-10-14
  • R24-11rel:R24-11#048a75932026-10-14
  • R25-11rel:R25-11#80eb6ba82026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateMessageAuthnCodeCtx [SWS_CRYPT_20746] Upstream: RS_CRYPTO_02203, RS_AP_00144

virtual ara::core::Result< MessageAuthnCodeCtx::Sptr > CreateMessage AuthnCodeCtx (AlgId algId) noexcept=0;

Create a symmetric message authentication code context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 9f61171ea583 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的纯虚方法 CreateMessageAuthnCodeCtx 需要头文件 ara/crypto/cryp/crypto_provider.h,用于同步创建对称消息认证码的上下文 [SWS_CRYPT_20746]。该函数接收类型为 AlgId 的参数 algId 作为输入值,用于指定目标加密算法 [SWS_CRYPT_20746]。执行成功时,该方法返回一个 ara::core::Result<MessageAuthnCodeCtx::Sptr>,其中封装了指向新实例化上下文实例的智能指针 [SWS_CRYPT_20746]。

错误处理

在发生错误时,返回的 Result 对象提供具有回滚语义的特定错误代码 [SWS_CRYPT_20746]:

  • ara::crypto::CryptoErrc::kInvalidArgument:参数 algId 指定了非对称消息认证码的加密算法 [SWS_CRYPT_20746]。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:为参数 algId 传入了未知或不受支持的标识符 [SWS_CRYPT_20746]。

并发性与执行安全性

该接口带有说明符 noexcept,并保证完全的异常安全性(exception safe)[SWS_CRYPT_20746]。此外,该函数被明确指定为线程安全(thread-safe),因此可以从并发线程并行调用而无需外部同步 [SWS_CRYPT_20746]。

本使用说明基于规范自动生成。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<MessageAuthnCodeCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from symmetric message authentication code
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20746
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20746@rel:R25-11#da90c0e0
Content hash
da90c0e0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20746
Status: valid/unmigrated Version: rel:R25-11#957c6291 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20746@rel:R25-11#957c6291
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#37f876a32026-09-30
  • R19-11rel:R19-11#e9adf02f2026-10-14
  • R20-11rel:R20-11#d6c0c1ec2026-10-14
  • R21-11rel:R21-11#3670d4772026-10-14
  • R22-11rel:R22-11#178c72202026-10-14
  • R23-11rel:R23-11#2108bb852026-10-14
  • R24-11rel:R24-11#7cfcb5e32026-10-14
  • R25-11rel:R25-11#957c62912026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateProtectedKeyImportCtx [SWS_CRYPT_50017] Upstream: RS_CRYPTO_02105

virtual ara::core::Result< ProtectedKeyImportCtx::Sptr > Create ProtectedKeyImportCtx (AlgId algId) noexcept=0;

The interface shall create a protected key import context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: cc2e3e31c614 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

类 ara::crypto::cryp::CryptoProvider 的接口 CreateProtectedKeyImportCtx(定义于 ara/crypto/cryp/crypto_provider.h 中)用于同步创建受保护密钥导入的上下文([SWS_CRYPT_50017])。通过输入参数 algId 传入所需 Wrapping 算法的标识符([SWS_CRYPT_50017])。成功实例化后,该方法返回一个 ara::core::Result,其中提供指向所生成上下文的智能指针 ProtectedKeyImportCtx::Sptr([SWS_CRYPT_50017])。

错误处理

如果创建失败,该方法在 ara::core::Result 中返回带有回滚语义的错误码([SWS_CRYPT_50017]):

  • ara::crypto::CryptoErrc::kInvalidArgument:当 algId 指定的加密算法不被 CryptoProvider 支持用于 Wrapping 时发生([SWS_CRYPT_50017])。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:当参数 algId 包含未知或不受支持的标识符值时报告([SWS_CRYPT_50017])。

并发性与限制

该纯虚方法声明为 noexcept,提供异常安全性,并被明确规范为线程安全(thread-safe)([SWS_CRYPT_50017])。因此可以从多个线程并行调用它,而无需外部同步([SWS_CRYPT_50017])。

本使用说明基于 AUTOSAR Adaptive R25-11 规范自动生成。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the wrapping algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<ProtectedKeyImportCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm that is not supported by this CryptoProvider for wrapping
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50017
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50017@rel:R25-11#00d51ebf
Content hash
00d51ebf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50017
Status: valid/unmigrated Version: rel:R25-11#59ce7c71 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50017@rel:R25-11#59ce7c71
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateRandomGeneratorCtx [SWS_CRYPT_20741] Upstream: RS_CRYPTO_02206

virtual ara::core::Result< RandomGeneratorCtx::Sptr > CreateRandom GeneratorCtx (AlgId algId) noexcept=0;

Create a Random Number Generator (RNG) context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 64bbceaa10df 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

方法 CreateRandomGeneratorCtx 用于在类 ara::crypto::cryp::CryptoProvider 内创建随机数生成器(Random Number Generator,RNG)的上下文 [SWS_CRYPT_20741]。

用法与调用上下文

该函数被同步调用,并且需要头文件 ara/crypto/cryp/crypto_provider.h [SWS_CRYPT_20741]:

  • 参数:传入类型为 AlgId 的 algId,用于标识所需的 RNG 算法。如果未指定具体的 algId,则该方法提供默认 RNG [SWS_CRYPT_20741]。
  • 返回值:一个 ara::core::Result<RandomGeneratorCtx::Sptr>,成功时包含指向 RandomGeneratorCtx 的所创建实例的共享指针 [SWS_CRYPT_20741]。

错误处理

该方法不抛出异常(noexcept),并被指定为异常安全 [SWS_CRYPT_20741]。如果操作失败,ara::core::Result 将返回错误代码:

  • ara::crypto::CryptoErrc::kUnknownIdentifier:当参数 algId 具有不受支持的值时发生(具有回滚语义)[SWS_CRYPT_20741]。

并发性与限制

该方法被分类为线程安全(thread-safe),因此允许通过 CryptoProvider 的同一实例进行并行调用 [SWS_CRYPT_20741]。

此使用说明自动生成,完全基于 AUTOSAR Adaptive R25-11 的规范数据。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of target RNG algorithm. If no algId is given, the default RNG is returned

Rückgabewert

TypBeschreibung
ara::core::Result<RandomGeneratorCtx::Sptr >result containing a shared pointer to the context or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20741
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20741@rel:R25-11#76571e27
Content hash
76571e27
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20741
Status: valid/unmigrated Version: rel:R25-11#d4f2c255 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20741@rel:R25-11#d4f2c255
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#a3510ae92026-09-30
  • R19-11rel:R19-11#60ee10c72026-10-14
  • R20-11rel:R20-11#0569ff502026-10-14
  • R21-11rel:R21-11#32b16cb02026-10-14
  • R22-11rel:R22-11#c44c5e5c2026-10-14
  • R23-11rel:R23-11#e3fa37f52026-10-14
  • R24-11rel:R24-11#5e17e1572026-10-14
  • R25-11rel:R25-11#d4f2c2552026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateSignerPrivateCtx [SWS_CRYPT_20756] Upstream: RS_CRYPTO_02204, RS_AP_00144

virtual ara::core::Result< SignerPrivateCtx::Sptr > CreateSigner PrivateCtx (AlgId algId) noexcept=0;

Create a signature private key context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: b425000c991d 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::crypto::cryp::CryptoProvider 的方法 CreateSignerPrivateCtx 用于创建使用私钥进行签名操作的上下文([SWS_CRYPT_20756])。

用法与参数:调用需要包含头文件 ara/crypto/cryp/crypto_provider.h。通过输入参数 algId 指定目标加密签名算法。成功时,该函数通过返回类型 ara::core::Result<SignerPrivateCtx::Sptr> 返回一个指向所创建上下文实例的智能指针([SWS_CRYPT_20756])。Interpretation:由于该方法直接返回一个 ara::core::Result,因此该调用应为同步执行。 问题 Q-8480f3cf5cef5f49 (未决)

并发性与安全性:该方法被指定为线程安全(thread-safe)及异常安全(exception safe),并声明为 noexcept([SWS_CRYPT_20756])。因此,可以从并发上下文中调用它,而无需额外的同步。

错误处理:出错时,结果将提供一个具有回滚语义([SWS_CRYPT_20756])的 ara::crypto::CryptoErrc 类型错误码:

  • ara::crypto::CryptoErrc::kInvalidArgument:当参数 algId 指定的加密算法不同于私钥签名([SWS_CRYPT_20756])时发生。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:当 algId 包含未知或不受支持的值([SWS_CRYPT_20756])时发生。

本文本由 AI 生成,仅供参考。一切以 AUTOSAR 规范为准。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target signature crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result< SignerPrivateCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from private key signature
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20756
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20756@rel:R25-11#b158926f
Content hash
b158926f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20756
Status: valid/unmigrated Version: rel:R25-11#cc9f565a Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20756@rel:R25-11#cc9f565a
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#cd4471752026-09-30
  • R19-11rel:R19-11#1edbf4c72026-10-14
  • R20-11rel:R20-11#a2cfe2c82026-10-14
  • R21-11rel:R21-11#54e185f52026-10-14
  • R22-11rel:R22-11#2a8de2322026-10-14
  • R23-11rel:R23-11#83e55d092026-10-14
  • R24-11rel:R24-11#0df4e6d12026-10-14
  • R25-11rel:R25-11#cc9f565a2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateSymmetricCipherCtx [SWS_CRYPT_20742] Upstream: RS_CRYPTO_02201

virtual ara::core::Result< SymmetricCipherCtx::Sptr > CreateSymmetric CipherCtx (AlgId algId) noexcept=0;

Create a symmetric cipher context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: e2de1e3ea197 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的虚方法 CreateSymmetricCipherCtx 用于创建对称加密操作的上下文([SWS_CRYPT_20742])。它通过头文件 #include "ara/crypto/cryp/crypto_provider.h" 引入([SWS_CRYPT_20742])。

作为输入参数,该函数需要类型为 AlgId 的 algId,用于指定所需目标加密算法的标识符([SWS_CRYPT_20742])。该调用同步进行,并返回 ara::core::Result<SymmetricCipherCtx::Sptr> 作为结果,成功时提供指向新实例化上下文实例的智能指针([SWS_CRYPT_20742])。

错误处理

如果创建失败,返回的 ara::core::Result 将包含相应的错误代码([SWS_CRYPT_20742]):

  • ara::crypto::CryptoErrc::kUnknownIdentifier:如果传入的 algId 值引用了不受支持的算法,则以回滚语义报告([SWS_CRYPT_20742])。

并发性与限制

该函数被声明为 noexcept,并被明确指定为异常安全(exception safe)([SWS_CRYPT_20742])。此外,该调用是线程安全的(thread-safe),因此允许通过同一个 CryptoProvider 实例并行创建上下文([SWS_CRYPT_20742])。

此使用说明自动生成。所有信息均完全基于 AUTOSAR 规范版本 R25-11。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<SymmetricCipherCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if AlgId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20742
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20742@rel:R25-11#63cc492f
Content hash
63cc492f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20742
Status: valid/unmigrated Version: rel:R25-11#c3456bc2 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20742@rel:R25-11#c3456bc2
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#72dd17572026-09-30
  • R19-11rel:R19-11#abecadca2026-10-14
  • R20-11rel:R20-11#c7ef4de02026-10-14
  • R21-11rel:R21-11#7efa8e4d2026-10-14
  • R22-11rel:R22-11#a4f2f60c2026-10-14
  • R23-11rel:R23-11#8bfbe22a2026-10-14
  • R24-11rel:R24-11#bac03a522026-10-14
  • R25-11rel:R25-11#c3456bc22026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateSymmetricKeyWrapperCtx [SWS_CRYPT_20743] Upstream: RS_CRYPTO_02104, RS_CRYPTO_02208

virtual ara::core::Result< SymmetricKeyWrapperCtx::Sptr > Create SymmetricKeyWrapperCtx (AlgId algId) noexcept=0;

Create a symmetric key-wrap algorithm context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 81927eb57ee6 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

类 ara::crypto::cryp::CryptoProvider 的方法 CreateSymmetricKeyWrapperCtx 用于为对称 Key-Wrap 算法创建上下文([SWS_CRYPT_20743])。传入 algId 作为输入参数,其唯一标识目标加密算法([SWS_CRYPT_20743])。该调用是同步的,在成功时返回封装了指向所创建上下文的智能指针(SymmetricKeyWrapperCtx::Sptr)的 ara::core::Result([SWS_CRYPT_20743])。

错误处理

如果创建失败,该函数在 ara::core::Result 内返回错误对象([SWS_CRYPT_20743]):

  • ara::crypto::CryptoErrc::kUnknownIdentifier:当参数 algId 具有不受支持的值时报告;此时回滚语义生效([SWS_CRYPT_20743])。

并发性与限制

该接口声明为 noexcept,被视为异常安全(exception safe)且是线程安全的([SWS_CRYPT_20743])。因此,只要底层 CryptoProvider 支持所提供的 algId,就可以安全地从并发上下文中调用它([SWS_CRYPT_20743])。

本使用说明自动生成,且完全基于 AUTOSAR R25-11 的规范数据。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<SymmetricKeyWrapperCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20743
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20743@rel:R25-11#93de63b1
Content hash
93de63b1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20743
Status: valid/unmigrated Version: rel:R25-11#f6ffee2c Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20743@rel:R25-11#f6ffee2c
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7e4d7cb12026-09-30
  • R19-11rel:R19-11#88c705562026-10-14
  • R20-11rel:R20-11#59ed5d162026-10-14
  • R21-11rel:R21-11#4c2a43392026-10-14
  • R22-11rel:R22-11#178879012026-10-14
  • R23-11rel:R23-11#2ae2b3f42026-10-14
  • R24-11rel:R24-11#2c2d21382026-10-14
  • R25-11rel:R25-11#f6ffee2c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CreateVerifierPublicCtx [SWS_CRYPT_20757] Upstream: RS_CRYPTO_02204, RS_AP_00144

virtual ara::core::Result< VerifierPublicCtx::Sptr > CreateVerifier PublicCtx (AlgId algId) noexcept=0;

Create a signature verification public key context.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 6459db29afbf 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用法与调用上下文

类 ara::crypto::cryp::CryptoProvider 的纯虚方法 CreateVerifierPublicCtx 通过头文件 ara/crypto/cryp/crypto_provider.h 声明 [SWS_CRYPT_20757]。它用于同步创建用于公钥签名验证的上下文 [SWS_CRYPT_20757]。

调用方通过参数 algId(类型 AlgId)传递所需加密签名算法的标识符 [SWS_CRYPT_20757]。成功时,该函数返回一个 ara::core::Result,其中包含指向所创建验证上下文(VerifierPublicCtx::Sptr)的智能指针 [SWS_CRYPT_20757]。

错误处理

出错时将应用回滚语义,且生成的 ara::core::Result 会传递相应的错误码 [SWS_CRYPT_20757]:

  • ara::crypto::CryptoErrc::kInvalidArgument:当参数 algId 指定的加密算法并非用于公钥签名验证时报告 [SWS_CRYPT_20757]。
  • ara::crypto::CryptoErrc::kUnknownIdentifier:当为 algId 传递了未知或不受支持的标识符时报告 [SWS_CRYPT_20757]。

并发性与限制

该方法声明为 noexcept,完全异常安全(exception safe),并显式指定为线程安全(thread-safe)[SWS_CRYPT_20757]。因此允许从多个执行上下文中并行调用,无需外部同步。

本使用说明基于 AUTOSAR Adaptive Release R25-11 的规范。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdidentifier of the target signature crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<VerifierPublicCtx::Sptr >Smart pointer to the created context

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if algId argument specifies a crypto algorithm different from public key signature verification
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId argument has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20757
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20757@rel:R25-11#7c6ac970
Content hash
7c6ac970
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20757
Status: valid/unmigrated Version: rel:R25-11#f204fd55 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20757@rel:R25-11#f204fd55
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8a5c49002026-09-30
  • R19-11rel:R19-11#37697b0f2026-10-14
  • R20-11rel:R20-11#73044a492026-10-14
  • R21-11rel:R21-11#0115fe5b2026-10-14
  • R22-11rel:R22-11#9dc931fa2026-10-14
  • R23-11rel:R23-11#a976f9ff2026-10-14
  • R24-11rel:R24-11#57fb002d2026-10-14
  • R25-11rel:R25-11#f204fd552026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CryptoProvider [SWS_CRYPT_41005] Upstream: RS_CRYPTO_02004

CryptoProvider (const CryptoProvider &)=delete;

Copy-Constructor.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_41005
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_41005@rel:R25-11#69785abd
Content hash
69785abd
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_41005
Status: valid/unmigrated Version: rel:R25-11#16a35c30 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_41005@rel:R25-11#16a35c30
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#baa0ea722026-09-30
  • R23-11rel:R23-11#aba1f1f92026-10-14
  • R24-11rel:R24-11#16a35c302026-10-14
  • R25-11rel:R25-11#16a35c302026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 CryptoProvider [SWS_CRYPT_41006] Upstream: RS_CRYPTO_02004

CryptoProvider (CryptoProvider &&)=delete;

Move-Constructor.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_41006
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_41006@rel:R25-11#903d179d
Content hash
903d179d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_41006
Status: valid/unmigrated Version: rel:R25-11#9567ac75 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_41006@rel:R25-11#9567ac75
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#b43174f52026-09-30
  • R23-11rel:R23-11#8f1246d92026-10-14
  • R24-11rel:R24-11#9567ac752026-10-14
  • R25-11rel:R25-11#9567ac752026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ExportSecuredKey [SWS_CRYPT_20728] Upstream: RS_CRYPTO_02105, RS_CRYPTO_02112

virtual ara::core::Result< std::size_t > ExportSecuredKey (AlgId alg Id, CryptoObject::Sptr key, ReadWriteMemRegion resultBuffer, ara::core::Optional< SymmetricKey::Sptr > kek) noexcept=0;

The interface shall format the data referenced by the specified key, securely wrap this payload and serialize the secured payload into the provided output buffer. The format shall be specified implicitly by the AlgId. The formatted payload shall be wrapped according to the specified algId using the kek; if kek is not provided, ExportSecuredKey shall apply a key-encryption-key implictly defined by the algId or the default key-encryption-key of the CryptoProvider.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 7d1aacdfd90a 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

接口 ara::crypto::cryp::CryptoProvider 的方法 ExportSecuredKey 将加密密钥对象导出为安全的序列化格式 [SWS_CRYPT_20728]。传入的密钥对象 key 根据由 algId 隐式确定的格式进行准备、加密包装(“wrapped”)并序列化到输出缓冲区 resultBuffer 中 [SWS_CRYPT_20728]。包装时可以选择传入密钥加密密钥(Key-Encryption-Key,kek);如果未提供 kek,则该方法将回退到由 algId 隐式确定的 KEK 或 CryptoProvider 的默认 KEK [SWS_CRYPT_20728]。

该函数被归类为 thread-safe 和 exception safe,并带有 noexcept 注解 [SWS_CRYPT_20728]。Interpretation:由于签名直接返回 ara::core::Result 而没有 Future 等异步返回类型,整个包装和序列化过程很可能在调用者上下文中同步执行。 问题 Q-3fb89afcc9300695 (未决)

成功完成时,返回的 ara::core::Result<std::size_t> 提供写入 resultBuffer 的字节数 [SWS_CRYPT_20728]。如果操作失败,将采用回滚语义并报告以下错误之一 [SWS_CRYPT_20728]:

  • UnknownIdentifier:不支持传入的 algId 值 [SWS_CRYPT_20728]。
  • ara::crypto::CryptoErrc::kInvalidArgument:无法包装密钥对象(例如大小无效或类型不匹配),或者未传入强制要求的 kek [SWS_CRYPT_20728]。
  • ara::crypto::CryptoErrc::kUsageViolation:key 或 kek 的允许用法与所选算法不兼容 [SWS_CRYPT_20728]。
  • ara::crypto::CryptoErrc::kIncompatibleArguments:传入的 kek 与导出算法不兼容 [SWS_CRYPT_20728]。
  • ara::crypto::CryptoErrc::kInsufficientCapacity:输出缓冲区 resultBuffer 太小,无法容纳结果 [SWS_CRYPT_20728]。
  • ara::crypto::CryptoErrc::kBusyResource:导出所需的资源被占用 [SWS_CRYPT_20728]。

本文本由 AI 生成,基于 AUTOSAR 规范版本 R25-11。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Parameter (in)

ParameterBeschreibung
algIdthe algId of the secure key export algorithm
keythe key to be exported
resultBufferan output buffer the securely exported key is written to
kekan optional key-encryption-key to be be used for wrapping the secured payload. Only used if the used algorithm does not determine the used key (e.g., based on configuration).

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the result written into resultBuffer or an error

Fehler

FehlercodeBeschreibung
UnknownIdentifierif algId has an unsupported value
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the key object cannot be wrapped (e.g., invalid size or type) or if a kek is expected but not provided.
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of key or kek is incompatible to the used algorithm
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if the kek is incompatible to the used algorithm

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20728
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20728@rel:R25-11#e80c4eb2
Content hash
e80c4eb2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20728
Status: valid/unmigrated Version: rel:R25-11#9dfe16b6 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20728@rel:R25-11#9dfe16b6
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#057427ea2026-09-30
  • R19-11rel:R19-11#cd9b1a7b2026-10-14
  • R20-11rel:R20-11#51350c8b2026-10-14
  • R21-11rel:R21-11#5ee1380e2026-10-14
  • R22-11rel:R22-11#72d859b12026-10-14
  • R23-11rel:R23-11#c0a14fe12026-10-14
  • R24-11rel:R24-11#661196972026-10-14
  • R25-11rel:R25-11#9dfe16b62026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 GeneratePrivateKey [SWS_CRYPT_20722] Upstream: RS_CRYPTO_02003, RS_CRYPTO_02101, RS_CRYPTO_02102, RS_ CRYPTO_02107, RS_CRYPTO_02108, RS_CRYPTO_02111, RS_CRYPTO_02115

virtual ara::core::Result< PrivateKey::Sptr > GeneratePrivateKey (Alg Id algId, AllowedUsageFlags privateKeyAllowedUsage) noexcept=0;

Generate a new public/private key pair and return the private key. The public key can be retrieved via the function PrivateKey::GetPublicKey() The allowed usage flags of the Public Key are set based on the allowed usage of the PrivateKey: • kAllowDataDecryption --> kAllowDataEncryption • kAllowSigGeneration --> kAllowSigVerification • kAllowKeyAgreement --> kAllowKeyAgreement • kAllowKeyUnwrapping --> kAllowKeyWrapping Additionally, the allowed usage: • kAllowPlaintextExport • kAllowPersist are set for the public key.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c90dae237830 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::crypto::cryp::CryptoProvider(在 ara/crypto/cryp/crypto_provider.h 中声明)的方法 GeneratePrivateKey 同步生成新的非对称密钥对,并将创建的私钥作为 ara::core::Result 内的 PrivateKey::Sptr 返回 [SWS_CRYPT_20722]。关联的公钥不会直接返回,而是随后可以通过所得密钥的方法 PrivateKey::GetPublicKey() 获取 [SWS_CRYPT_20722]。

调用时,参数 algId 指定加密算法,而 privateKeyAllowedUsage 确定私钥允许的转换类型 [SWS_CRYPT_20722]。此时,公钥允许的使用标志会根据私钥的权限映射如下 [SWS_CRYPT_20722]:

  • kAllowDataDecryption 导致 kAllowDataEncryption
  • kAllowSigGeneration 导致 kAllowSigVerification
  • kAllowKeyAgreement 导致 kAllowKeyAgreement
  • kAllowKeyUnwrapping 导致 kAllowKeyWrapping

此外,使用标志 kAllowPlaintextExport 以及 kAllowPersist 会自动分配给公钥 [SWS_CRYPT_20722]。

在并发性和执行方面,该函数被规范为线程安全(thread-safe)和异常安全(exception-safe)[SWS_CRYPT_20722]。如果在密钥生成期间发生错误,则结果将按回滚语义处理 [SWS_CRYPT_20722]。可返回以下错误代码:

  • ara::crypto::CryptoErrc::kUnknownIdentifier:如果为 algId 传递了不受支持的算法,
  • ara::crypto::CryptoErrc::kIncompatibleArguments:如果指定的 privateKeyAllowedUsage 标志与所选算法或密钥类型不兼容,
  • ara::crypto::CryptoErrc::kBusyResource:如果由于资源暂时被占用而导致生成暂时无法进行 [SWS_CRYPT_20722]。

本使用说明根据 AUTOSAR Adaptive R25-11 规范自动生成。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdthe identifier of the target crypto algorithm
privateKeyAllowedUsagethe flags that define a list of allowed transformations’ types in which the private key can be used

Rückgabewert

TypBeschreibung
ara::core::Result<PrivateKey::Sptr >result containing a shared pointer to the created private key or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId has an unsupported value
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if the allowedUsage is incompatible with the algId or the key type
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20722
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20722@rel:R25-11#d90717bf
Content hash
d90717bf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20722
Status: valid/unmigrated Version: rel:R25-11#92625666 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20722@rel:R25-11#92625666
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e76fe7892026-09-30
  • R19-11rel:R19-11#7f33da122026-10-14
  • R20-11rel:R20-11#e6ff089b2026-10-14
  • R21-11rel:R21-11#0cd706bd2026-10-14
  • R22-11rel:R22-11#33a2c8282026-10-14
  • R23-11rel:R23-11#2b3d45172026-10-14
  • R24-11rel:R24-11#b10084042026-10-14
  • R25-11rel:R25-11#926256662026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 GenerateRandomData [SWS_CRYPT_30098] Upstream: RS_CRYPTO_02206

virtual ara::core::Result< void > GenerateRandomData (ReadWriteMem Region randomData) noexcept=0;

Fill the provided output data buffer randomData with random data.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 405a308cad1e 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

接口 ara::crypto::cryp::CryptoProvider 的纯虚方法 GenerateRandomData 用于使用加密随机数据填充调用方提供的内存区域 [SWS_CRYPT_30098]。该声明位于头文件 ara/crypto/cryp/crypto_provider.h 中。

作为输出参数传递类型为 ReadWriteMem Region 的 randomData,它表示要填充的缓冲区,其大小决定了生成的随机字节数 [SWS_CRYPT_30098]。解释:由于该函数直接使用 ara::core::Result<void> 而非 Future 对象作为返回类型,因此数据的生成很可能是同步阻塞进行的 [SWS_CRYPT_30098]。 问题 Q-315c0492dcf7f37d (未决)返回值在成功时为空,或在出错时包含相应的错误代码 [SWS_CRYPT_30098]。

如果执行过程中出现问题,将应用回滚语义,从而不会残留部分或无效状态 [SWS_CRYPT_30098]。规范定义了以下错误状态:

  • ara::crypto::CryptoErrc::kBusyResource:底层随机数生成器(RNG)当前熵不足,无法提供所请求数量的随机字节 [SWS_CRYPT_30098]。
  • ara::crypto::CryptoErrc::kUnsupported:CryptoProvider 的具体实现不支持标准随机数生成器 [SWS_CRYPT_30098]。

关于并发性和鲁棒性,该方法被指定为 thread-safe 和 exception safe [SWS_CRYPT_30098]。因此,多个线程可以并行调用该函数,且 noexcept 规范保证不会跨接口边界抛出 C++ 异常。

本使用说明是基于 AUTOSAR 规范自动生成的。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (out)

ParameterBeschreibung
randomDataoutput data buffer to be filled with random data

Rückgabewert

TypBeschreibung
ara::core::Result< void >an empty result or a result containing an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the used RNG is currently out-of-entropy and therefore cannot provide the requested number of random bytes
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if no default RNG is supported by the CryptoProvider

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_30098
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_30098@rel:R25-11#a00e23ea
Content hash
a00e23ea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_30098
Status: valid/unmigrated Version: rel:R25-11#480ab415 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_30098@rel:R25-11#480ab415
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#79a025442026-09-30
  • R20-11rel:R20-11#c9d663072026-10-14
  • R21-11rel:R21-11#1481f16f2026-10-14
  • R22-11rel:R22-11#321f73ae2026-10-14
  • R23-11rel:R23-11#f518793a2026-10-14
  • R24-11rel:R24-11#c16096352026-10-14
  • R25-11rel:R25-11#480ab4152026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 GenerateSymmetricKey [SWS_CRYPT_20721] Upstream: RS_CRYPTO_02003, RS_CRYPTO_02101, RS_CRYPTO_02102, RS_ CRYPTO_02107, RS_CRYPTO_02108, RS_CRYPTO_02111, RS_CRYPTO_02115

virtual ara::core::Result< SymmetricKey::Sptr > GenerateSymmetricKey (AlgId algId, AllowedUsageFlags allowedUsage) noexcept=0;

Generate a new symmetric key.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 202931831493 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

纯虚方法 GenerateSymmetricKey 通过接口 ara::crypto::cryp::CryptoProvider 提供(头文件 #include "ara/crypto/cryp/crypto_provider.h"),用于生成新的对称密钥 [SWS_CRYPT_20721]。该同步调用需要将目标对称加密算法的标识符作为参数 algId,并将指定所生成密钥允许的转换类型的位标志作为 allowedUsage [SWS_CRYPT_20721]。成功执行后,该方法提供带有 SymmetricKey::Sptr(即指向新生成的对称密钥对象的共享指针)的 ara::core::Result [SWS_CRYPT_20721]。

错误处理

如果在密钥生成过程中发生错误,该错误将在 ara::core::Result 中传递。回滚语义对所有指定的错误情况生效 [SWS_CRYPT_20721]:

  • ara::crypto::CryptoErrc::kUnknownIdentifier:为 algId 传入了不受支持的值时报告 [SWS_CRYPT_20721]。
  • ara::crypto::CryptoErrc::kIncompatibleArguments:指定的 allowedUsage 标志与所选 algId 算法或密钥类型不兼容时发生 [SWS_CRYPT_20721]。
  • ara::crypto::CryptoErrc::kBusyResource:表示由于资源被临时占用,该操作暂时无法执行 [SWS_CRYPT_20721]。

并发性与限制

该操作声明为 noexcept,并具备异常安全(exception safe)以及线程安全(thread-safe)的特性 [SWS_CRYPT_20721]。因此,可以从多个线程并发调用它,但在高系统负载下可能会发生错误 kBusyResource 以指示临时瓶颈 [SWS_CRYPT_20721]。

本使用说明基于规范自动生成。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdthe identifier of the target symmetric crypto algorithm
allowedUsagethe flags that define a list of allowed transformations’ types in which the generated key can be used

Rückgabewert

TypBeschreibung
ara::core::Result<SymmetricKey::Sptr >result containing a shared pointer to the created symmetric key object or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId has an unsupported value
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if the allowedUsage is incompatible with the algId or the key type
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20721
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20721@rel:R25-11#f1f9812f
Content hash
f1f9812f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20721
Status: valid/unmigrated Version: rel:R25-11#921910dd Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20721@rel:R25-11#921910dd
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#635fbe3a2026-09-30
  • R19-11rel:R19-11#ceb7dd0e2026-10-14
  • R20-11rel:R20-11#06044bd12026-10-14
  • R21-11rel:R21-11#b4656e752026-10-14
  • R22-11rel:R22-11#a3fb37fc2026-10-14
  • R23-11rel:R23-11#9d93b9e42026-10-14
  • R24-11rel:R24-11#7d27c8e42026-10-14
  • R25-11rel:R25-11#921910dd2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 GetDefaultAllowedUsage [SWS_CRYPT_20955] Upstream: RS_CRYPTO_02003

virtual ara::core::Result< AllowedUsageFlags > GetDefaultAllowedUsage (AlgId algId) noexcept=0;

Get a CryptoProvider specific default set of allowedUsages for the provided AlgId. The returned allowedUsages shall not contain kAllowPlaintextExport, kAllowPersist and kAllowSecuredExport.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
algIdthe identifier of the target crypto algorithm

Rückgabewert

TypBeschreibung
ara::core::Result<AllowedUsageFlags >result containing a CryptoProvider specific default set of allowed Usages or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnknownIdentifierrollback_semantics if algId has an unsupported value

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20955
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20955@rel:R25-11#7f7d102a
Content hash
7f7d102a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20955
Status: valid/unmigrated Version: rel:R25-11#7ae6f7f9 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20955@rel:R25-11#7ae6f7f9
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 GetProviderID [SWS_CRYPT_50015] Upstream: RS_CRYPTO_02305

virtual ara::core::Result< void > GetProviderID (ara::core::Optional< ReadOnlyMemRegion > in, ReadWriteMemRegion idData) noexcept=0;

Obtain provider specific identification data.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
inOptional input data required by some identification protocols (e.g. SHE/CMD_GET_ID)

Parameter (out)

ParameterBeschreibung
idDatathe identification data of the provider

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this provider does not support identification
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the provided ReadWriteMemRegion parameter idData is insufficient in size to hold the identification data

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50015
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50015@rel:R25-11#160713b3
Content hash
160713b3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50015
Status: valid/unmigrated Version: rel:R25-11#a844d77c Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50015@rel:R25-11#a844d77c
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 GetProviderIdSize [SWS_CRYPT_50016] Upstream: RS_CRYPTO_02305

virtual ara::core::Result< std::size_t > GetProviderIdSize () noexcept=0;

Get the required size of the output buffer for ID data used by GetProviderID.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the required size of ID data in bytes or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this provider does not support identification

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50016
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50016@rel:R25-11#cd2d4f66
Content hash
cd2d4f66
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50016
Status: valid/unmigrated Version: rel:R25-11#7cd73107 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50016@rel:R25-11#7cd73107
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 GetSecureCounter [SWS_CRYPT_20098] Upstream: RS_CRYPTO_02401

ara::core::Result< SecureCounter > GetSecureCounter () noexcept;

Get the current value of the secure counter of this CryptoProvider. The current counter value is guaranteed to be stricly larger than any previously returned counter value.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: cd7a957c648f 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::crypto::cryp::CryptoProvider(在 #include "ara/crypto/cryp/crypto_provider.h" 中声明)的方法 GetSecureCounter() 查询该 Provider 实例的安全计数器的当前计数值 [SWS_CRYPT_20098]。该函数同步工作且不需要传入参数 [SWS_CRYPT_20098]。成功时,它通过 ara::core::Result<SecureCounter> 返回结构体 SecureCounter,该结构体由两个无符号 64 位值(用于最低有效四字(Least Significant Quad Word)的 LSQW 和用于最高有效四字(Most Significant Quad Word)的 MSQW)组成 [SWS_CRYPT_20098]。系统保证返回的每个计数值都严格大于先前通过该实例提供的所有值 [SWS_CRYPT_20098]。

如果无法确定计数值,则调用失败,并在 Result 对象中返回具有回滚语义的错误代码 [SWS_CRYPT_20098]:

  • ara::crypto::CryptoErrc::kUnsupported:特定的 CryptoProvider 不支持安全计数器 [SWS_CRYPT_20098]。
  • ara::crypto::CryptoErrc::kBusyResource:访问或更新计数器所需的资源当前被占用 [SWS_CRYPT_20098]。

在并发性和健壮性方面,该函数被指定为线程安全(thread-safe),并使用 noexcept 声明为异常安全(exception safe)[SWS_CRYPT_20098]。因此,允许多个线程并行调用而无需外部同步,同时仍能保证所提供计数器值的严格单调性 [SWS_CRYPT_20098]。

本文本由 AI 生成,仅供参考。唯一具有约束力的是官方规范。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<SecureCounter >a result containing a SecureCounter struct made up of the two unsigned 64 bit values (LSQW and MSQW), or an error:

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the Secure Counter is not supported by the CryptoProvider
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20098
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20098@rel:R25-11#9ad021b8
Content hash
9ad021b8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20098
Status: valid/unmigrated Version: rel:R25-11#0c57734d Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20098@rel:R25-11#0c57734d
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#62146ddd2026-09-30
  • R20-11rel:R20-11#31b7c30b2026-10-14
  • R21-11rel:R21-11#450747932026-10-14
  • R22-11rel:R22-11#1e50ce5f2026-10-14
  • R23-11rel:R23-11#76f9cfec2026-10-14
  • R24-11rel:R24-11#267205092026-10-14
  • R25-11rel:R25-11#0c57734d2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ImportPrivateKey [SWS_CRYPT_50132] Upstream: RS_CRYPTO_02105, RS_CRYPTO_02112

virtual ara::core::Result< PrivateKey::Sptr > ImportPrivateKey (Read OnlyMemRegion serialized, AllowedUsageFlags allowedUsage, FormatId formatId, ara::core::Optional< AlgId > algId) noexcept=0;

Import a serialized private key.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 56f03864743d 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

类 ara::crypto::cryp::CryptoProvider 的方法 ImportPrivateKey 用于同步导入序列化的私钥 [SWS_CRYPT_50132]。调用时,有效负载通过内存区域 serialized(ReadOnlyMemRegion)传递,并补充了所需的使用限制(allowedUsage)和序列化格式(formatId)。参数 algId 是可选的(ara::core::Optional<AlgId>),仅在所选格式本身尚未唯一定义所需密钥属性时才必须设置 [SWS_CRYPT_50132]。作为返回值,该函数提供一个 ara::core::Result<PrivateKey::Sptr>,其在成功情况下包含指向所生成密钥对象的共享指针(Shared Pointer)。

错误处理

在错误情况下,该方法确保回滚语义生效 [SWS_CRYPT_50132]。可以通过 Result 返回以下错误代码:

  • InvalidArgument:serialized 中的序列化数据不符合指定格式 [SWS_CRYPT_50132]。
  • ara::crypto::CryptoErrc::kIncompatibleArguments:传入的 allowedUsage 与 algId 不兼容 [SWS_CRYPT_50132]。
  • ara::crypto::CryptoErrc::kUnsupported:具体 Provider 不支持该功能 [SWS_CRYPT_50132]。
  • ara::crypto::CryptoErrc::kBusyResource:由于资源被占用,操作暂时无法执行 [SWS_CRYPT_50132]。
  • ara::crypto::CryptoErrc::kUnsupportedFormat:该对象类型不支持 formatId [SWS_CRYPT_50132]。

并发性与限制

该接口声明为 noexcept,并提供异常安全性(exception safe)与线程安全性(thread-safe)[SWS_CRYPT_50132]。因此,调用可以从不同线程并行进行。

本文由 AI 系统基于 AUTOSAR 规范生成。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Parameter (in)

ParameterBeschreibung
serializedthe memory region that contains the serialized key
allowedUsagethe allowedUsage of the key
formatIdthe serialization format
algIdan optional alg ID of the key. Not required if the serialization format already identifies the required properties of the key.

Rückgabewert

TypBeschreibung
ara::core::Result<PrivateKey::Sptr >result containing a shared pointer to the created key or an error

Fehler

FehlercodeBeschreibung
InvalidArgumentif serialized does not conform to the specified format
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if the allowedUsage is incompatible with the algId
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the CryptoProvider does not support the requested function
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed
ara::crypto::CryptoErrc::kUnsupportedFormatrollback_semantics if the specified format ID is not supported for this object type

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50132
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50132@rel:R25-11#42f5d883
Content hash
42f5d883
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50132
Status: valid/unmigrated Version: rel:R25-11#014ff708 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50132@rel:R25-11#014ff708
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ImportPublicKey [SWS_CRYPT_20732] Upstream: RS_CRYPTO_02105, RS_CRYPTO_02112

virtual ara::core::Result< PublicKey::Sptr > ImportPublicKey (ReadOnly MemRegion serialized, AllowedUsageFlags allowedUsage, FormatId format Id, ara::core::Optional< AlgId > algId) noexcept=0;

Import a serialized public key.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 2c89087292cc 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

方法 ImportPublicKey 用于将序列化的公钥导入相应的 ara::crypto::cryp::CryptoProvider 中 [SWS_CRYPT_20732]。该调用同步进行并返回一个 ara::core::Result<PublicKey::Sptr>,成功时该对象包含指向所创建密钥对象的智能指针 [SWS_CRYPT_20732]。

调用时会传递以下参数[SWS_CRYPT_20732]:

  • serialized:提供序列化密钥原始数据的 ReadOnlyMemRegion 内存区域。
  • allowedUsage:导入密钥的允许使用标志(AllowedUsageFlags)。
  • formatId:序列化格式的标识符(FormatId)。
  • algId:可选的算法 ID(ara::core::Optional<AlgId>)。如果序列化格式已经唯一定义了密钥的属性,则不需要该参数。

错误处理

如果在处理过程中发生错误,该错误将封装在返回的 ara::core::Result 中。规范定义了以下错误代码 [SWS_CRYPT_20732]:

  • InvalidArgument:serialized 中传入的数据不符合指定的格式。
  • ara::crypto::CryptoErrc::kIncompatibleArguments:使用标志 allowedUsage 与 algId 不兼容。
  • ara::crypto::CryptoErrc::kUnsupportedFormat:该对象类型不支持指定的 formatId。
  • ara::crypto::CryptoErrc::kUnsupported:CryptoProvider 不支持请求的功能。
  • ara::crypto::CryptoErrc::kBusyResource:该操作暂时无法执行。

并发性与安全性

该方法被声明为 noexcept,视为 Exception-safe,且根据规范指定为 Thread-safe [SWS_CRYPT_20732]。错误情况遵循定义的回滚语义 [SWS_CRYPT_20732]。

本文本由 AI 系统生成,完全基于来自版本 R25-11 的规范数据。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Parameter (in)

ParameterBeschreibung
serializedthe memory region that contains the serialized key
allowedUsagethe allowedUsage of the key
formatIdthe serialization format
algIdan optional alg ID of the key. Not required if the serialization format already identifies the required properties of the key.

Rückgabewert

TypBeschreibung
ara::core::Result< PublicKey::Sptr >result containing a shared pointer to the created key or an error

Fehler

FehlercodeBeschreibung
InvalidArgumentif serialized does not conform to the specified format
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if the allowedUsage is incompatible with the algId
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the CryptoProvider does not support the requested function
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed
ara::crypto::CryptoErrc::kUnsupportedFormatrollback_semantics if the specified format ID is not supported for this object type

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20732
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20732@rel:R25-11#15028a0e
Content hash
15028a0e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20732
Status: valid/unmigrated Version: rel:R25-11#51a436c4 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20732@rel:R25-11#51a436c4
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2473d8742026-09-30
  • R19-11rel:R19-11#1450fe912026-10-14
  • R20-11rel:R20-11#9c83b88d2026-10-14
  • R21-11rel:R21-11#56c01f3b2026-10-14
  • R22-11rel:R22-11#2ec0aa1f2026-10-14
  • R23-11rel:R23-11#56bf56252026-10-14
  • R24-11rel:R24-11#ada4cfb92026-10-14
  • R25-11rel:R25-11#51a436c42026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ImportSymmetricKey [SWS_CRYPT_50014] Upstream: RS_CRYPTO_02105, RS_CRYPTO_02112

virtual ara::core::Result< SymmetricKey::Sptr > ImportSymmetricKey (ReadOnlyMemRegion serialized, AllowedUsageFlags allowedUsage, Format Id formatId, ara::core::Optional< AlgId > algId) noexcept=0;

Import a serialized symmetric key.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 46a4ead0d7ca 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的方法 ImportSymmetricKey 用于导入序列化的对称密钥 [SWS_CRYPT_50014]。作为返回值,它提供一个 ara::core::Result<SymmetricKey::Sptr>,在成功时提供指向新实例化密钥对象的智能指针 [SWS_CRYPT_50014]。由于没有使用诸如 Future 之类的异步返回类型,因此执行很可能是同步进行的。 问题 Q-720a495b07c4f31d (未决)

调用时需传递以下参数 [SWS_CRYPT_50014]:

  • serialized(ReadOnlyMemRegion):包含序列化密钥数据的内存区域。
  • allowedUsage(AllowedUsageFlags):该密钥允许的操作和用法的位掩码。
  • formatId (FormatId):密钥数据序列化格式的标识符。
  • algId (ara::core::Optional<AlgId>):可选的算法标识符;如果指定的序列化格式已唯一确定了密钥的所有必需属性,则不需要该标识符。

错误处理与边界条件

该方法被指定为 thread-safe 和 exception safe [SWS_CRYPT_50014]。在发生错误时,实现确保回滚语义,并在 ara::core::Result 中返回相应的错误代码 [SWS_CRYPT_50014]:

  • InvalidArgument:serialized 中传入的二进制数据不符合指定的格式。
  • ara::crypto::CryptoErrc::kIncompatibleArguments:设定的 allowedUsage 标志与指定的 algId 不兼容。
  • ara::crypto::CryptoErrc::kUnsupported:CryptoProvider 的具体实例不支持该函数。
  • ara::crypto::CryptoErrc::kUnsupportedFormat:此密钥类型不支持指定的格式。
  • ara::crypto::CryptoErrc::kBusyResource:由于资源当前被临时占用,操作无法执行。

本使用说明系基于 AUTOSAR R25-11 规范自动创建。

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Parameter (in)

ParameterBeschreibung
serializedthe memory region that contains the serialized key
allowedUsagethe allowedUsage of the key
formatIdthe serialization format
algIdan optional alg ID of the key. Not required if the serialization format already identifies the required properties of the key.

Rückgabewert

TypBeschreibung
ara::core::Result<SymmetricKey::Sptr >result containing a shared pointer to the created key or an error

Fehler

FehlercodeBeschreibung
InvalidArgumentif serialized does not conform to the specified format
ara::crypto::CryptoErrc::kIncompatibleArgumentsrollback_semantics if the allowedUsage is incompatible with the algId
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the CryptoProvider does not support the requested function
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed
ara::crypto::CryptoErrc::kUnsupportedFormatrollback_semantics if the specified format ID is not supported for this object type

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50014
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50014@rel:R25-11#5cfb7550
Content hash
5cfb7550
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50014
Status: valid/unmigrated Version: rel:R25-11#b43f0614 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_50014@rel:R25-11#b43f0614
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 LoadPrivateKey [SWS_CRYPT_20764] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02002

virtual ara::core::Result< PrivateKey::Sptr > LoadPrivateKey (Key Slot::Sptr keySlot) noexcept=0;

Load a private key from the provided KeySlot.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 933cf21dc7b3 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的方法 LoadPrivateKey 从提供的密钥槽([SWS_CRYPT_20764])加载私钥。该调用同步执行,并接收指向源资源的共享指针(keySlot)作为参数。成功时,该函数提供指向已加载密钥对象(PrivateKey::Sptr)的共享指针,并在 ara::core::Result 内返回([SWS_CRYPT_20764])。

错误处理

如果操作期间发生错误,回滚语义生效,并且 ara::core::Result 包含特定的错误码([SWS_CRYPT_20764]):

  • ara::crypto::CryptoErrc::kEmptyKeySlot:传入的密钥槽为空([SWS_CRYPT_20764])。
  • ara::crypto::CryptoErrc::kIncompatibleObject:底层资源属于另一个不兼容的 CryptoProvider,或包含不同的密钥类型([SWS_CRYPT_20764])。
  • ara::crypto::CryptoErrc::kBusyResource:该操作暂时无法执行([SWS_CRYPT_20764])。

并发性与安全性

规范将该函数归类为线程安全和异常安全;签名声明为 noexcept([SWS_CRYPT_20764])。多个线程可以并行调用该方法,但遇到临时资源冲突时必须处理可能的返回值 kBusyResource。

本使用说明基于规范自动生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
keySlotthe KeySlot that contains the key for loading

Rückgabewert

TypBeschreibung
ara::core::Result<PrivateKey::Sptr >result containing a shared pointer to the loaded key or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if the KeySlot is empty
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the underlying resource belongs to another, incompatible Crypto Provider or contains a different key type
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20764
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20764@rel:R25-11#4a7a634f
Content hash
4a7a634f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20764
Status: valid/unmigrated Version: rel:R25-11#619ff9c3 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20764@rel:R25-11#619ff9c3
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#562267092026-09-30
  • R20-11rel:R20-11#cf85edd52026-10-14
  • R21-11rel:R21-11#7866d75f2026-10-14
  • R22-11rel:R22-11#7ef331982026-10-14
  • R23-11rel:R23-11#9721217a2026-10-14
  • R24-11rel:R24-11#00f5f0232026-10-14
  • R25-11rel:R25-11#619ff9c32026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 LoadPublicKey [SWS_CRYPT_20763] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02002

virtual ara::core::Result< PublicKey::Sptr > LoadPublicKey (Key Slot::Sptr keySlot) noexcept=0;

Load a public key from the provided KeySlot.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: bd65058963fb 来源 未决问题(1)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

使用

接口 ara::crypto::cryp::CryptoProvider 的方法 LoadPublicKey 从提供的密钥存储槽位加载公钥 [SWS_CRYPT_20763]。它期望 KeySlot::Sptr 作为参数 keySlot,该参数引用包含待加载密钥的存储槽位 [SWS_CRYPT_20763]。作为返回值,该函数提供一个 ara::core::Result<PublicKey::Sptr>,成功时包含指向已加载公钥对象的共享指针 [SWS_CRYPT_20763]。直接提供 Result 值可能表明采用了同步调用行为。 问题 Q-e0d2480909b1398a (未决)

错误处理

如果加载过程失败,ara::core::Result 将包含域 ara::crypto::CryptoErrc 的相应错误码,其中针对所有指定的错误情况均定义了回滚语义 [SWS_CRYPT_20763]:

  • ara::crypto::CryptoErrc::kEmptyKeySlot:在传入的 KeySlot 为空时发生 [SWS_CRYPT_20763]。
  • ara::crypto::CryptoErrc::kIncompatibleObject:在底层资源属于另一个不兼容的 CryptoProvider 或包含不同密钥类型时返回 [SWS_CRYPT_20763]。
  • ara::crypto::CryptoErrc::kBusyResource:在由于资源被其他操作占用而导致操作暂时无法执行时发生 [SWS_CRYPT_20763]。

并发性与安全性

该方法声明为 noexcept 并指定为异常安全(Exception-safe)[SWS_CRYPT_20763]。在并发性方面,该操作明确归类为线程安全(Thread-safe),从而允许来自多个线程的并发调用 [SWS_CRYPT_20763]。

本使用说明由 AI 基于规范生成。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
keySlotthe KeySlot that contains the key for loading

Rückgabewert

TypBeschreibung
ara::core::Result< PublicKey::Sptr >result containing a shared pointer to the loaded key or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if the KeySlot is empty
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the underlying resource belongs to another, incompatible Crypto Provider or contains a different key type
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20763
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20763@rel:R25-11#34e18598
Content hash
34e18598
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20763
Status: valid/unmigrated Version: rel:R25-11#94997baf Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20763@rel:R25-11#94997baf
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#3b024d4b2026-09-30
  • R20-11rel:R20-11#5ef8747d2026-10-14
  • R21-11rel:R21-11#cecedb902026-10-14
  • R22-11rel:R22-11#3bab55812026-10-14
  • R23-11rel:R23-11#406c01632026-10-14
  • R24-11rel:R24-11#fc5230262026-10-14
  • R25-11rel:R25-11#94997baf2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 LoadSymmetricKey [SWS_CRYPT_20762] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02002

virtual ara::core::Result< SymmetricKey::Sptr > LoadSymmetricKey (Key Slot::Sptr keySlot) noexcept=0;

Load a symmetric key from the provided KeySlot.

AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: fa5c0e3150ce 来源
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

类 ara::crypto::cryp::CryptoProvider 的纯虚方法 LoadSymmetricKey 用于从提供的密钥存储槽位加载对称密钥 [SWS_CRYPT_20762]。该函数接收指向相关存储槽位的共享指针(keySlot)作为参数,并同步返回一个 ara::core::Result<SymmetricKey::Sptr>,成功执行时它提供指向已加载密钥对象的共享指针 [SWS_CRYPT_20762]。

在并发性和执行安全性方面,该方法被指定为 thread-safe 以及 exception safe,并声明为 noexcept [SWS_CRYPT_20762]。

如果在加载时发生错误,该方法会通过 Result 对象返回域 ara::crypto::CryptoErrc 中具有已定义回滚语义的特定错误码 [SWS_CRYPT_20762]:

  • ara::crypto::CryptoErrc::kEmptyKeySlot:在传入的 KeySlot 为空时发生 [SWS_CRYPT_20762]。
  • ara::crypto::CryptoErrc::kIncompatibleObject:在底层资源属于另一个不兼容的 CryptoProvider 或包含其他密钥类型时返回 [SWS_CRYPT_20762]。
  • ara::crypto::CryptoErrc::kBusyResource:表示该操作暂时无法执行 [SWS_CRYPT_20762]。

此文本由 AI 系统生成,仅基于规范。

实现者指南即将推出(复杂度 I1)

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
keySlotthe KeySlot that contains the key for loading

Rückgabewert

TypBeschreibung
ara::core::Result<SymmetricKey::Sptr >result containing a shared pointer to the loaded key or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if the KeySlot is empty
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the underlying resource belongs to another, incompatible Crypto Provider or contains a different key type
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the operation temporarily cannot be performed

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20762
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20762@rel:R25-11#db4abd82
Content hash
db4abd82
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20762
Status: valid/unmigrated Version: rel:R25-11#f47254ea Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20762@rel:R25-11#f47254ea
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#0e0c91c92026-09-30
  • R20-11rel:R20-11#a2b2b6ca2026-10-14
  • R21-11rel:R21-11#71269d212026-10-14
  • R22-11rel:R22-11#af928a362026-10-14
  • R23-11rel:R23-11#aa4c06512026-10-14
  • R24-11rel:R24-11#d7011cdb2026-10-14
  • R25-11rel:R25-11#f47254ea2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator= [SWS_CRYPT_30216] Upstream: RS_CRYPTO_02004

CryptoProvider & operator= (const CryptoProvider &other)=delete;

Copy-assign another CryptoProvider to this instance.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_30216
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_30216@rel:R25-11#b14d4725
Content hash
b14d4725
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_30216
Status: valid/unmigrated Version: rel:R25-11#96e40041 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_30216@rel:R25-11#96e40041
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d4dd587d2026-09-30
  • R20-11rel:R20-11#8f862b702026-10-14
  • R21-11rel:R21-11#8f862b702026-10-14
  • R22-11rel:R22-11#1f0154312026-10-14
  • R23-11rel:R23-11#b6c645d62026-10-14
  • R24-11rel:R24-11#96e400412026-10-14
  • R25-11rel:R25-11#96e400412026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator= [SWS_CRYPT_30217] Upstream: RS_CRYPTO_02004

CryptoProvider & operator= (CryptoProvider &&other)=delete;

Move-assign another CryptoProvider to this instance.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_30217
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_30217@rel:R25-11#ac0c313b
Content hash
ac0c313b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_30217
Status: valid/unmigrated Version: rel:R25-11#fcc3d64e Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_30217@rel:R25-11#fcc3d64e
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#875b931c2026-09-30
  • R20-11rel:R20-11#ad3659582026-10-14
  • R21-11rel:R21-11#c29463602026-10-14
  • R22-11rel:R22-11#1048bb462026-10-14
  • R23-11rel:R23-11#4eff1ccf2026-10-14
  • R24-11rel:R24-11#53bda24c2026-10-14
  • R25-11rel:R25-11#fcc3d64e2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 ~CryptoProvider [SWS_CRYPT_20710] Upstream: RS_CRYPTO_02107

virtual ~CryptoProvider () noexcept=default;

Destructor.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
Exception-Sicherheitexception safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20710
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20710@rel:R25-11#31f1a3f6
Content hash
31f1a3f6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20710
Status: valid/unmigrated Version: rel:R25-11#8dc356f1 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20710@rel:R25-11#8dc356f1
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#92a5ae4c2026-09-30
  • R19-11rel:R19-11#262154f72026-10-14
  • R20-11rel:R20-11#01fe77212026-10-14
  • R21-11rel:R21-11#01fe77212026-10-14
  • R22-11rel:R22-11#416497032026-10-14
  • R23-11rel:R23-11#9976743f2026-10-14
  • R24-11rel:R24-11#9c7dc3252026-10-14
  • R25-11rel:R25-11#8dc356f12026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

类型别名文档

类型别名 Sptr [SWS_CRYPT_20701] Upstream: RS_CRYPTO_02109

using Sptr = std::shared_ptr<CryptoProvider>;

Shared pointer of the CryptoProvider.

Header-Datei#include "ara/crypto/cryp/crypto_provider.h"
Scopeclass ara::crypto::cryp::CryptoProvider
SymbolSptr

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_20701
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20701@rel:R25-11#11dca0de
Content hash
11dca0de
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20701
Status: valid/unmigrated Version: rel:R25-11#b2ab3ec9 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CRYPT_20701@rel:R25-11#b2ab3ec9
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#374f02562026-09-30
  • R19-11rel:R19-11#c100f8d02026-10-14
  • R20-11rel:R20-11#60b520932026-10-14
  • R21-11rel:R21-11#60b520932026-10-14
  • R22-11rel:R22-11#6cce43132026-10-14
  • R23-11rel:R23-11#35053b082026-10-14
  • R24-11rel:R24-11#90ffb1202026-10-14
  • R25-11rel:R25-11#b2ab3ec92026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill