Skip to content

Commit 46a87c3

Browse files
committed
Add Ascon capability advertisement and tracking fields
1 parent 9401a67 commit 46a87c3

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/helpers/AdvertDataHelpers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#define ADV_FEAT2_MASK 0x40 // FUTURE
1717
#define ADV_NAME_MASK 0x80
1818

19+
// FEAT1 bit flags (encoded when ADV_FEAT1_MASK is set)
20+
#define ADV_FEAT1_ASCON_CAPABLE 0x0001
21+
1922
class AdvertDataBuilder {
2023
uint8_t _type;
2124
bool _has_loc;

src/helpers/ClientACL.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct ClientInfo {
1818
uint8_t shared_secret[PUB_KEY_SIZE];
1919
uint32_t last_timestamp; // by THEIR clock (transient)
2020
uint32_t last_activity; // by OUR clock (transient)
21+
bool supports_ascon; // Peer advertised Ascon encryption capability in FEAT1 (transient)
2122
union {
2223
struct {
2324
uint32_t sync_since; // sync messages SINCE this timestamp (by OUR clock)

src/helpers/ContactInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ struct ContactInfo {
1010
uint8_t flags;
1111
int8_t out_path_len;
1212
mutable bool shared_secret_valid; // flag to indicate if shared_secret has been calculated
13+
bool supports_ascon; // Peer advertised Ascon encryption capability in FEAT1
1314
uint8_t out_path[MAX_PATH_SIZE];
1415
uint32_t last_advert_timestamp; // by THEIR clock
1516
uint32_t lastmod; // by OUR clock

0 commit comments

Comments
 (0)