类 ara::crypto::cryp::SymmetricKeyWrapperCtx
[SWS_CRYPT_24000] Upstream: RS_CRYPTO_02104 , RS_CRYPTO_02208
class SymmetricKeyWrapperCtx : public CryptoContext {...};
Context of a symmetric key wrap algorithm.
Header-Datei #include "ara/crypto/cryp/symmetric_key_wrapper_ctx.h" Forwarding-Header #include "ara/crypto/crypto_fwd.h" Scope namespace ara::crypto::cryp Basisklasse(n) CryptoContext
用户指南人工智能生成 支持通过对称密钥加密安全打包和解包密钥。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 16126e8d9692
来源
未决问题(1)
摘要 详细
支持通过对称密钥加密安全打包和解包密钥。
上下文 SymmetricKeyWrapperCtx 用于通过对称算法对密钥进行密码学打包和解包。在执行 Wrap 或 UnwrapSymmetricKey 之前,必须通过 SetKey 使用兼容的密钥加密密钥(KEK)配置上下文 [SWS_CRYPT_24018] 。所有操作均以相关密钥对象的相应使用权限为前提条件,并通过 ara::core::Result 报告具有回滚语义的错误 [SWS_CRYPT_24014] 。该接口具有异常安全性,并且针对并发运行被指定为线程安全。
更多 ›
本指南由 AI 创建,仅基于 AUTOSAR 规范。
分组依据 类别 历史
成员图 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
nara__crypto__cryp__SymmetricKeyWrapperCtx465
SymmetricKeyWrapperCtx
+ GetRequiredWrappedKeyBufferSize()
+ SetKey()
+ UnwrapSymmetricKey()
+ Wrap()
nara__crypto__cryp__CryptoContext85
CryptoContext
nara__crypto__cryp__SymmetricKeyWrapperCtx465->nara__crypto__cryp__CryptoContext85
详细视图 此版本没有元素数据
方法 Calculate the maximum required size of the wrapped key output buffer depending on the key to be wrapped.
Configure the context to use the provided key as key encryption key.
重载 SetKey 2 Unwrap a wrapped key using the previously set key encryption key and return an SymmetricKey.
Wrap the provided key using the previously set key encryption key.
类型别名 Smart pointer of the interface.
点击条目以查看其关系。
基类 派生类 使用 被使用于 继承 自此版本起移除 用于 此类中无关联 函数 AI 评注 打开类页面 无法加载类页面。 调整顺序 调整宽度 调整大纲宽度 章节 阅读时间 SWS 引用 图表 放回中间 调整顺序或拖到标题栏 取消停靠 – 在内容中显示 移到中间栏 作为标签停靠到标题栏 元素 AI 模型 打开审计档案 档案 打开简短版本 打开中等版本 打开完整版本 恢复默认视图 已恢复默认视图 撤销 关闭详细视图 签名 基本信息 值 截至所选版本的最后一次更改 之后的下一次更改 单击:选择版本 无法放在此处:拖到标题栏可停靠,拖到中间栏可取消停靠。 新增 已更改 未更改 已移除 未包含 更改 内容无变化 首次出现于 移除于 没有可用的版本数据。 正在加载版本数据 … 文本 此版本未收录措辞 悬停或单击单元格:与所选版本比较 · 单击版本标题:选择版本 选择版本 属性 版本 元素 只有一个版本有措辞 PDF 中存在,原文尚未导入 首次采集原文 自 {rel} 起未更改 版本颜色 最早版本 最新版本
方法文档
virtual ara::core::Result < std::size_t > GetRequiredWrappedKeyBuffer Size (const CryptoObject &key) const noexcept;
Calculate the maximum required size of the wrapped key output buffer depending on the key to be wrapped.
Parameter (in)
Parameter Beschreibung key key to be wrapped
Rückgabewert
Typ Beschreibung ara::core::Result <std::size_t >a result containing the required capacity of the output buffer in bytes or an error
Fehler
Status: valid/unmigrated
Version: rel:R25-11#79bcf3cd
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_50035@rel:R25-11#79bcf3cd
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R19-11
View Snapshot
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
virtual ara::core::Result < void > SetKey (SymmetricKey ::Sptr key) noexcept=0;
Configure the context to use the provided key as key encryption key.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: d0a83598653d
来源
用法与语义
同步成员函数 SetKey 对 ara::crypto::cryp::SymmetricKeyWrapperCtx 的实例进行配置,以便将传递的对象 SymmetricKey::Sptr 用作后续密钥操作的密钥加密密钥(KEK)[SWS_CRYPT_24018] 。该函数被指定为带有 noexcept 的纯虚方法,并且只要分配成功,就返回一个空的 ara::core::Result<void> [SWS_CRYPT_24018] 。
错误处理与回滚
若在配置时发生错误,则采用具约束力的回滚语义,从而使上下文状态保持不变 [SWS_CRYPT_24018] 。可能的错误原因通过来自 ara::crypto::CryptoErrc 的错误代码映射:
并发性与交互
该方法被指定为 thread-safe 且异常安全(exception safe)[SWS_CRYPT_24018] 。若密钥通过槽位进行管理,或上下文仅支持 KeySlot,则对于同一个包装器上下文,存在带有 KeySlot::Sptr 的备选重载 SetKey [SWS_CRYPT_50034] 。这会将上下文配置为在密钥包装的执行时间点加载存储在插槽中的密钥 [SWS_CRYPT_50034] 。
本使用说明基于 AUTOSAR Adaptive Platform 规范版本 R25-11。
实现者指南即将推出(复杂度 I2)
Parameter (in)
Parameter Beschreibung key the the key encryption key (KEK) object
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#5ba8abd5
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_24018@rel:R25-11#5ba8abd5
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R21-11 R22-11 R23-11 R24-11 R19-11
View Snapshot
Recorded Revisions (7):
R25-11 rel:R25-11#07e640252026-09-30 Inspect R20-11 rel:R20-11#dc67c1dc2026-10-14 Inspect R21-11 rel:R21-11#34c85a1a2026-10-14 Inspect R22-11 rel:R22-11#4ead34ac2026-10-14 Inspect R23-11 rel:R23-11#9ca31f482026-10-14 Inspect R24-11 rel:R24-11#bb17e6102026-10-14 Inspect R25-11 rel:R25-11#5ba8abd52026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
virtual ara::core::Result < void > SetKey (KeySlot ::Sptr keySlot) noexcept=0;
Configure the context to use the key stored in the provided KeySlot at the time the key wrapping is performed.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 30d79040bb46
来源
本使用说明基于 AUTOSAR Adaptive R25-11 规范自动生成。
实现者指南即将推出(复杂度 I2)
Parameter (in)
Parameter Beschreibung keySlot a keyslot containing a symmetric key
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#c06f6729
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_50034@rel:R25-11#c06f6729
Point-in-Time History:
Release:
R25-11 (Current / Active) R20-11 R19-11
View Snapshot
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
virtual ara::core::Result < SymmetricKey ::Sptr > UnwrapSymmetricKey (ReadOnlyMemRegion wrappedKey, AlgId targetAlgId, AllowedUsageFlags allowedUsage) const noexcept=0;
Unwrap a wrapped key using the previously set key encryption key and return an SymmetricKey.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: fe87df5f5eae
来源
接口 ara::crypto::cryp::SymmetricKeyWrapperCtx 的方法 UnwrapSymmetricKey 使用先前设置的密钥加密密钥(KEK)解密已包装的密钥,并返回一个新的 SymmetricKey 对象 [SWS_CRYPT_24016] 。作为参数,该同步函数接收包含受保护密钥数据的输入缓冲区(wrappedKey)、目标密钥的算法标识符(targetAlgId)以及用于其允许转换类型的位标志(allowedUsage)[SWS_CRYPT_24016] 。
返回值 ara::core::Result<SymmetricKey::Sptr> 在成功执行时包含指向所生成密钥的智能指针,或通过回滚语义指示错误 [SWS_CRYPT_24016] 。可能的错误原因包括:
InvalidArgument:无法解包 wrappedKey 中传递的密钥数据,例如由于格式无效或缓冲区大小不正确 [SWS_CRYPT_24016] 。
ara::crypto::CryptoErrc::kUninitializedContext:包装器上下文尚未用合适的 KEK 进行初始化 [SWS_CRYPT_24016] 。
ara::crypto::CryptoErrc::kUsageViolation:KEK 的使用限制禁止解包(缺少 kAllowKeyUnwrapping)[SWS_CRYPT_24016] 。
ara::crypto::CryptoErrc::kUnknownIdentifier:为 targetAlgId 传递的值未知或不受支持 [SWS_CRYPT_24016] 。
ara::crypto::CryptoErrc::kIncompatibleArguments:指定的 allowedUsage 标志与 targetAlgId 或密钥类型不兼容 [SWS_CRYPT_24016] 。
ara::crypto::CryptoErrc::kBusyResource:操作所需的系统资源当前被占用 [SWS_CRYPT_24016] 。
ara::crypto::CryptoErrc::kEmptyKeySlot:为该操作配置的 KeySlot 为空 [SWS_CRYPT_24016] 。
该方法声明为 const 以及 noexcept,保证异常安全性,并且根据规范在并发调用时是线程安全的(thread-safe)[SWS_CRYPT_24016] 。
本文由 AI 生成,仅供参考。一切以规范为准。
Parameter (in)
Parameter Beschreibung wrappedKey an input buffer that contains the wrapped key targetAlgId the algId of the to be created unwrapped key allowedUsage bit-flags that define a list of allowed transformations’ types in which the unwrapped key can be used
Rückgabewert
Typ Beschreibung ara::core::Result <SymmetricKey::Sptr >a result containing the unwrapped SymmetricKey object or an error
Fehler
Status: valid/unmigrated
Version: rel:R25-11#7d151daa
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_24016@rel:R25-11#7d151daa
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#74bd38af2026-09-30 Inspect R19-11 rel:R19-11#8ec5b1a02026-10-14 Inspect R20-11 rel:R20-11#496f81ad2026-10-14 Inspect R21-11 rel:R21-11#354b26632026-10-14 Inspect R22-11 rel:R22-11#767017ac2026-10-14 Inspect R23-11 rel:R23-11#624822262026-10-14 Inspect R24-11 rel:R24-11#9c4b80db2026-10-14 Inspect R25-11 rel:R25-11#7d151daa2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
virtual ara::core::Result < std::size_t > Wrap (CryptoObject ::Sptr key, ReadWriteMemRegion wrappedKey) const noexcept=0;
Wrap the provided key using the previously set key encryption key.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 8e6ff8198c9d
来源
使用
类 ara::crypto::cryp::SymmetricKeyWrapperCtx 的方法 Wrap(头文件 ara/crypto/cryp/symmetric_key_wrapper_ctx.h)使用预先设置的密钥加密密钥(Key Encryption Key)封装提供的密钥 [SWS_CRYPT_24014] 。
该同步函数需要以下参数 [SWS_CRYPT_24014] :
key(CryptoObject::Sptr):待封装的密钥。
wrappedKey(ReadWriteMemRegion):用于写入封装密钥的输出缓冲区。
作为返回值,该操作提供一个 ara::core::Result<std::size_t>,成功时包含写入缓冲区的封装密钥的字节数 [SWS_CRYPT_24014] 。
错误处理与语义
该方法定义为 exception safe,并针对错误情况实现了严格的回滚语义 [SWS_CRYPT_24014] 。可能会报告以下错误状态 [SWS_CRYPT_24014] :
InvalidArgument:无法封装密钥对象(例如由于大小无效或类型错误)。
ara::crypto::CryptoErrc::kUninitializedContext:上下文尚未用密钥值进行初始化。
ara::crypto::CryptoErrc::kUsageViolation:KEK 的允许用法不包含 kAllowKeyWrapping,或对象的允许用法不包含 kAllowSecuredExport。
ara::crypto::CryptoErrc::kInsufficientCapacity:输出缓冲区 wrappedKey 过小。
ara::crypto::CryptoErrc::kBusyResource:所需资源被占用。
ara::crypto::CryptoErrc::kEmptyKeySlot:配置的 KeySlot 当前为空。
并发性与限制
该接口被指定为 thread-safe [SWS_CRYPT_24014] 。执行的前提条件是预先初始化的上下文以及所涉及密钥的匹配使用属性 [SWS_CRYPT_24014] 。
本使用说明基于 AUTOSAR Adaptive R25-11 规范自动生成。
Parameter (in)
Parameter Beschreibung key the key to be wrapped
Parameter (out)
Parameter Beschreibung wrappedKey an output buffer that the wrapped key will be written to
Rückgabewert
Typ Beschreibung ara::core::Result <std::size_t >a result containing either a the number of bytes of the wrapped key or an error
Fehler
Status: valid/unmigrated
Version: rel:R25-11#d59df6cf
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_24014@rel:R25-11#d59df6cf
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#ac935a362026-09-30 Inspect R19-11 rel:R19-11#b94a246e2026-10-14 Inspect R20-11 rel:R20-11#999104362026-10-14 Inspect R21-11 rel:R21-11#d51795ed2026-10-14 Inspect R22-11 rel:R22-11#f7dabf992026-10-14 Inspect R23-11 rel:R23-11#5c3c2d942026-10-14 Inspect R24-11 rel:R24-11#90cde3442026-10-14 Inspect R25-11 rel:R25-11#d59df6cf2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
类型别名文档
using Sptr = std::shared_ptr <SymmetricKeyWrapperCtx >;
Smart pointer of the interface.
Status: valid/unmigrated
Version: rel:R25-11#aef6197c
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_24001@rel:R25-11#aef6197c
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#10e154c52026-09-30 Inspect R19-11 rel:R19-11#521f46bb2026-10-14 Inspect R20-11 rel:R20-11#0ab69c592026-10-14 Inspect R21-11 rel:R21-11#8d463cfa2026-10-14 Inspect R22-11 rel:R22-11#7a7fa6972026-10-14 Inspect R23-11 rel:R23-11#4b170d372026-10-14 Inspect R24-11 rel:R24-11#4b170d372026-10-14 Inspect R25-11 rel:R25-11#aef6197c2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
gemini-3.8-flash-low· 2026-10-13 · 德文原文