KNX IoT
KNX IoT Point API stack implementation
oc_auth_at_t Struct Reference

Access Token (at) Information payload for a unicast message Example(JSON): More...

#include <oc_knx_sec.h>

Data Fields

oc_string_t aud
 not used anymore, references
More...
 
int64_t * ga
 (scope) array of group addresses, for the group objects in the scope, int64_t for framing arrays More...
 
int ga_len
 length of the group addresses (ga) in the scope More...
 
oc_string_t id
 (0) auth/at/{id}, encoding: HEX More...
 
oc_string_t kid
 (8:2) DTLS (not used) cnf:kid More...
 
int nbf
 token not valid before (optional) More...
 
uint8_t osc_alg
 (18:4:4) OSCORE cnf:osc:alg (optional- not used) default: decimal value 10 More...
 
oc_string_t osc_contextid
 (18:4:6) OSCORE cnf:osc:contextid used as "kid_context" (byte string, 6 bytes) More...
 
uint8_t osc_hkdf
 (18:4:3) OSCORE cnf:osc:hkdf (optional-not used) (decimal value) More...
 
oc_string_t osc_id
 (18:4:0) OSCORE cnf:osc:id (used as SID & KID) (byte string), max 7 bytes More...
 
oc_string_t osc_ms
 (18:4:2) OSCORE cnf:osc:ms (byte string) More...
 
oc_string_t osc_rid
 (18:4:7) OSCORE cnf:osc:rid (recipient ID) (byte string) More...
 
oc_string_t osc_salt
 (18:4:5) OSCORE cnf:osc:salt (optional) empty string More...
 
oc_string_t osc_version
 (18:4:1) OSCORE cnf:osc:version (optional) More...
 
oc_at_profile_t profile
 (38) "coap_oscore" or "coap_dtls", only oscore implemented More...
 
oc_interface_mask_t scope
 (9) the scope (interfaces) More...
 
oc_string_t sub
 (2) DTLS (not used) 2 sub More...
 

Detailed Description

Access Token (at) Information payload for a unicast message Example(JSON):

*{
"id": "OC5BLLhkAG ...",
"profile": "coap_oscore",
"aud" : "<iid>.<ia>"
"scope": ["if.sec", "if.b"],
"cnf": {
"osc": {
"alg": "AES-CCM-16-64-128", (decimal 10)
"id": "<kid>/<sid>",
"rid": "SID for response",
"ms": "f9af8s.6bd94e6f"
}}}

second example of (JSON) payload for a group address:

*{
"id": "OC5BLLhkAG ...",
"profile": "coap_oscore",
"scope": [0, 1, 2],
"cnf": {
"osc": {
"alg": "AES-CCM-16-64-128",
"id": "<kid>/<sid>",
"ms": "f9af8s.6bd94e6f"
}}}

scope : "coap_oscore" [OSCORE] or "coap_dtls"

name CBOR key CBOR type mandatory
id 0 string yes
profile 38 unsigned yes
scope 9 string/int array yes
cnf 8 map yes
osc 4 map oscore
kid 2 string optional
nbf 5 integer optional
sub 2 string conditional

Specific oscore values (ACE):

https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-19#section-3.2.1

name CBOR label CBOR type description default value
id 0 string full ctx identifier -
ms 18:4:2 byte string Master Secret value (shall be PSK) -
version 18:4:1 uint OSCORE Version 1
hkdf 18:4:3 integer HKDF value HKDF SHA-256 (-10)
alg 18:4:4 integer AEAD Algorithm AES-CCM-16-64-128 (10)
salt 18:4:5 byte string Master Salt Default empty byte

string | | contextId | 18:4:6 | byte string | OSCORE ID Context value | omit | | osc_id | 18:4:0 | byte string | OSCORE SID | - |

Example payload:

{
"alg" : "AES-CCM-16-64-128",
"id" : b64'AQ=='
"ms" : b64'+a+Dg2jjU+eIiOFCa9lObw'
}

Note: maps are not stored.

Definition at line 131 of file oc_knx_sec.h.

Field Documentation

◆ aud

oc_string_t aud

not used anymore, references

Definition at line 137 of file oc_knx_sec.h.

◆ ga

int64_t* ga

(scope) array of group addresses, for the group objects in the scope, int64_t for framing arrays

Definition at line 157 of file oc_knx_sec.h.

◆ ga_len

int ga_len

length of the group addresses (ga) in the scope

Definition at line 156 of file oc_knx_sec.h.

◆ id

oc_string_t id

(0) auth/at/{id}, encoding: HEX

Definition at line 133 of file oc_knx_sec.h.

◆ kid

oc_string_t kid

(8:2) DTLS (not used) cnf:kid

Definition at line 139 of file oc_knx_sec.h.

◆ nbf

int nbf

token not valid before (optional)

Definition at line 155 of file oc_knx_sec.h.

◆ osc_alg

uint8_t osc_alg

(18:4:4) OSCORE cnf:osc:alg (optional- not used) default: decimal value 10

Definition at line 144 of file oc_knx_sec.h.

◆ osc_contextid

oc_string_t osc_contextid

(18:4:6) OSCORE cnf:osc:contextid used as "kid_context" (byte string, 6 bytes)

Definition at line 148 of file oc_knx_sec.h.

◆ osc_hkdf

uint8_t osc_hkdf

(18:4:3) OSCORE cnf:osc:hkdf (optional-not used) (decimal value)

Definition at line 142 of file oc_knx_sec.h.

◆ osc_id

oc_string_t osc_id

(18:4:0) OSCORE cnf:osc:id (used as SID & KID) (byte string), max 7 bytes

Definition at line 151 of file oc_knx_sec.h.

◆ osc_ms

oc_string_t osc_ms

(18:4:2) OSCORE cnf:osc:ms (byte string)

Definition at line 141 of file oc_knx_sec.h.

◆ osc_rid

oc_string_t osc_rid

(18:4:7) OSCORE cnf:osc:rid (recipient ID) (byte string)

Definition at line 154 of file oc_knx_sec.h.

◆ osc_salt

oc_string_t osc_salt

(18:4:5) OSCORE cnf:osc:salt (optional) empty string

Definition at line 147 of file oc_knx_sec.h.

◆ osc_version

oc_string_t osc_version

(18:4:1) OSCORE cnf:osc:version (optional)

Definition at line 140 of file oc_knx_sec.h.

◆ profile

oc_at_profile_t profile

(38) "coap_oscore" or "coap_dtls", only oscore implemented

Definition at line 136 of file oc_knx_sec.h.

◆ scope

(9) the scope (interfaces)

Definition at line 134 of file oc_knx_sec.h.

◆ sub

oc_string_t sub

(2) DTLS (not used) 2 sub

Definition at line 138 of file oc_knx_sec.h.


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