함수 AgreeKey [SWS_CRYPT_21312] Upstream: RS_CRYPTO_02115
virtual ara::core::Result< SymmetricKey::Sptr > AgreeKey (Public Key::Sptr otherSideKey, AlgId targetAlgId, AllowedUsageFlags allowed Usage) const noexcept=0;
Produce a common symmetric key via execution of the key-agreement algorithm using a private key and a public key of another side.
클래스 ara::crypto::cryp::KeyAgreementPrivateCtx의 메서드 AgreeKey은(는) 개인 키와 상대방의 공개 키를 사용하여 키 합의 알고리즘을 실행함으로써 공통 대칭 키를 생성합니다 [SWS_CRYPT_21312]. 매개변수로 상대방의 공개 키(otherSideKey), 대상 대칭 알고리즘의 식별자(targetAlgId) 및 허용된 사용 플래그(allowedUsage)가 전달됩니다 [SWS_CRYPT_21312]. 성공적으로 실행되면 계산된 공통 비밀을 포함하는 SymmetricKey::Sptr이(가) 포함된 ara::core::Result이(가) 반환됩니다 [SWS_CRYPT_21312]. 해석: 비동기 Future 유형을 통해서가 아니라 결과가 Result로 직접 반환되므로 키 계산은 동기적으로 수행될 것으로 추정됩니다. 질문 Q-ab31a8a62bb1c583 (열림)
이 메서드는 thread-safe 및 exception safe (noexcept)(으)로 정의되어 있습니다 [SWS_CRYPT_21312]. 오류 발생 시 롤백 시맨틱이 적용되며 해당 오류 코드가 반환됩니다 [SWS_CRYPT_21312]:
UninitializedContext: 키를 제공하여 컨텍스트가 아직 초기화되지 않았거나 필수 매개변수가 사전에SetParameter()을(를) 통해 설정되지 않았습니다 [SWS_CRYPT_21312].CryptoErrc::kIncompatibleObject: 공개 키가 현재 컨텍스트와 호환되지 않습니다 [SWS_CRYPT_21312].CryptoErrc::kUsageViolation: 개인 키 또는 공개 키의 사용 제한에kAllowKeyAgreement이(가) 포함되어 있지 않습니다 [SWS_CRYPT_21312].CryptoErrc::kInvalidArgument: 전달된allowedUsage플래그가 대칭 키에 대해 유효하지 않습니다 [SWS_CRYPT_21312].ara::crypto::CryptoErrc::kUnknownIdentifier: 식별자targetAlgId에 지원되지 않는 값이 포함되어 있습니다 [SWS_CRYPT_21312].CryptoErrc::kBusyResource또는CryptoErrc::kEmptyKeySlot: 필요한 리소스가 사용 중이거나 구성된 KeySlot이 비어 있습니다 [SWS_CRYPT_21312].
본 텍스트는 AI에 의해 생성되었으며 기술적 오리엔테이션을 위한 것입니다.
| Header-Datei | #include "ara/crypto/cryp/key_agreement_private_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::KeyAgreementPrivateCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe CryptoErrc::k rollback_semantics |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| otherSideKey | the public key of the other side of the Key-Agreement |
| targetAlgId | identifier of the symmetric target algorithm |
| allowedUsage | the allowed usage of the target key |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<SymmetricKey::Sptr > | a result containing either a unique pointer to the SymmetricKey object, which contains the computed shared secret produced by the Key-Agreement algorithm or an error |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| UninitializedContext | if the context was not initialized by deploying a key or not all required parameters have been set via SetParameter() |
| CryptoErrc::kIncompatibleObject | rollback_semantics if the public key is not compatible to this context |
| CryptoErrc::kInvalidArgument | rollback_semantics if the allowed usage flags are invalid for a symmetric key |
| CryptoErrc::kBusyResource | rollback_semantics a required resource is busy |
| CryptoErrc::kEmptyKeySlot | rollback_semantics if a KeySlot was configured that is currently is empty |
| CryptoErrc::kUsageViolation | rollback_semantics if the allowed usage of the private or public key do not include k AllowKeyAgreement |
| ara::crypto::CryptoErrc::kUnknownIdentifier | rollback_semantics if targetAlgId has an unsupported value |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_21312- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_21312@rel:R25-11#e365f8c4- Content hash
e365f8c4- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21312
Status: valid/unmigrated
Version: rel:R25-11#26c80425
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_21312@rel:R25-11#26c80425
Recorded Revisions (8):
- R25-11
rel:R25-11#4f58d41f2026-09-30 - R19-11
rel:R19-11#3975d40e2026-10-14 - R20-11
rel:R20-11#340c62732026-10-14 - R21-11
rel:R21-11#633195382026-10-14 - R22-11
rel:R22-11#418b5aab2026-10-14 - R23-11
rel:R23-11#28812de12026-10-14 - R24-11
rel:R24-11#c610b1882026-10-14 - R25-11
rel:R25-11#26c804252026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically 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 · 독일어 원문