OpenPACE
Functions
Protocol Steps for Password Authenticated Connection Establishment

Functions

BUF_MEM * PACE_STEP1_enc_nonce (const EAC_CTX *ctx, const PACE_SEC *pi)
 Generates and encrypts a nonce. More...
 
int PACE_STEP2_dec_nonce (const EAC_CTX *ctx, const PACE_SEC *pi, const BUF_MEM *enc_nonce)
 Decrypt the nonce from the other party. More...
 
BUF_MEM * PACE_STEP3A_generate_mapping_data (const EAC_CTX *ctx)
 Generate a mapping data to perform the mapping to ephemeral domain parameters. More...
 
int PACE_STEP3A_map_generator (const EAC_CTX *ctx, const BUF_MEM *in)
 Map to the ephemeral domain parameters. More...
 
BUF_MEM * PACE_STEP3B_generate_ephemeral_key (EAC_CTX *ctx)
 Generate a keypair for key agreement. More...
 
int PACE_STEP3B_compute_shared_secret (const EAC_CTX *ctx, const BUF_MEM *in)
 Compute the shared secret for key agreement. More...
 
int PACE_STEP3C_derive_keys (const EAC_CTX *ctx)
 Derives encryption and authentication keys. More...
 
BUF_MEM * PACE_STEP3D_compute_authentication_token (const EAC_CTX *ctx, const BUF_MEM *pub)
 Compute the authentication token from domain parameters and public key. More...
 
int PACE_STEP3D_verify_authentication_token (const EAC_CTX *ctx, const BUF_MEM *token)
 Verifies an authentication token. More...
 

Detailed Description

Function Documentation

◆ PACE_STEP1_enc_nonce()

BUF_MEM* PACE_STEP1_enc_nonce ( const EAC_CTX ctx,
const PACE_SEC pi 
)

Generates and encrypts a nonce.

Parameters
[in,out]ctxEAC context. The nonce is saved in ctx.
[in]piShared secret for PACE
Returns
the encrypted nonce on success or NULL in case of an error
See also
PACE's Protocol Specification

◆ PACE_STEP2_dec_nonce()

int PACE_STEP2_dec_nonce ( const EAC_CTX ctx,
const PACE_SEC pi,
const BUF_MEM *  enc_nonce 
)

Decrypt the nonce from the other party.

Parameters
[in,out]ctxEAC context The decrypted nonce is saved in ctx.
[in]piShared secret for PACE
[in]enc_nonceEncrypted nonce from the other party
Returns
1 on success or 0 in case of an error
See also
PACE's Protocol Specification

◆ PACE_STEP3A_generate_mapping_data()

BUF_MEM* PACE_STEP3A_generate_mapping_data ( const EAC_CTX ctx)

Generate a mapping data to perform the mapping to ephemeral domain parameters.

Parameters
[in,out]ctxEAC context
Returns
Mapping data to be transmitted to the other party or NULL in case of an error
See also
PACE's Protocol Specification

◆ PACE_STEP3A_map_generator()

int PACE_STEP3A_map_generator ( const EAC_CTX ctx,
const BUF_MEM *  in 
)

Map to the ephemeral domain parameters.

Parameters
[in,out]ctxEAC context
[in]inMapping data from the other party
Returns
1 on success or 0 in case of an error
See also
PACE's Protocol Specification

◆ PACE_STEP3B_compute_shared_secret()

int PACE_STEP3B_compute_shared_secret ( const EAC_CTX ctx,
const BUF_MEM *  in 
)

Compute the shared secret for key agreement.

Parameters
[in,out]ctxEAC context. The secret is saved in ctx.
[in]inPublic key from the other party
Returns
1 on success 0 in case of an error
See also
PACE's Protocol Specification

◆ PACE_STEP3B_generate_ephemeral_key()

BUF_MEM* PACE_STEP3B_generate_ephemeral_key ( EAC_CTX ctx)

Generate a keypair for key agreement.

Parameters
[in,out]ctxEAC context
Returns
Public key or NULL in case of an error
See also
PACE's Protocol Specification

◆ PACE_STEP3C_derive_keys()

int PACE_STEP3C_derive_keys ( const EAC_CTX ctx)

Derives encryption and authentication keys.

Parameters
[in,out]ctxEAC context. The keys are saved in ctx.
Returns
1 on success or 0 in case of an error
See also
PACE's Protocol Specification

◆ PACE_STEP3D_compute_authentication_token()

BUF_MEM* PACE_STEP3D_compute_authentication_token ( const EAC_CTX ctx,
const BUF_MEM *  pub 
)

Compute the authentication token from domain parameters and public key.

Parameters
[in]ctxEAC context
[in]pubPublic key from the other party (generated in PACE step 3b)
Returns
Authentication token or NULL in case of error
See also
PACE's Protocol Specification

◆ PACE_STEP3D_verify_authentication_token()

int PACE_STEP3D_verify_authentication_token ( const EAC_CTX ctx,
const BUF_MEM *  token 
)

Verifies an authentication token.

Parameters
[in]ctxEAC context
[in]tokenAuthentication token from the other party
Returns
1 if the token has been verified as correct, 0 if not or -1 in case of an error occurred.
See also
PACE's Protocol Specification