DEENESPTFRRUARHIKOZHNL

класс ara::crypto::cryp::AuthCipherCtx

[SWS_CRYPT_20100] Upstream: RS_CRYPTO_02207

class AuthCipherCtx :           public CryptoContext {...};

Authenticated Cipher Context interface.

Header-Datei#include "ara/crypto/cryp/auth_cipher_ctx.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::cryp
Basisklasse(n)CryptoContext

Руководство пользователяСОЗДАНО ИИ

Предоставляет интерфейс для аутентифицированного симметричного шифрования и расшифрования с защитой целостности.
СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: a1dee2a3fcf5 Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Предоставляет интерфейс для аутентифицированного симметричного шифрования и расшифрования с защитой целостности.

Интерфейс ara::crypto::cryp::AuthCipherCtx служит для аутентифицированного шифрования и расшифрования данных с сохранением конфиденциальности и целостности [SWS_CRYPT_23911]. После настройки ключа обработка осуществляется либо как атомарный одиночный вызов, либо как потоковая последовательность из инициализации, опциональных данных аутентификации, обновлений полезных данных и финализации. В качестве критического условия безопасности расшифрование завершается сбоем при недействительном теге аутентификации, поэтому расшифрованные полезные данные разрешается обрабатывать только после успешной валидации [SWS_CRYPT_50075].

Контекст

Интерфейс ara::crypto::cryp::AuthCipherCtx определяет стандартизированный программный интерфейс для операций аутентифицированного шифрования (Authenticated Encryption with Associated Data, AEAD) в рамках AUTOSAR Adaptive Platform. Он сочетает конфиденциальность с защитой целостности, генерируя или валидируя криптографический тег аутентификации наряду с фактическим шифрованием или расшифрованием полезных данных. В качестве центральных партнеров по взаимодействию выступают вызывающие приложения, а также ключевые объекты: перед использованием контекст либо привязывается к конкретному экземпляру SymmetricKey [SWS_CRYPT_23911], либо конфигурируется с персистентным или предоставленным KeySlot [SWS_CRYPT_50072]. Помимо пошаговой потоковой обработки, класс также поддерживает автономные одиночные вызовы для обработки полных сообщений за один шаг [SWS_CRYPT_50078].

Жизненный цикл

Контексты управляются в области приложения через общий тип указателя ara::crypto::cryp::AuthCipherCtx::Sptr [SWS_CRYPT_20101]. (Интерпретация: создание объекта обычно осуществляется через вышестоящую фабрику провайдера, поскольку AuthCipherCtx специфицирован как чистый интерфейс). Вопрос Q-23125789874cf2f3 (открытый) Все функции-члены объявлены как безопасные к исключениям (exception safe) и потокобезопасные (thread-safe) [SWS_CRYPT_23911], [SWS_CRYPT_24715]. Функциональный жизненный цикл проходит через чётко определённые состояния:

  • Неинициализирован: непосредственно после создания экземпляра. Вызовы для обработки данных отклоняются, так как ключ ещё не был назначен [SWS_CRYPT_50081].
  • Ключ сконфигурирован: при успешном вызове SetKey с SymmetricKey [SWS_CRYPT_23911] или KeySlot [SWS_CRYPT_50072] контекст переходит в состояние готовности к работе. Из этого состояния можно напрямую выполнять одиночные (single-shot) операции.
  • Потоковая передача активна: осуществляется переход вызовом Start с указанием направления преобразования с вектором инициализации (IV) [SWS_CRYPT_24715] или без явного IV [SWS_CRYPT_50073].
  • Завершение / сброс: текущая потоковая операция завершается штатно с помощью Finish [SWS_CRYPT_50075] или FinishEncrypt [SWS_CRYPT_50076] либо прерывается досрочно через Cancel [SWS_CRYPT_50077]. После этого контекст снова готов к новым последовательностям обработки.
Lebenszyklus Uninitialized Uninitialized KeyConfigured KeyConfigured Uninitialized->KeyConfigured SetKey() KeyConfigured->KeyConfigured ProcessSingleCall() StreamingActive StreamingActive KeyConfigured->StreamingActive Start() StreamingActive->KeyConfigured Finish() / Cancel() StreamingActive->StreamingActive UpdateAuthenticatedData() UpdateConfidentialData()

Диаграмма состояний: фазы состояний контекста от привязки ключа через потоковую обработку до завершения. Источники: [SWS_CRYPT_23911], [SWS_CRYPT_50072], [SWS_CRYPT_24715], [SWS_CRYPT_50075], [SWS_CRYPT_50077].

Путь использования

Для непрерывной потоковой обработки данных интерфейс требует упорядоченной последовательности вызовов:

  1. Конфигурация: назначение ключа через SetKey [SWS_CRYPT_23911] или SetKey с KeySlot [SWS_CRYPT_50072].
  2. Запрос параметров: опциональное определение предельных значений и размеров буферов с помощью GetMinimumChunkSize [SWS_CRYPT_50162], GetMaximumChunkSize [SWS_CRYPT_50082], GetMinimumInputIvSize [SWS_CRYPT_50163], GetMaximumInputIvSize [SWS_CRYPT_50164], GetTagSize [SWS_CRYPT_50161], а также GetRequiredOutputBufferSize [SWS_CRYPT_50081].
  3. Запуск операции: вызов Start с определением направления (шифрование или расшифрование), а также предоставлением IV [SWS_CRYPT_24715] или запросом собственного IV контекста [SWS_CRYPT_50073].
  4. Ассоциированные данные (AAD): если в расчет целостности необходимо включить дополнительные открытые данные, они передаются через UpdateAuthenticatedData [SWS_CRYPT_20313]. Максимально допустимый размер AAD можно запросить с помощью GetMaxAssociatedDataSize [SWS_CRYPT_20103]. Важно: блоки AAD обязательно должны передаваться до фактических полезных данных.
  5. Обработка полезных данных: пошаговая передача блоков данных через UpdateConfidentialData [SWS_CRYPT_50074]. При расшифровании открытый текст возвращается до подтверждения его подлинности; приложение может использовать эти данные только после успешной финализации.
  6. Финализация: завершение операции с помощью Finish [SWS_CRYPT_50075] или FinishEncrypt [SWS_CRYPT_50076], в результате чего обрабатывается финальный блок и вычисляется либо проверяется тег аутентификации.

Для компактных полезных нагрузок существуют альтернативы в виде одиночного вызова: ProcessSingleCall обрабатывает данные без передачи IV [SWS_CRYPT_50078], ProcessSingleCallWithInputIv принимает внешний IV [SWS_CRYPT_50079], а EncryptSingleCallWithOutputIv возвращает сгенерированный контекстом IV вызывающей стороне [SWS_CRYPT_50080].

Процесс потокового аутентифицированного шифрованияПриложениеAuthCipherCtxSetKey(key)Result<void>Start(kEncrypt, iv)Result<void>optZusatzdaten vorhandenUpdateAuthenticatedData(aad)Result<void>loopfuer jeden DatenblockUpdateConfidentialData(in, out)Result<size_t>Finish(in, out, tag)Result<size_t>

