function GetPublicKey [SWS_CRYPT_22511] Upstream: RS_CRYPTO_02108, RS_CRYPTO_02115
virtual ara::core::Result< PublicKey::Sptr > GetPublicKey () const noexcept=0;
The interface shall return the public key correspondent to this private key.
use
The method GetPublicKey of class ara::crypto::cryp::PrivateKey serves to synchronously retrieve the public key corresponding to the private key [SWS_CRYPT_22511]. The call is parameterless on an existing instance of PrivateKey. As return value, the interface returns a ara::core::Result<PublicKey::Sptr>, which upon successful execution provides a shared pointer to the associated PublicKey object [SWS_CRYPT_22511].
Error Handling and Concurrency
No standardized error codes are defined in the specification for this method [SWS_CRYPT_22511]. Error handling is performed via the return object of type ara::core::Result. Because the operation is declared as noexcept, it is considered exception-safe (exception safe) [SWS_CRYPT_22511]. In addition, the method is qualified as const and specified as thread-safe (thread-safe), whereby concurrent read access across multiple threads is permitted [SWS_CRYPT_22511].
Interaction
In typical cryptographic workflows, GetPublicKey is used after generating an asymmetric key pair using GeneratePrivateKey [SWS_CRYPT_20722]. In doing so, the permitted usage flags of the generated private key are transferred to the corresponding public key (for example, the permission for signature verification from signature generation) [SWS_CRYPT_20722]. The function must be distinguished from the interface of the same name in ProtectedKeyImportCtx, which serves to unpack imported public keys [SWS_CRYPT_50211].
This usage note was automatically generated based on AUTOSAR R25-11.
Implementer's Guide to follow (complexity I1)
| Header-Datei | #include "ara/crypto/cryp/cryobj/private_key.h" |
|---|---|
| Scope | class ara::crypto::cryp::PrivateKey |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< PublicKey::Sptr > | A result containing a shared pointer to the public key correspondent to this private key |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| This function does not specify any standardized errors. | |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_22511- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_22511@rel:R25-11#f0d041e7- Content hash
f0d041e7- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22511
Status: valid/unmigrated
Version: rel:R25-11#e5f0457b
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_22511@rel:R25-11#e5f0457b
Recorded Revisions (8):
- R25-11
rel:R25-11#f0d041e72026-09-30 - R19-11
rel:R19-11#bb931c232026-10-14 - R20-11
rel:R20-11#85846a1e2026-10-14 - R21-11
rel:R21-11#85846a1e2026-10-14 - R22-11
rel:R22-11#99b114f02026-10-14 - R23-11
rel:R23-11#6fdc19552026-10-14 - R24-11
rel:R24-11#a752dbfc2026-10-14 - R25-11
rel:R25-11#e5f0457b2026-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 · German original