Download Secure Key Box User Guide

Transcript
Secure Key Box User Guide
7 API Reference
Parameter
Description
self
Pointer to the previously created SKB_KeyAgreement object, which
contains all the necessary parameters.
public_key_buffer
This parameter is either NULL or a pointer to the memory buffer
where the public key will be stored.
If this parameter is NULL, the method returns, in
public_key_buffer_size, a number of bytes sufficient to hold the
public key, and returns SKB_SUCCESS.
If this parameter points to a memory buffer (it is not NULL), and the
buffer size public_key_buffer_size is large enough to hold the
public key, the method stores the output there and sets
public_key_buffer_size to the exact number of bytes stored. If
the buffer is not large enough, the method sets
public_key_buffer_size to a number of bytes that would be
sufficient, and returns SKB_ERROR_BUFFER_TOO_SMALL.
For the SKB_KEY_AGREEMENT_ALGORITHM_ECDH algorithm, the public
key is stored using the format described in §8.5.
For the SKB_KEY_AGREEMENT_ALGORITHM_PRIME_DH algorithm, the
buffer size is 128 bytes, and it stores the public value encoded in
big-endian.
public_key_buffer_size
Pointer to a variable that holds the size of the memory buffer in
bytes where the public key is to be stored. For more details, see the
description of the public_key_buffer parameter.
7.9.26 SKB_KeyAgreement_ComputeSecret
This method takes the public key received from the other party of the key agreement algorithm and
computes the shared secret.
The method is declared as follows:
SKB_Result
SKB_KeyAgreement_ComputeSecret(SKB_KeyAgreement*
const SKB_Byte*
SKB_Size
SKB_Size
SKB_SecureData**
self,
peer_public_key,
peer_public_key_size,
secret_size,
secret);
The following table explains the parameters:
Copyright © 2000-2015, whiteCryption Corporation. All rights reserved.
Copyright © 2004-2015, Intertrust Technologies Corporation. All rights reserved.
Page 103 of 137