Диаграмма последовательности: последовательность вызовов потокового аутентифицированного шифрования. Источники: [SWS_CRYPT_23911], [SWS_CRYPT_24715], [SWS_CRYPT_20313], [SWS_CRYPT_50074], [SWS_CRYPT_50075].

Сценарии ошибок

Методы AuthCipherCtx возвращают результаты через ara::core::Result и в случае ошибки обладают семантикой отката. Соответствующими кодами ошибок из ara::crypto::CryptoErrc являются:

  • kUninitializedContext: возникает при вызове Start [SWS_CRYPT_24715], ProcessSingleCall [SWS_CRYPT_50078] или вычислений буфера [SWS_CRYPT_50081], если ключ еще не был сконфигурирован через SetKey.
  • kProcessingNotStarted: возвращается, если UpdateAuthenticatedData [SWS_CRYPT_20313], UpdateConfidentialData [SWS_CRYPT_50074], Finish [SWS_CRYPT_50075] или Cancel [SWS_CRYPT_50077] вызываются без предшествующего Start.
  • kInvalidUsageOrder: сигнализирует о неверной последовательности вызовов, если UpdateAuthenticatedData вызывается после того, как полезные данные уже были обработаны через UpdateConfidentialData [SWS_CRYPT_20313].
  • kAuthTagNotValid: указывает при расшифровании в Finish [SWS_CRYPT_50075] или в методах одиночного вызова [SWS_CRYPT_50078] на то, что вычисленный тег не совпадает с переданным тегом и проверка подлинности не удалась.
  • kUsageViolation: возникает, если атрибуты использования ключа не соответствуют запрошенной операции (например, отсутствует kAllowDataEncrypt или kAllowDataDecrypt) [SWS_CRYPT_23911], [SWS_CRYPT_50078].
  • kInsufficientCapacity / kInvalidInputSize: указывают на недостаточный размер выходных буферов или недопустимую длину входных данных, IV либо тега [SWS_CRYPT_24715], [SWS_CRYPT_50074], [SWS_CRYPT_50075].
  • kEmptyKeySlot / kBusyResource: относятся к ошибочным состояниям при использовании сконфигурированных слотов ключей [SWS_CRYPT_24715], [SWS_CRYPT_50078].

Настоящее руководство основано исключительно на стандарте AUTOSAR Adaptive (Release R25-11) и обобщает требования к интерфейсу ara::crypto::cryp::AuthCipherCtx.

Карта членов

Диаграмма классов

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

G nara__crypto__cryp__AuthCipherCtx142 AuthCipherCtx + Cancel() + EncryptSingleCallWithOutputIv() + Finish() + FinishEncrypt() + GetMaxAssociatedDataSize() + GetMaximumChunkSize() + GetMaximumInputIvSize() + GetMinimumChunkSize() + GetMinimumInputIvSize() + GetOutputIvSize() + GetRequiredOutputBufferSize() + GetTagSize() + ProcessSingleCall() + ProcessSingleCallWithInputIv() + SetKey() + Start() … 2 weitere nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__AuthCipherCtx142->nara__crypto__cryp__CryptoContext85

Подробный вид

Выберите элемент в оглавлении.

Методы

Cancel функция

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

virtual ara::core::Result< void > Cancel () noexcept=0;

Perform encryption and calculate/verify of the authentication tag in a single-call and return an IV generated by the context.

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, ReadWriteMemRegion ivOut, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;
Finish функция

Finalize the en-/decryption and calculate/verify the authentication tag without returning an IV.

FinishEncrypt функция

Finalize the encryption and calculate the authentication tag and return the IV generated by the context.

virtual ara::core::Result< std::size_t > FinishEncrypt (ReadOnlyMem Region in, ReadWriteMemRegion out, ReadWriteMemRegion tag, ReadWrite MemRegion ivOut) noexcept=0;

Get maximum supported size of associated public data.

virtual ara::core::Result< std::size_t > GetMaxAssociatedDataSize () const noexcept=0;
GetMaximumChunkSize функция

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt() or ProcessSingleCall() by this context.

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;
GetMaximumInputIvSize функция

Get the maximum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

virtual ara::core::Result< std::size_t > GetMaximumInputIvSize (Crypto Transform transformDirection) const noexcept=0;
GetMinimumChunkSize функция

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt() or ProcessSingleCall() by this context.

virtual ara::core::Result< std::size_t > GetMinimumChunkSize () const noexcept=0;
GetMinimumInputIvSize функция

Get the minimum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

virtual ara::core::Result< std::size_t > GetMinimumInputIvSize (Crypto Transform transformDirection) const noexcept=0;
GetOutputIvSize функция

Get the output IV size that will be returned by the functions FinishEncrypt() (in case no IV has been provided by the application during the call to Start()), and EncryptSingleCallWithOutputIv().

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

Calculate the maximum required size of the output buffer depending on the input size in the current state of the context.

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (std::size_t inputSize, bool isFinal) const noexcept;
GetTagSize функция

Get the output tag size.

virtual ara::core::Result< std::size_t > GetTagSize () const noexcept=0;
ProcessSingleCall функция

Perform en-/decryption and calculate/verify of the authentication tag in a single-call without setting or returning an IV.

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMemRegion tag, CryptoTransform transformDirection, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;

Perform en-/decryption and calculate/verify of the authentication tag in a single-call, providing an IV to be used during en-/decryption.

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, CryptoTransform transformDirection, ReadOnlyMemRegion iv, ara::core::Optional< ReadOnlyMemRegion > authenticatedData) noexcept=0;
SetKey функция 2

The interface shall configure the context to use the provided SymmetricKey.

Перегрузки SetKey 2
virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0; SWS_CRYPT_23911
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50072
Start функция 2

Initialize the context for a new encryption or decryption and set the IV used by the context.

Перегрузки Start 2
virtual ara::core::Result< void > Start (CryptoTransform transform Direction, ReadOnlyMemRegion iv) noexcept=0; SWS_CRYPT_24715
virtual ara::core::Result< void > Start (CryptoTransform transform Direction) noexcept=0; SWS_CRYPT_50073

Update the tag calculation by a new chunk of additional authenticated data.

virtual ara::core::Result< void > UpdateAuthenticatedData (ReadOnlyMem Region authenticatedData) noexcept=0;
UpdateConfidentialData функция

Encrypt or decrypt confidential data. When used for decryption, the plaintext is returned without verifying its authenticity. An application must not use the data before verifying its authenticity using Finish().

