类 ara::crypto::cryp::KeyDerivationFunctionCtx
[SWS_CRYPT_21500] Upstream: RS_CRYPTO_02103
class KeyDerivationFunctionCtx : public CryptoContext {...};
Key Derivation Function interface.
Header-Datei #include "ara/crypto/cryp/key_derivation_function_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 · 温度: 不可控 · 提示词: 0339805a1afd
来源
未决问题(1)
摘要 详细
安全地从基础密钥和可配置上下文参数中派生对称密钥。
接口 ara::crypto::cryp::KeyDerivationFunctionCtx 用于从现有密钥材料和可配置上下文参数(例如 Salt 或计数器)派生新的对称密钥 [SWS_CRYPT_21515] 。在使用 DeriveKey 生成密钥之前,必须通过 SetKey 使用密钥或 KeySlot 初始化上下文,并可选地通过 SetParameter 进行配置 [SWS_CRYPT_21525] 。作为关键安全条件,仅当源密钥材料显式被授权用于 KDF 操作,且目标密钥所需的用法标志兼容时,才允许进行派生。
更多 ›
本指南由 AI 整理。所有技术陈述均完全基于 AUTOSAR Adaptive 规范(Release R25-11)。
分组依据 类别 历史
成员图 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
nara__crypto__cryp__KeyDerivationFunctionCtx485
KeyDerivationFunctionCtx
+ DeriveKey()
+ SetKey()
+ SetParameter()
nara__crypto__cryp__CryptoContext85
CryptoContext
nara__crypto__cryp__KeyDerivationFunctionCtx485->nara__crypto__cryp__CryptoContext85
详细视图 此版本没有元素数据
方法 Derive a symmetric key from the provided key material and provided context configuration, e.g., salt, context, IV, iteration count.
Configure the context to use the provided key.
重载 SetKey 2 Set a parameter of the KDF identified by parameterName.
重载 SetParameter 3 类型别名 Smart pointer of the interface.
点击条目以查看其关系。
基类 派生类 使用 被使用于 继承 自此版本起移除 用于 此类中无关联 函数 AI 评注 打开类页面 无法加载类页面。 调整顺序 调整宽度 调整大纲宽度 章节 阅读时间 SWS 引用 图表 放回中间 调整顺序或拖到标题栏 取消停靠 – 在内容中显示 移到中间栏 作为标签停靠到标题栏 元素 AI 模型 打开审计档案 档案 打开简短版本 打开中等版本 打开完整版本 恢复默认视图 已恢复默认视图 撤销 关闭详细视图 签名 基本信息 值 截至所选版本的最后一次更改 之后的下一次更改 单击:选择版本 无法放在此处:拖到标题栏可停靠,拖到中间栏可取消停靠。 新增 已更改 未更改 已移除 未包含 更改 内容无变化 首次出现于 移除于 没有可用的版本数据。 正在加载版本数据 … 文本 此版本未收录措辞 悬停或单击单元格:与所选版本比较 · 单击版本标题:选择版本 选择版本 属性 版本 元素 只有一个版本有措辞 PDF 中存在,原文尚未导入 首次采集原文 自 {rel} 起未更改 版本颜色 最早版本 最新版本
方法文档
virtual ara::core::Result < SymmetricKey ::Sptr > DeriveKey (AlgId targetAlgId, AllowedUsageFlags allowedUsage) const noexcept=0;
Derive a symmetric key from the provided key material and provided context configuration, e.g., salt, context, IV, iteration count.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: ad7de7f8f0b6
来源
类 ara::crypto::cryp::KeyDerivationFunctionCtx 的方法 DeriveKey 根据现有密钥材料以及上下文中存储的参数(如盐值、初始化向量 (IV) 或迭代计数器)同步派生新的对称密钥 [SWS_CRYPT_21515] 。
使用
调用时,通过 targetAlgId 传递所需加密算法的标识符,并通过 allowedUsage 传递允许的使用标志 [SWS_CRYPT_21515] 。作为返回值,该函数同步提供一个 ara::core::Result<SymmetricKey::Sptr>,其在成功执行时提供指向生成的对称密钥对象的智能指针 [SWS_CRYPT_21515] 。
错误处理
如果密钥生成失败,该函数保证回滚语义并在 ara::core::Result 中返回相应的错误码 [SWS_CRYPT_21515] :
UnknownIdentifier:为 targetAlgId 传入的值不受支持时报告 [SWS_CRYPT_21515] 。
ara::crypto::CryptoErrc::kIncompatibleArguments:当 allowedUsage 中指定的使用标志与目标算法不兼容时发生 [SWS_CRYPT_21515] 。
ara::crypto::CryptoErrc::kUninitializedContext:在密钥派生之前上下文未充分初始化 [SWS_CRYPT_21515] 。
ara::crypto::CryptoErrc::kBusyResource:密钥派生所需的资源被占用 [SWS_CRYPT_21515] 。
ara::crypto::CryptoErrc::kEmptyKeySlot:为该操作配置的 KeySlot 当前为空 [SWS_CRYPT_21515] 。
ara::crypto::CryptoErrc::kUsageViolation:当源密钥的使用权限不包含 kAllowKeyDerivation,或者当目标需要 kAllowPlaintextExport 但源不允许 kAllowDerivedPlaintextExport 时发生 [SWS_CRYPT_21515] 。
并发性与执行上下文
该方法被指定为 noexcept,提供异常安全(exception safe),并针对并发调用设计为 thread-safe [SWS_CRYPT_21515] 。
此使用说明自动生成,且完全基于 AUTOSAR R25-11 的规范数据。
Parameter (in)
Parameter Beschreibung targetAlgId the identifier of the target symmetric crypto algorithm allowedUsage the flags that define a list of allowed usages in which the target key can be used.
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#9b38f620
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_21515@rel:R25-11#9b38f620
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#4792442a2026-09-30 Inspect R19-11 rel:R19-11#d747dcdf2026-10-14 Inspect R20-11 rel:R20-11#20ca9f5b2026-10-14 Inspect R21-11 rel:R21-11#4e7c875e2026-10-14 Inspect R22-11 rel:R22-11#1edafd582026-10-14 Inspect R23-11 rel:R23-11#09e184cc2026-10-14 Inspect R24-11 rel:R24-11#f4962bb42026-10-14 Inspect R25-11 rel:R25-11#9b38f6202026-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 (SymmetricKey ::Sptr key) noexcept=0;
Configure the context to use the provided key.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 3738ec7c9403
来源
本使用说明基于 AUTOSAR 规范 R25-11 自动生成。
实现者指南即将推出(复杂度 I2)
Parameter (in)
Parameter Beschreibung key the source key-material
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#eca8e8d8
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_21525@rel:R25-11#eca8e8d8
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#a05f5b632026-09-30 Inspect R20-11 rel:R20-11#33ea902d2026-10-14 Inspect R21-11 rel:R21-11#46a880c32026-10-14 Inspect R22-11 rel:R22-11#fed116fd2026-10-14 Inspect R23-11 rel:R23-11#3143ac902026-10-14 Inspect R24-11 rel:R24-11#db6fdd502026-10-14 Inspect R25-11 rel:R25-11#eca8e8d82026-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 derivation is performed.
用户指南
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: aa74de7c29b5
来源
本使用说明基于 AUTOSAR 规范自动创建。
实现者指南即将推出(复杂度 I2)
Parameter (in)
Parameter Beschreibung keySlot a keyslot containing a symmetric key
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#8eb8c6c4
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_50010@rel:R25-11#8eb8c6c4
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 > SetParameter (ara::core::StringView parameterName, ReadOnlyMemRegion value) noexcept=0;
Set a parameter of the KDF identified by parameterName.
Parameter (in)
Parameter Beschreibung parameterName an identifier of the parameter value an input buffer containing the value of the parameter
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#4c314faf
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_50007@rel:R25-11#4c314faf
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 > SetParameter (ara::core::StringView parameterName, std::uint64_t value) noexcept=0;
Set a parameter of the KDF identified by parameterName.
Parameter (in)
Parameter Beschreibung parameterName an identifier of the parameter value an unsigned integer containing the value of the parameter
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#26b90c19
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_50008@rel:R25-11#26b90c19
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 > SetParameter (ara::core::StringView parameterName, SymmetricKey ::Sptr value) noexcept=0;
Set a parameter of the KDF identified by parameterName.
Parameter (in)
Parameter Beschreibung parameterName an identifier of the parameter value SymmetricKey being used as the input parameter
Rückgabewert
Fehler
Status: valid/unmigrated
Version: rel:R25-11#92b1f35c
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_50009@rel:R25-11#92b1f35c
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
类型别名文档
using Sptr = std::shared_ptr <KeyDerivationFunctionCtx >;
Smart pointer of the interface.
Status: valid/unmigrated
Version: rel:R25-11#6ebb94e3
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_21501@rel:R25-11#6ebb94e3
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#4fb24cfc2026-09-30 Inspect R19-11 rel:R19-11#e5d0fc6d2026-10-14 Inspect R20-11 rel:R20-11#c13472492026-10-14 Inspect R21-11 rel:R21-11#c13472492026-10-14 Inspect R22-11 rel:R22-11#461242d92026-10-14 Inspect R23-11 rel:R23-11#aa4dc94a2026-10-14 Inspect R24-11 rel:R24-11#aa4dc94a2026-10-14 Inspect R25-11 rel:R25-11#6ebb94e32026-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 · 德文原文