ri_ctx Struct Reference

Context for the Restricted Identification protocol. More...

`#include <eac.h>`

## Data Fields

int | protocol
| Identifier of the hash function to use. More...
int | id
| identifier of this RI context
const EVP_MD * | md
| Digest to use for derivation of I^{sector}_{ID}.
BUF_MEM *(* | generate_key )(EVP_PKEY *key, BN_CTX *bn_ctx)
| Generates a key pair for key agreement. More...
BUF_MEM *(* | compute_key )(EVP_PKEY *key, const BUF_MEM *in, BN_CTX *bn_ctx)
| Completes a key agreement by computing the shared secret. More...
EVP_PKEY * | static_key
| PICC's static domain parameters.

## Detailed Description

Context for the Restricted Identification protocol.

Definition at line 199 of file eac.h.

## Field Documentation

## compute_key

BUF_MEM*(* ri_ctx::compute_key) (EVP_PKEY *key, const BUF_MEM *in, BN_CTX *bn_ctx)

Completes a key agreement by computing the shared secret.

Parameters

  [in] | key | Object for key computation, usually `&KA_CTX.key`
  [in] | in | Public key from the other party
  [in] | bn_ctx | (optional)

Returns
  Shared secret or NULL in case of an error

Definition at line 238 of file eac.h.

## generate_key

BUF_MEM*(* ri_ctx::generate_key) (EVP_PKEY *key, BN_CTX *bn_ctx)

Generates a key pair for key agreement.

Parameters

  [in] | key | Object for key generation, usually `&KA_CTX.key`
  [in] | bn_ctx | (optional)

Returns
  Public key or NULL in case of an error

Definition at line 228 of file eac.h.

## protocol

int ri_ctx::protocol

Identifier of the hash function to use.

see tr 03110 p. 60

- `NID_id_RI_DH_SHA_1`
- `NID_id_RI_DH_SHA_224`
- `NID_id_RI_DH_SHA_256`
- `NID_id_RI_DH_SHA_384`
- `NID_id_RI_DH_SHA_512`
- `NID_id_RI_ECDH_SHA_1`
- `NID_id_RI_ECDH_SHA_224`
- `NID_id_RI_ECDH_SHA_256`
- `NID_id_RI_ECDH_SHA_384`
- `NID_id_RI_ECDH_SHA_512`

Definition at line 215 of file eac.h.

The documentation for this struct was generated from the following file:

- eac/eac.h