virtual ara::core::Result< std::size_t > UpdateConfidentialData (Read OnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Псевдонимы типов

Sptr псевдоним типа

Smart pointer of the interface.

Документация методов

функция Cancel [SWS_CRYPT_50077] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Cancel () noexcept=0;

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 739ac0d710b6 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Использование

Метод Cancel() интерфейса ara::crypto::cryp::AuthCipherCtx прерывает активную потоковую операцию, которая ранее была начата через Start() и ещё не завершена [SWS_CRYPT_50077]. Функция предоставляется через заголовочный файл ara/crypto/cryp/auth_cipher_ctx.h и работает синхронно без входных параметров [SWS_CRYPT_50077]. Она возвращает ara::core::Result<void>, который в случае успеха пуст.

Обработка ошибок и граничные условия

Прерывание предполагает, что обработка данных действительно ранее была начата с помощью Start(). Если потоковая операция не была запущена, вызов завершается сбоем и возвращает код ошибки ara::crypto::CryptoErrc::kProcessingNotStarted с семантикой отката [SWS_CRYPT_50077].

Параллелизм

Операция объявлена как noexcept и согласно спецификации классифицирована как thread-safe, так и exception safe [SWS_CRYPT_50077].

Взаимодействие

Шаблон прерывания, реализованный через Cancel(), стандартизирован в модуле crypt. Идентичная семантика интерфейса и тот же код ошибки ara::crypto::CryptoErrc::kProcessingNotStarted определены для соответствующих потоковых контекстов:

Это указание по использованию было сгенерировано автоматически на основе спецификации AUTOSAR R25-11.

Руководство разработчика реализации в подготовке (сложность I1)

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

Rückgabewert

TypBeschreibung
ara::core::Result< void >an empty result if the ongoing streaming operation was cancelled successfully, or a result containing an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50077
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50077@rel:R25-11#3ecd7a9a
Content hash
3ecd7a9a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50077
Status: valid/unmigrated Version: rel:R25-11#863ca4bd 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_50077@rel:R25-11#863ca4bd
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

функция EncryptSingleCallWithOutputIv [SWS_CRYPT_50080] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > EncryptSingleCallWithOutputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, ReadWriteMemRegion ivOut, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;

Perform encryption and calculate/verify of the authentication tag in a single-call and return an IV generated by the context.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 6385ebfbc16d Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Синхронный метод EncryptSingleCallWithOutputIv интерфейса ara::crypto::cryp::AuthCipherCtx выполняет аутентифицированное шифрование за один шаг и при этом самостоятельно генерирует вектор инициализации [SWS_CRYPT_50080]. Он обрабатывает входные данные из dataIn, а также необязательные дополнительные данные authenticatedData и записывает шифротекст в буфер dataOut. Сгенерированный вектор инициализации сохраняется в буфере ivOut, тогда как тег аутентификации выводится через tag [SWS_CRYPT_50080]. Размер буфера для ivOut может быть предварительно определён с помощью метода GetOutputIvSize [SWS_CRYPT_50165]. Несмотря на составную часть имени Encrypt, метод, вероятно, также может использоваться для расшифрования, поскольку спецификация ошибок явно указывает поведение для transformDirection == kDecrypt [SWS_CRYPT_50080]. Вопрос Q-66618567b20f99b9 (открытый)

Для вызова действуют существенные предварительные условия и ограничения:

  • Контекст должен быть предварительно успешно инициализирован с помощью SetKey; в противном случае возвращается kUninitializedContext [SWS_CRYPT_50080].
  • Ключ в сконфигурированном key-слоте должен быть совместимым и иметь соответствующее полномочие (например, kAllowDataEncrypt), иначе возвращается kUsageViolation или kIncompatibleObject [SWS_CRYPT_50080].
  • Если выходных буферов dataOut или ivOut недостаточно, вызов завершается с ошибкой kInsufficientCapacity [SWS_CRYPT_50080].
  • Если контекст не поддерживает одношаговую обработку или требует внешнего задания IV, возвращается kUnsupported [SWS_CRYPT_50080].

Операция специфицирована как thread-safe, а также исключениебезопасная и гарантирует семантику отката в случае ошибки [SWS_CRYPT_50080]. Для чистых симметричных шифрований без обработки тегов существует отдельный аналог в SymmetricCipherCtx [SWS_CRYPT_50049].

Этот текст сгенерирован ИИ на основе спецификации.

Руководство разработчика реализации в подготовке (сложность I2)

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

Parameter (in)

ParameterBeschreibung
dataInan input data buffer containing the plaintext/ciphertext
authenticatedDataoptional additional authenticated data

Parameter (out)

ParameterBeschreibung
dataOutan output data buffer that contains en-/decrypted data
ivOutan output data buffer that the initialization vector (IV) generated by the context will be written to

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag. for encryption: an output data buffer that the authentication tag is written to.

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single shot processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting an IV
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided input buffer or authentication tag is invalid
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data or IV output buffer is too small
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the transformDirection is kDecrypt and the processed data cannot be authenticated

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50080
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50080@rel:R25-11#a916cad8
Content hash
a916cad8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50080
Status: valid/unmigrated Version: rel:R25-11#1fa18617 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_50080@rel:R25-11#1fa18617
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

функция Finish [SWS_CRYPT_50075] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Finish (ReadOnlyMemRegion in, ReadWriteMemRegion out, ReadWriteMemRegion tag) noexcept=0;

Finalize the en-/decryption and calculate/verify the authentication tag without returning an IV.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 8b946dd1de69 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Использование и семантика

Метод Finish синхронно завершает шифрование или расшифрование внутри ara::crypto::cryp::AuthCipherCtx и вычисляет либо проверяет тег аутентификации без возврата вектора инициализации (IV) [SWS_CRYPT_50075]. Вызывающая сторона передаёт оставшиеся данные через буфер in, а также целевой буфер out. Через буфер tag при шифровании выводится вычисленный тег, тогда как при расшифровании передаётся проверяемый тег [SWS_CRYPT_50075]. Возвращаемое значение ara::core::Result<std::size_t> указывает фактически записанные в out байты, количество которых может быть меньше ёмкости выходного буфера [SWS_CRYPT_50075].

Порядок выполнения и взаимодействие

Перед вызовом обработка данных обязательно должна быть инициирована с помощью Start() [SWS_CRYPT_50075]. Если ранее блоки данных обрабатывались с помощью UpdateConfidentialData, приложению разрешается использовать результирующий открытый текст при расшифровании только после успешной аутентификации с помощью Finish [SWS_CRYPT_50074]. Максимально требуемый размер буфера для out можно предварительно определить через GetRequiredOutputBufferSize с указанием isFinal = true [SWS_CRYPT_50081].

Обработка ошибок и параллелизм

Метод специфицирован как потокобезопасный и исключениебезопасный [SWS_CRYPT_50075]. Ошибки возвращаются через ara::core::Result с семантикой отката [SWS_CRYPT_50075]:

  • ProcessingNotStarted: обработка данных не была предварительно запущена с помощью Start() [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: выходной буфер out слишком мал [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kInvalidInputSize: размер буфера in или tag недопустим [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kAuthTagNotValid: подлинность данных не может быть подтверждена при расшифровании [SWS_CRYPT_50075].
  • ara::crypto::CryptoErrc::kUnsupported: потоковая обработка не поддерживается контекстом [SWS_CRYPT_50075].

Указание: это указание по использованию было автоматически сгенерировано на основе данных спецификации.

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

Parameter (in)

ParameterBeschreibung
inan input data buffer that contains a part of the plaintext/ciphertext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the en-/decrypted data is written to

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag for encryption: an output data buffer that the authentication tag is written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out

Fehler

FehlercodeBeschreibung
ProcessingNotStartedif data processing has not been started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer or the authentication tag is invalid
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the processed data cannot be authenticated during decryption
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context or

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50075
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50075@rel:R25-11#f2cab0d2
Content hash
f2cab0d2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50075
Status: valid/unmigrated Version: rel:R25-11#61f4f343 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_50075@rel:R25-11#61f4f343
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

функция FinishEncrypt [SWS_CRYPT_50076] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > FinishEncrypt (ReadOnlyMem Region in, ReadWriteMemRegion out, ReadWriteMemRegion tag, ReadWrite MemRegion ivOut) noexcept=0;

Finalize the encryption and calculate the authentication tag and return the IV generated by the context.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: fd75aa19665e Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Использование

Метод FinishEncrypt синхронно завершает операцию аутентифицированного шифрования в ara::crypto::cryp::AuthCipherCtx, вычисляет тег аутентификации и возвращает сгенерированный контекстом вектор инициализации через ivOut [SWS_CRYPT_50076]. Вызов специфицирован как потокобезопасный, а также безопасный к исключениям (exception safe) [SWS_CRYPT_50076]. В качестве результата функция возвращает ara::core::Result<std::size_t> с количеством байтов, фактически записанных в выходной буфер out, при этом размер вывода может быть меньше емкости буфера [SWS_CRYPT_50076]. Интерпретация: хотя имя указывает на шифрование, спецификация параметра tag, а также код ошибки ara::crypto::CryptoErrc::kAuthTagNotValid указывают на то, что сигнатура в контексте, вероятно, симметрично используется и для операций дешифрования. Вопрос Q-6b924f12c32e0f33 (открытый)

Взаимодействие и определение размера буфера

Обработка данных обязательно должна быть предварительно инициирована с помощью Start(), в противном случае функция сообщает об ошибке ProcessingNotStarted [SWS_CRYPT_50076]. Для определения размера буфера необходимо учитывать взаимодействие со следующими функциями контекста:

  • максимально требуемую емкость для out можно предварительно вычислить через [SWS_CRYPT_50081] с параметром isFinal = true, чтобы избежать ошибки ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50076].
  • минимальный и максимальный размер буфера для входных данных in определяется через [SWS_CRYPT_50162], а также [SWS_CRYPT_50082].
  • требуемый размер буфера для размещения сгенерированного вектора инициализации в ivOut можно запросить через [SWS_CRYPT_50165].

Обработка ошибок и граничные условия

В случае ошибки все ответные сообщения имеют определенную семантику отката [SWS_CRYPT_50076]. При недопустимых размерах буфера для входных данных или тега аутентификации возвращается ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50076]. Кроме того, функция возвращает ara::crypto::CryptoErrc::kUnsupported, если потоковая обработка не поддерживается, IV не используется или IV уже был задан приложением при запуске [SWS_CRYPT_50076].

Это указание по использованию было создано ИИ и основано исключительно на данных спецификации.

Руководство разработчика реализации в подготовке (сложность I2)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer that contains a part of the plaintext/ciphertext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the en-/decrypted data is written to
ivOutan output data buffer that contains the IV

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag for encryption: an output data buffer that the authentication tag is written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out

Fehler

FehlercodeBeschreibung
ProcessingNotStartedif data processing has not been started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer or the authentication tag is invalid
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the processed data cannot be authenticated during decryption
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context or if this context does not use an IV or if the IV has been provided by the application in the Start() function

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50076
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50076@rel:R25-11#04c30db0
Content hash
04c30db0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50076
Status: valid/unmigrated Version: rel:R25-11#7ffd5c95 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_50076@rel:R25-11#7ffd5c95
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

функция GetMaxAssociatedDataSize [SWS_CRYPT_20103] Upstream: RS_CRYPTO_02309

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

Get maximum supported size of associated public data.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >maximal supported size of associated public data in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20103
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20103@rel:R25-11#8bcb9132
Content hash
8bcb9132
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20103
Status: valid/unmigrated Version: rel:R25-11#7d3e4b66 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_20103@rel:R25-11#7d3e4b66
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#91aa2c602026-09-30
  • R20-11rel:R20-11#91749f732026-10-14
  • R21-11rel:R21-11#c88a3b9a2026-10-14
  • R22-11rel:R22-11#e871a6a52026-10-14
  • R23-11rel:R23-11#84dddf6c2026-10-14
  • R24-11rel:R24-11#c2f0c3512026-10-14
  • R25-11rel:R25-11#7d3e4b662026-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

функция GetMaximumChunkSize [SWS_CRYPT_50082] Upstream: RS_CRYPTO_02309

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

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt() or ProcessSingleCall() by this context.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the maximum buffer size in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50082
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50082@rel:R25-11#4525cf37
Content hash
4525cf37
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50082
Status: valid/unmigrated Version: rel:R25-11#f8e55f72 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_50082@rel:R25-11#f8e55f72
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

функция GetMaximumInputIvSize [SWS_CRYPT_50164] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMaximumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the maximum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50164
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50164@rel:R25-11#8e201bde
Content hash
8e201bde
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50164
Status: valid/unmigrated Version: rel:R25-11#1567e5b7 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_50164@rel:R25-11#1567e5b7
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

функция GetMinimumChunkSize [SWS_CRYPT_50162] Upstream: RS_CRYPTO_02309

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

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), FinishEncrypt() or ProcessSingleCall() by this context.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the minimum buffer size in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50162
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50162@rel:R25-11#feff85b5
Content hash
feff85b5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50162
Status: valid/unmigrated Version: rel:R25-11#aa502d0a 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_50162@rel:R25-11#aa502d0a
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

функция GetMinimumInputIvSize [SWS_CRYPT_50163] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMinimumInputIvSize (Crypto Transform transformDirection) const noexcept=0;

Get the minimum IV size required to be passed to the context in the functions Start() and ProcessSingleCallWithInputIv() for the given transformDirection.

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50163
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50163@rel:R25-11#ed1fdc75
Content hash
ed1fdc75
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50163
Status: valid/unmigrated Version: rel:R25-11#452ee080 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_50163@rel:R25-11#452ee080
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

функция GetOutputIvSize [SWS_CRYPT_50165] Upstream: RS_CRYPTO_02309

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

Get the output IV size that will be returned by the functions FinishEncrypt() (in case no IV has been provided by the application during the call to Start()), and EncryptSingleCallWithOutputIv().

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of IV in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50165
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50165@rel:R25-11#1ba2a4b5
Content hash
1ba2a4b5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50165
Status: valid/unmigrated Version: rel:R25-11#b902740e 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_50165@rel:R25-11#b902740e
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

функция GetRequiredOutputBufferSize [SWS_CRYPT_50081] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (std::size_t inputSize, bool isFinal) const noexcept;

Calculate the maximum required size of the output buffer depending on the input size in the current state of the context.

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

Parameter (in)

ParameterBeschreibung
inputSizesize of input data
isFinalif true, calculate maximum required output buffer size for Finish(), FinishEncrypt() and ProcessSingleCall() otherwise for Update()

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the required capacity of the output buffer (in bytes) or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key and setting the transformation direction
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50081
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50081@rel:R25-11#180f1a64
Content hash
180f1a64
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50081
Status: valid/unmigrated Version: rel:R25-11#6a6a83e1 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_50081@rel:R25-11#6a6a83e1
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

функция GetTagSize [SWS_CRYPT_50161] Upstream: RS_CRYPTO_02309

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

Get the output tag size.

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

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >size of the authentication tag in bytes

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this interface is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50161
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50161@rel:R25-11#8d94380f
Content hash
8d94380f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50161
Status: valid/unmigrated Version: rel:R25-11#f81af579 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_50161@rel:R25-11#f81af579
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

функция ProcessSingleCall [SWS_CRYPT_50078] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCall (ReadOnly MemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMemRegion tag, CryptoTransform transformDirection, ara::core::Optional< ReadOnlyMem Region > authenticatedData) noexcept=0;

Perform en-/decryption and calculate/verify of the authentication tag in a single-call without setting or returning an IV.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: a5183289221a Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Синхронный и определённый как потокобезопасный метод ProcessSingleCall класса ara::crypto::cryp::AuthCipherCtx выполняет шифрование или расшифрование полезных данных и одновременное вычисление либо верификацию тега аутентификации за одну операцию без вектора инициализации (IV) [SWS_CRYPT_50078]. Через опциональный буфер authenticatedData могут быть предоставлены дополнительные аутентифицированные данные [SWS_CRYPT_50078]. Буфер tag при расшифровании служит входом для верификации, а при шифровании — выходом для сохранения сгенерированного тега аутентификации [SWS_CRYPT_50078]. При успешной обработке ara::core::Result<std::size_t> возвращает фактическое количество байтов, записанных в dataOut, которое может быть меньше ёмкости целевого буфера [SWS_CRYPT_50078].

Перед вызовом криптографический контекст должен быть инициализирован посредством успешного вызова SetKey; в противном случае функция завершается сбоем с ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_50078]. Кроме того, используемый ключ должен быть разрешён для запрошенного направления преобразования (kAllowDataEncrypt или kAllowDataDecrypt), так как иначе возвращается ara::crypto::CryptoErrc::kUsageViolation [SWS_CRYPT_50078]. Если одношаговая обработка не поддерживается или контекст требует IV, функция возвращает ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_50078]. Если при расшифровании аутентификация завершается сбоем, инициируется ara::crypto::CryptoErrc::kAuthTagNotValid [SWS_CRYPT_50078]. Ошибки назначенного слота ключа сигнализируются через EmptyKeySlot, ara::crypto::CryptoErrc::kBusyResource или ara::crypto::CryptoErrc::kIncompatibleObject [SWS_CRYPT_50078].

