generateAs2805KekValidation method
- required As2805KekValidationType kekValidationType,
- required String keyIdentifier,
- required RandomKeySendVariantMask randomKeySendVariantMask,
Generates a KekValidationRequest or a
KekValidationResponse for node-to-node initialization between
payment processing nodes using Australian
Standard 2805 (AS2805).
During node-to-node initialization, both communicating nodes must validate that they possess the correct Key Encrypting Keys (KEKs) before proceeding with session key exchange. In AS2805, the sending KEK (KEKs) of one node corresponds to the receiving KEK (KEKr) of its partner node. Each node uses its KEK to encrypt and decrypt session keys exchanged between the nodes. A KEK can be created or imported into Amazon Web Services Payment Cryptography using either the CreateKey or ImportKey operations.
To use GenerateAs2805KekValidation to generate a KEK
validation request, set KekValidationType to
KekValidationRequest. This operation returns both
RandomKeySend (KRs) and RandomKeyReceive (KRr)
as response values. The partnering node receives the KRs, uses its KEKr to
decrypt it, and generates a KRr which is an inverted value of KRs. The
node receiving the KRr validates it against its own KRr generated during
KEK validation request outside of Amazon Web Services Payment
Cryptography.
You can also use this operation to generate a KEK validation response, by
setting KekValidationType to
KekValidationResponse and providing the incoming KRs. This
operation then calculates a KRr. To learn more about more about
node-to-node initialization, see Validation
of KEK in the Amazon Web Services Payment Cryptography User
Guide.
For information about valid keys for this operation, see Understanding key attributes and Key types for specific data operations in the Amazon Web Services Payment Cryptography User Guide.
Cross-account use: This operation supports cross-account use when the key has a resource-based policy that grants access. For more information, see Resource-based policies.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter kekValidationType :
Defines whether to generate a KEK validation request or KEK validation
response for node-to-node initialization.
Parameter keyIdentifier :
The keyARN of sending KEK that Amazon Web Services Payment
Cryptography uses for node-to-node initialization
Parameter randomKeySendVariantMask :
The key variant to use for generating a random key for KEK validation
during node-to-node initialization.
Implementation
Future<GenerateAs2805KekValidationOutput> generateAs2805KekValidation({
required As2805KekValidationType kekValidationType,
required String keyIdentifier,
required RandomKeySendVariantMask randomKeySendVariantMask,
}) async {
final $payload = <String, dynamic>{
'KekValidationType': kekValidationType,
'KeyIdentifier': keyIdentifier,
'RandomKeySendVariantMask': randomKeySendVariantMask.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/as2805kekvalidation/generate',
exceptionFnMap: _exceptionFns,
);
return GenerateAs2805KekValidationOutput.fromJson(response);
}