SEcube
SEcube Open Source Library - Device
Functions
se3_cmd1_login.c File Reference

L1 handlers for login operations. More...

#include "se3_cmd1_login.h"
#include "se3_rand.h"

Functions

uint16_t L1d_challenge (uint16_t req_size, const uint8_t *req, uint16_t *resp_size, uint8_t *resp)
 Get a login challenge from the server. More...
 
uint16_t L1d_login (uint16_t req_size, const uint8_t *req, uint16_t *resp_size, uint8_t *resp)
 respond to challenge, completing login More...
 
uint16_t L1d_logout (uint16_t req_size, const uint8_t *req, uint16_t *resp_size, uint8_t *resp)
 Log out and release resources. More...
 

Detailed Description

L1 handlers for login operations.

Author
Nicola Ferri

Function Documentation

uint16_t L1d_challenge ( uint16_t  req_size,
const uint8_t *  req,
uint16_t *  resp_size,
uint8_t *  resp 
)

Get a login challenge from the server.

L1 CHALLENGE command handler.

challenge : (cc1[32], cc2[32], access:ui16) => (sc[32], sresp[32])

uint16_t L1d_login ( uint16_t  req_size,
const uint8_t *  req,
uint16_t *  resp_size,
uint8_t *  resp 
)

respond to challenge, completing login

L1 LOGIN command handler.

login : (cresp[32]) => (tok[16])

uint16_t L1d_logout ( uint16_t  req_size,
const uint8_t *  req,
uint16_t *  resp_size,
uint8_t *  resp 
)

Log out and release resources.

L1 LOGOUT command handler.

logout : () => ()