Для управления буферами максимально требуемый выходной размер для dataOut может быть предварительно рассчитан через GetRequiredOutputBufferSize с установленным флагом isFinal = true [SWS_CRYPT_50081]; слишком малый выходной буфер приводит к ara::crypto::CryptoErrc::kInsufficientCapacity [SWS_CRYPT_50078]. Дополнительно размер dataIn должен соответствовать границам GetMinimumChunkSize [SWS_CRYPT_50162] и GetMaximumChunkSize [SWS_CRYPT_50082] во избежание ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_50078].

Это указание по использованию было автоматически сгенерировано на основе спецификации AUTOSAR Adaptive R25-11.

Руководство разработчика реализации в подготовке (сложность I2)

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

Parameter (in)

ParameterBeschreibung
dataInan input data buffer containing the plaintext/ciphertext
transformDirectionthe transformation direction, i.e., encryption or decryption
authenticatedDataoptional additional authenticated data

Parameter (out)

ParameterBeschreibung
dataOutan output data buffer that contains en-/decrypted data

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag. for encryption: an output data buffer that the authentication tag is written to.

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single shot processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting or returning an IV
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided input buffer or authentication tag is invalid
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the transformDirection is kDecrypt and the processed data cannot be authenticated

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50078
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50078@rel:R25-11#4d03fe86
Content hash
4d03fe86
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50078
Status: valid/unmigrated Version: rel:R25-11#e0ad5fae 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_50078@rel:R25-11#e0ad5fae
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

