Skip to content
Discussion options

You must be logged in to vote

To print the session keys edit the function static async create<T> in the file
/matter.js/packages/matter.js/src/session/SecureSession.ts in static async create(args: {

after this line: https://github.com/project-chip/matter.js/blob/0fb55780a0b260ed04dfcce718b3d2d8e0d13458/packages/matter.js/src/session/SecureSession.ts#L77
add the logging statement

logger.debug(`Session keys for ${isResumption ? "resumption" : "establishment"}: decrypt=${decryptKey.toHex()}, encrypt=${encryptKey.toHex()}, attestation=${attestationKey.toHex()}`,
);

When performing commissioning and working with the node, multiple session key logs will be created. They will look like:

2024-02-14 18:13:29.055 DEBUG SecureS…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Apollon77
Comment options

@potto216
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by potto216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants