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

L1 handlers for login operations. More...

#include "se3c1.h"
#include "sha256.h"
#include "aes256.h"
#include "pbkdf2.h"

Go to the source code of this file.

Functions

uint16_t L1d_challenge (uint16_t req_size, const uint8_t *req, uint16_t *resp_size, uint8_t *resp)
 L1 CHALLENGE command handler. More...
 
uint16_t L1d_login (uint16_t req_size, const uint8_t *req, uint16_t *resp_size, uint8_t *resp)
 L1 LOGIN command handler. More...
 
uint16_t L1d_logout (uint16_t req_size, const uint8_t *req, uint16_t *resp_size, uint8_t *resp)
 L1 LOGOUT command handler. 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 
)

L1 CHALLENGE command handler.

Get a login challenge from the device

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 
)

L1 LOGIN command handler.

Respond to challenge and complete the 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 
)

L1 LOGOUT command handler.

Log out and release resources

L1 LOGOUT command handler.

logout : () => ()