функция ProcessSingleCallWithInputIv [SWS_CRYPT_50079] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > ProcessSingleCallWithInputIv (ReadOnlyMemRegion dataIn, ReadWriteMemRegion dataOut, ReadWriteMem Region tag, CryptoTransform transformDirection, ReadOnlyMemRegion iv, ara::core::Optional< ReadOnlyMemRegion > authenticatedData) noexcept=0;

Perform en-/decryption and calculate/verify of the authentication tag in a single-call, providing an IV to be used during en-/decryption.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 36312c01407d Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Метод [SWS_CRYPT_50079] класса ara::crypto::cryp::AuthCipherCtx выполняет синхронную одношаговую обработку (single-call) для шифрования или расшифрования данных с одновременным вычислением либо проверкой тега аутентификации.

При вызове входные данные задаются через dataIn, а направление — через transformDirection. Вектор инициализации передаётся через iv, а необязательные данные аутентификации могут быть предоставлены через authenticatedData [SWS_CRYPT_50079]. Буфер tag в случае шифрования служит для вывода вычисленного тега, а в случае расшифрования — в качестве входных данных для верификации [SWS_CRYPT_50079]. Возвращаемое значение ara::core::Result<std::size_t> при успешном выполнении возвращает количество записанных в dataOut байтов, которое может быть меньше ёмкости буфера [SWS_CRYPT_50079].

В случае ошибки все коды ошибок обладают семантикой отката [SWS_CRYPT_50079]:

  • ara::crypto::CryptoErrc::kUninitializedContext: предварительно не был сконфигурирован ключ с помощью SetKey [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kUsageViolation: ключ не обладает требуемым правом kAllowDataEncrypt или kAllowDataDecrypt [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kEmptyKeySlot, ara::crypto::CryptoErrc::kBusyResource или ara::crypto::CryptoErrc::kIncompatibleObject: сконфигурированный KeySlot пуст, занят или не содержит совместимого SymmetricKey [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kInvalidInputSize или ara::crypto::CryptoErrc::kInsufficientCapacity: буферы для входных данных, тега или IV имеют недопустимый размер, либо dataOut предоставляет недостаточную ёмкость [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kAuthTagNotValid: при расшифровании аутентификация завершается неудачей [SWS_CRYPT_50079].
  • ara::crypto::CryptoErrc::kUnsupported: однократная обработка (single-shot) не поддерживается контекстом, либо контекст требует установки или вывода IV [SWS_CRYPT_50079].

Операция определена как thread-safe и exception safe [SWS_CRYPT_50079]. Допустимые длины для iv могут быть динамически запрошены через GetMinimumInputIvSize [SWS_CRYPT_50163] и GetMaximumInputIvSize [SWS_CRYPT_50164]. По сравнению с чистым блочным шифром в SymmetricCipherCtx [SWS_CRYPT_50048] этот интерфейс объединяет криптографическое преобразование и проверку целостности в одном вызове.

Этот текст был сгенерирован ИИ на основе спецификации AUTOSAR R25-11.

Руководство разработчика реализации в подготовке (сложность I2)

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

Parameter (in)

ParameterBeschreibung
dataInan input data buffer containing the plaintext/ciphertext
transformDirectionthe transformation direction, i.e., encryption or decryption
ivan Initialization Vector (IV) or "nonce" value
authenticatedDataoptional additional authenticated data

Parameter (out)

ParameterBeschreibung
dataOutan output data buffer that contains en-/decrypted data

Parameter (in/out)

ParameterBeschreibung
tagfor decryption: an input data buffer that contains the authentication tag. for encryption: an output data buffer that the authentication tag is written to.

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single shot processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting or returning an IV
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided input buffer, authentication tag, or IV is invalid
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the data or IV output buffer is too small
ara::crypto::CryptoErrc::kAuthTagNotValidrollback_semantics if the transformDirection is kDecrypt and the processed data cannot be authenticated

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50079
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50079@rel:R25-11#b4dd6f9f
Content hash
b4dd6f9f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50079
Status: valid/unmigrated Version: rel:R25-11#971c6b5c 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_50079@rel:R25-11#971c6b5c
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

функция SetKey [SWS_CRYPT_23911] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

virtual ara::core::Result< void > SetKey (SymmetricKey::Sptr key) noexcept=0;

The interface shall configure the context to use the provided SymmetricKey.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: c987f167a8b5 Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Метод SetKey конфигурирует экземпляр ara::crypto::cryp::AuthCipherCtx для использования переданного симметричного ключа [SWS_CRYPT_23911]. В качестве параметра передается shared pointer key (типа SymmetricKey::Sptr), который используется для аутентифицированного шифрования или расшифрования [SWS_CRYPT_23911]. Вызов происходит синхронно, объявлен как noexcept и возвращает ara::core::Result<void> [SWS_CRYPT_23911].

В случае ошибки результат сбрасывается с семантикой отката и возвращает специфические коды ошибок [SWS_CRYPT_23911]:

  • ara::crypto::CryptoErrc::kUnsupported: если контекст поддерживает конфигурацию исключительно через KeySlot [SWS_CRYPT_23911].
  • ara::crypto::CryptoErrc::kIncompatibleObject: если переданный тип ключа несовместим с текущим контекстом [SWS_CRYPT_23911].
  • ara::crypto::CryptoErrc::kUsageViolation: если разрешенные флаги использования ключа не содержат kAllowDataEncrypt для шифрования или kAllowDataDecrypt для расшифрования [SWS_CRYPT_23911].

Согласно спецификации интерфейс классифицирован как потокобезопасный (thread-safe) и безопасный относительно исключений (exception safe) [SWS_CRYPT_23911]. Во взаимодействии с контекстом модуля ключ, вероятно, должен устанавливаться до инициализации нового преобразования через Start [SWS_CRYPT_24715]. Вопрос Q-11f7daa370f5d438 (открытый)

Данное указание по использованию было сгенерировано автоматически на основе полезной нагрузки AUTOSAR.

Руководство разработчика реализации в подготовке (сложность I2)

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

Parameter (in)

ParameterBeschreibung
keysymmetric key object used for authenticated en-/decryption

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a KeySlot
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided SymmetricKey is incompatible with this AuthCipher Ctx
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the provided SymmetricKey does not include kAllowDataEncrypt for encryption, or kAllowDataDecrypt for decryption, respectively

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

Record
AUTOSAR/AP/record/SWS_CRYPT_23911
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_23911@rel:R25-11#abe615d6
Content hash
abe615d6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_23911
Status: valid/unmigrated Version: rel:R25-11#205c09dd 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_23911@rel:R25-11#205c09dd
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#7fa81c372026-09-30
  • R19-11rel:R19-11#fcb0604e2026-10-14
  • R20-11rel:R20-11#43c209ac2026-10-14
  • R21-11rel:R21-11#9babec8c2026-10-14
  • R22-11rel:R22-11#a5a2e9812026-10-14
  • R23-11rel:R23-11#1982ebed2026-10-14
  • R24-11rel:R24-11#3524b4832026-10-14
  • R25-11rel:R25-11#205c09dd2026-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

функция SetKey [SWS_CRYPT_50072] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0;

The interface shall configure the context to use the key stored in the provided KeySlot when the authenticated encrypt or decrypt operation is executed.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 44d0d6c36fa2 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Функция SetKey в интерфейсе ara::crypto::cryp::AuthCipherCtx конфигурирует контекст для криптографических операций таким образом, чтобы использовался симметричный ключ, сохраненный в предоставленном слоте ключа, как только будет выполняться аутентифицированное шифрование или дешифрование [SWS_CRYPT_50072].

Использование: синхронный вызов выполняется через интерфейс из ara/crypto/cryp/auth_cipher_ctx.h. В качестве параметра keySlot передается экземпляр KeySlot::Sptr, который инкапсулирует симметричный ключ [SWS_CRYPT_50072]. Функция возвращает ara::core::Result<void>, который подтверждает успех или содержит код ошибки [SWS_CRYPT_50072].

Обработка ошибок: если конкретная реализация контекста поддерживает исключительно прямую конфигурацию через объект SymmetricKey и не предлагает установку через KeySlot, вызов завершается сбоем. В этом случае возвращается ошибка ara::crypto::CryptoErrc::kUnsupported с семантикой отката [SWS_CRYPT_50072].

Параллелизм и ограничения: функция специфицирована как thread-safe и exception safe [SWS_CRYPT_50072]. Ее можно вызывать параллельно, и она гарантирует, что в исключительных ситуациях не останется несогласованного состояния.

Взаимодействие: в качестве функциональной альтернативы доступна перегрузка SetKey с прямым SymmetricKey::Sptr [SWS_CRYPT_23911]. После выполнения привязки ключа контекст инициализируется через Start с направлением операции, а также вектором инициализации [SWS_CRYPT_24715]. Аналогичные сигнатуры с KeySlot::Sptr также существуют в MessageAuthnCodeCtx [SWS_CRYPT_50026] и SymmetricKeyWrapperCtx [SWS_CRYPT_50034].

Этот текст был создан ИИ и основан на спецификации AUTOSAR R25-11.

Руководство разработчика реализации в подготовке (сложность I2)

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

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a symmetric key

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a SymmetricKey

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50072
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50072@rel:R25-11#f1bf7131
Content hash
f1bf7131
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50072
Status: valid/unmigrated Version: rel:R25-11#3dd5795a 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_50072@rel:R25-11#3dd5795a
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

функция Start [SWS_CRYPT_24715] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start (CryptoTransform transform Direction, ReadOnlyMemRegion iv) noexcept=0;

Initialize the context for a new encryption or decryption and set the IV used by the context.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: da3f0fb3ff33 Происхождение Открытые вопросы (1)
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Метод Start инициализирует контекст ara::crypto::cryp::AuthCipherCtx для нового шифрования или расшифрования и задает используемый вектор инициализации (IV) или значение nonce [SWS_CRYPT_24715]. С помощью параметра transformDirection определяется направление преобразования, тогда как iv передает вектор как ReadOnlyMemRegion [SWS_CRYPT_24715]. Допустимый размер IV можно определить через GetMinimumInputIvSize() и GetMaximumInputIvSize(); при отклонении длины функция сообщает об ошибке ara::crypto::CryptoErrc::kInvalidInputSize [SWS_CRYPT_24715].

Перед вызовом должен быть успешно выполнен метод SetKey, иначе возвращается ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_24715]. Сконфигурированный KeySlot не должен быть ни пустым (EmptyKeySlot), ни занятым (ara::crypto::CryptoErrc::kBusyResource) [SWS_CRYPT_24715]. Кроме того, сохраненный ключ должен быть подходящим SymmetricKey (иначе ara::crypto::CryptoErrc::kIncompatibleObject) и иметь права для требуемого направления (kAllowDataEncrypt или kAllowDataDecrypt, иначе ara::crypto::CryptoErrc::kUsageViolation) [SWS_CRYPT_24715]. Если поддержка потоковой обработки или установки IV в выбранном направлении отсутствует, вызов завершается с ошибкой ara::crypto::CryptoErrc::kUnsupported [SWS_CRYPT_24715]. Все ошибки обладают семантикой отката [SWS_CRYPT_24715].

Операция объявлена как thread-safe, а также exception-safe (noexcept) [SWS_CRYPT_24715]. Во взаимодействии криптографических процессов после успешной инициализации обычно следует передача дополнительных аутентифицированных данных через UpdateAuthenticatedData [SWS_CRYPT_20313]. Вопрос Q-e023e27f1cd24507 (открытый)

Это указание по использованию было создано автоматически на основе релиза AUTOSAR R25-11.

Руководство разработчика реализации в подготовке (сложность I1)

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption
ivan Initialization Vector (IV) or "nonce" value. The allowed size of the IV can be queried using the functions GetMinimumInputIvSize() and GetMaximumInputIvSize().

Rückgabewert

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

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context does not support setting an IV in the given transform Direction
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if the configured KeySlot is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided IV is not supported

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

Record
AUTOSAR/AP/record/SWS_CRYPT_24715
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_24715@rel:R25-11#539c37f7
Content hash
539c37f7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_24715
Status: valid/unmigrated Version: rel:R25-11#dacbb482 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_24715@rel:R25-11#dacbb482
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#85d3f6962026-09-30
  • R19-11rel:R19-11#ea0e49642026-10-14
  • R20-11rel:R20-11#e9fc84162026-10-14
  • R21-11rel:R21-11#a59d78ec2026-10-14
  • R22-11rel:R22-11#dca7e5782026-10-14
  • R23-11rel:R23-11#640bb79c2026-10-14
  • R24-11rel:R24-11#f389a1072026-10-14
  • R25-11rel:R25-11#dacbb4822026-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

функция Start [SWS_CRYPT_50073] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start (CryptoTransform transform Direction) noexcept=0;

Initialize the context for a new encryption or decryption. An IV is either not required for this context in this transformation direction, or set by the context itself.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: f698e30e2198 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Использование

Чисто виртуальный метод Start класса ara::crypto::cryp::AuthCipherCtx синхронно инициализирует контекст для предстоящего шифрования или дешифрования [SWS_CRYPT_50073]. Через параметр transformDirection указывается, подготавливается ли контекст для шифрования или дешифрования. Эту перегрузку без вектора инициализации (IV) разрешается использовать только в том случае, если криптографический контекст в выбранном направлении преобразования не требует IV или определяет его самостоятельно [SWS_CRYPT_50073]. Возвращаемым значением является пустой ara::core::Result<void> в случае успеха или соответствующий код ошибки.

Обработка ошибок и предварительные условия

Перед вызовом контекст должен быть успешно сконфигурирован с ключом через SetKey; в противном случае функция завершается неудачно с ara::crypto::CryptoErrc::kUninitializedContext [SWS_CRYPT_50073]. Кроме того, в случае ошибки возникают следующие возвращаемые значения:

  • ara::crypto::CryptoErrc::kUnsupported, если потоковая обработка не поддерживается контекстом или если контекст в выбранном направлении преобразования строго требует явного указания IV [SWS_CRYPT_50073].
  • ara::crypto::CryptoErrc::kUsageViolation, если разрешенное использование ключа в сконфигурированном KeySlot на момент вызова не включает необходимое право доступа kAllowDataEncrypt для шифрования или kAllowDataDecrypt для дешифрования [SWS_CRYPT_50073].
  • EmptyKeySlot или ara::crypto::CryptoErrc::kBusyResource, если сконфигурированный KeySlot в настоящее время пуст или заблокирован [SWS_CRYPT_50073].
  • ara::crypto::CryptoErrc::kIncompatibleObject, если сконфигурированный KeySlot не содержит SymmetricKey или этот тип ключа не поддерживается контекстом [SWS_CRYPT_50073].

При возникновении ошибки действует специфицированная семантика отката (rollback_semantics) [SWS_CRYPT_50073].

Параллелизм и взаимодействие

Функция объявлена с noexcept=0, гарантирует безопасность исключений и рассчитана на потокобезопасность [SWS_CRYPT_50073]. Если алгоритм требует внешнего предоставления вектора инициализации, вместо этого следует использовать перегрузку Start(CryptoTransform, ReadOnlyMemRegion) [SWS_CRYPT_24715]. После успешной инициализации дополнительные аутентифицированные данные могут быть включены в вычисление тега аутентификации через UpdateAuthenticatedData [SWS_CRYPT_20313].

Это указание по использованию сгенерировано автоматически на основе спецификации AUTOSAR Adaptive R25-11.

Руководство разработчика реализации в подготовке (сложность I1)

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

Parameter (in)

ParameterBeschreibung
transformDirectionthe transformation direction, i.e., encryption or decryption

Rückgabewert

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

Fehler

FehlercodeBeschreibung
EmptyKeySlotif a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context requires setting an IV in the given transformDirection
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if SetKey has not been successfully called before
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics if a KeySlot has been configured, but is currently busy
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the SymmetricKey deployed or contained in the provided KeySlot at the time of invocation of this interface does not include kAllowDataEncrypt for encryption, or kAllowData Decrypt for decryption, respectively
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but does not contain a Symmetric Key
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if a KeySlot has been configured, but the SymmetricKey contained is not supported by this context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50073
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50073@rel:R25-11#4fd65dda
Content hash
4fd65dda
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50073
Status: valid/unmigrated Version: rel:R25-11#24eaa91a 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_50073@rel:R25-11#24eaa91a
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

функция UpdateAuthenticatedData [SWS_CRYPT_20313] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > UpdateAuthenticatedData (ReadOnlyMem Region authenticatedData) noexcept=0;

Update the tag calculation by a new chunk of additional authenticated data.

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: f3852a997444 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Метод UpdateAuthenticatedData интерфейса ara::crypto::cryp::AuthCipherCtx служит для того, чтобы пошагово обновлять вычисление тега аутентификации очередным фрагментом дополнительных аутентифицированных данных (Additional Authenticated Data) [SWS_CRYPT_20313]. Через параметр authenticatedData соответствующий буфер передаётся как ReadOnlyMemRegion [SWS_CRYPT_20313].

В отношении контекста вызова и параллелизма операция определена как thread-safe, а также exception safe [SWS_CRYPT_20313]. Для вызова действуют строгие условия порядка выполнения:

  • Трансформация должна быть предварительно инициирована через метод Start(), в противном случае сообщается о ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_20313].
  • Функцию больше нельзя вызывать, если UpdateConfidentialData уже был выполнен; в случае несоблюдения возвращается ошибка ara::crypto::CryptoErrc::kInvalidUsageOrder [SWS_CRYPT_20313].

В качестве возвращаемого значения функция предоставляет ara::core::Result<void>, который в случае успеха пуст или инкапсулирует возникший код ошибки [SWS_CRYPT_20313]. Все ошибки обладают семантикой отката (rollback) [SWS_CRYPT_20313]:

  • ara::crypto::CryptoErrc::kInvalidInputSize: размер переданного входного буфера недопустим [SWS_CRYPT_20313].
  • ara::crypto::CryptoErrc::kUnsupported: потоковая обработка не поддерживается текущим контекстом [SWS_CRYPT_20313].

Этот текст сгенерирован ИИ и служит в качестве справочного материала. Обязательную силу имеет спецификация AUTOSAR.

Руководство разработчика реализации в подготовке (сложность I1)

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

Parameter (in)

ParameterBeschreibung
authenticatedDataa part of the additional authenticated data

Rückgabewert

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

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the processing was not initiated by a call of the Start() method
ara::crypto::CryptoErrc::kInvalidUsageOrderrollback_semantics if UpdateConfidentialData has already been called
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer is invalid
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20313
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20313@rel:R25-11#2441a9fe
Content hash
2441a9fe
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20313
Status: valid/unmigrated Version: rel:R25-11#fcb70f91 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_20313@rel:R25-11#fcb70f91
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e6b736912026-09-30
  • R19-11rel:R19-11#f75b41ea2026-10-14
  • R20-11rel:R20-11#4c46c8f42026-10-14
  • R21-11rel:R21-11#50979c0c2026-10-14
  • R22-11rel:R22-11#f4a00d3a2026-10-14
  • R23-11rel:R23-11#a528f60f2026-10-14
  • R24-11rel:R24-11#7dfc69482026-10-14
  • R25-11rel:R25-11#fcb70f912026-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

функция UpdateConfidentialData [SWS_CRYPT_50074] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > UpdateConfidentialData (Read OnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Encrypt or decrypt confidential data. When used for decryption, the plaintext is returned without verifying its authenticity. An application must not use the data before verifying its authenticity using Finish().

СОЗДАНО ИИ не проверено Модель: gemini-3.8-flash-medium · Усилие: medium · Температура: не регулируется · Промпт: 0a7976c267f4 Происхождение
переведено с немецкого руководстваgemini-3.8-flash-low · 2026-10-13 · Немецкий оригинал

Метод UpdateConfidentialData класса ara::crypto::cryp::AuthCipherCtx служит для пошагового шифрования или расшифрования конфиденциальных полезных данных в рамках контекста аутентифицированного шифрования [SWS_CRYPT_50074]. Ему передаются входной буфер in (тип ReadOnlyMemRegion) с частью открытого или зашифрованного текста, а также выходной буфер out (тип ReadWriteMemRegion) [SWS_CRYPT_50074]. В качестве синхронного возвращаемого значения функция возвращает ara::core::Result<std::size_t>, которое при успехе содержит фактически записанное количество байтов; оно может быть меньше ёмкости out [SWS_CRYPT_50074].

В отношении хода выполнения и параллелизма действуют следующие условия:

  • Порядок выполнения и целостность: перед обработкой операция должна быть инициирована через Start() [SWS_CRYPT_50074]. Если метод используется для расшифрования, открытый текст выдаётся без предварительной проверки подлинности; приложению категорически запрещено использовать эти данные до завершающей верификации с помощью Finish() [SWS_CRYPT_50074]. Дополнительные аутентифицированные данные могут параллельно поступать в вычисление тега через UpdateAuthenticatedData [SWS_CRYPT_20313].
  • Потокобезопасность и безопасность исключений: операция объявлена как thread-safe, а также exception-safe и не генерирует исключений (noexcept) [SWS_CRYPT_50074].

В случае сбоя обработки применяется семантика отката с возвратом соответствующего кода ошибки в ara::core::Result [SWS_CRYPT_50074]:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: обработка ещё не была инициирована через Start() [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: выходной буфер out имеет слишком малый размер [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kInvalidInputSize: размер буфера in недопустим [SWS_CRYPT_50074].
  • ara::crypto::CryptoErrc::kUnsupported: потоковая обработка не поддерживается контекстом [SWS_CRYPT_50074].

Этот текст был сгенерирован ИИ на основе спецификации AUTOSAR R25-11.

Руководство разработчика реализации в подготовке (сложность I1)

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

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the ciphertext or plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted or decrypted data is written too

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer is invalid
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

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

Record
AUTOSAR/AP/record/SWS_CRYPT_50074
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50074@rel:R25-11#32fe9d3a
Content hash
32fe9d3a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50074
Status: valid/unmigrated Version: rel:R25-11#342cdc85 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_50074@rel:R25-11#342cdc85
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

Документация псевдонимов типов

псевдоним типа Sptr [SWS_CRYPT_20101] Upstream: RS_CRYPTO_02207

using Sptr = std::shared_ptr<AuthCipherCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/auth_cipher_ctx.h"
Scopeclass ara::crypto::cryp::AuthCipherCtx
SymbolSptr

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20101
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20101@rel:R25-11#b5ec8b05
Content hash
b5ec8b05
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20101
Status: valid/unmigrated Version: rel:R25-11#56d76308 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_20101@rel:R25-11#56d76308
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#6cded4ce2026-09-30
  • R19-11rel:R19-11#d499b7852026-10-14
  • R20-11rel:R20-11#38ae99fd2026-10-14
  • R21-11rel:R21-11#15df77a52026-10-14
  • R22-11rel:R22-11#22ad2b2d2026-10-14
  • R23-11rel:R23-11#d20afa502026-10-14
  • R24-11rel:R24-11#d20afa502026-10-14
  • R25-11rel:R25-11#56d763082026-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