circuitmatter.crypto

Attributes

SYMMETRIC_KEY_LENGTH_BITS

SYMMETRIC_KEY_LENGTH_BYTES

AEAD_MIC_LENGTH_BITS

AEAD_MIC_LENGTH_BYTES

AEAD_NONCE_LENGTH_BYTES

GROUP_SIZE_BITS

GROUP_SIZE_BYTES

PUBLIC_KEY_SIZE_BYTES

HASH_LEN_BITS

HASH_LEN_BYTES

HASH_BLOCK_LEN_BYTES

CERTIFICATE_SIZE

Classes

DNAttribute

BasicContraints

Extensions

SignatureAlgorithm

Enum where members are also (and must be) ints

PublicKeyAlgorithm

Enum where members are also (and must be) ints

EllipticCurveId

Enum where members are also (and must be) ints

MatterCertificate

Functions

Hash(→ bytes)

HMAC(→ bytes)

HKDF_Extract(→ bytes)

HKDF_Expand(→ bytes)

KDF(input_key, salt, info, length)

ECDH(→ bytes)

Module Contents

circuitmatter.crypto.SYMMETRIC_KEY_LENGTH_BITS = 128
circuitmatter.crypto.SYMMETRIC_KEY_LENGTH_BYTES = 16
circuitmatter.crypto.AEAD_MIC_LENGTH_BITS = 128
circuitmatter.crypto.AEAD_MIC_LENGTH_BYTES = 16
circuitmatter.crypto.AEAD_NONCE_LENGTH_BYTES = 13
circuitmatter.crypto.GROUP_SIZE_BITS = 256
circuitmatter.crypto.GROUP_SIZE_BYTES = 32
circuitmatter.crypto.PUBLIC_KEY_SIZE_BYTES
circuitmatter.crypto.HASH_LEN_BITS = 256
circuitmatter.crypto.HASH_LEN_BYTES = 32
circuitmatter.crypto.HASH_BLOCK_LEN_BYTES = 64
circuitmatter.crypto.CERTIFICATE_SIZE = 400
class circuitmatter.crypto.DNAttribute

Bases: circuitmatter.tlv.List

common_name
surname
serial_num
country_name
locality_name
state_or_province_name
org_name
org_unit_name
title
name
given_name
initials
gen_qualifier
dn_qualifier
pseudonym
domain_component
matter_node_id
matter_firmware_signing_id
matter_icac_id
matter_rcac_id
matter_fabric_id
matter_noc_cat
common_name_ps
surname_ps
serial_num_ps
country_name_ps
locality_name_ps
state_or_province_name_ps
org_name_ps
org_unit_name_ps
title_ps
name_ps
given_name_ps
initials_ps
gen_qualifier_ps
dn_qualifier_ps
pseudonym_ps
items = []
values
__iter__()
__str__()
encode() memoryview
encode_into(buffer: bytearray, offset: int = 0) int
classmethod from_value(value)
set_value(tag, value)
delete_value(tag)
copy()
classmethod max_length()
class circuitmatter.crypto.BasicContraints

Bases: circuitmatter.tlv.Structure

is_ca
path_len_constraint
__str__()
encode() memoryview
encode_into(buffer: bytearray, offset: int = 0) int
classmethod decode(buffer: memoryview, offset=0) Structure
classmethod decode_member(control_octet, buffer, offset=0, depth=0) tuple[dict, int]
construct_containers()
classmethod from_value(value)
values
classmethod max_length()
set_value(tag, value)
delete_value(tag)
class circuitmatter.crypto.Extensions

Bases: circuitmatter.tlv.List

basic_cnstr
key_usage
extended_key_usage
subject_key_id
authority_key_id
future_extension
items = []
values
__iter__()
__str__()
encode() memoryview
encode_into(buffer: bytearray, offset: int = 0) int
classmethod from_value(value)
set_value(tag, value)
delete_value(tag)
copy()
classmethod max_length()
class circuitmatter.crypto.SignatureAlgorithm

Bases: enum.IntEnum

Enum where members are also (and must be) ints

ECDSA_WITH_SHA256 = 1
class circuitmatter.crypto.PublicKeyAlgorithm

Bases: enum.IntEnum

Enum where members are also (and must be) ints

EC_PUB_KEY = 1
class circuitmatter.crypto.EllipticCurveId

Bases: enum.IntEnum

Enum where members are also (and must be) ints

PRIME256V1 = 1
class circuitmatter.crypto.MatterCertificate

Bases: circuitmatter.tlv.Structure

serial_num
sig_algo
issuer
not_before
not_after
subject
pub_key_algo
ec_curve_id
ec_pub_key
extensions
signature
__str__()
encode() memoryview
encode_into(buffer: bytearray, offset: int = 0) int
classmethod decode(buffer: memoryview, offset=0) Structure
classmethod decode_member(control_octet, buffer, offset=0, depth=0) tuple[dict, int]
construct_containers()
classmethod from_value(value)
values
classmethod max_length()
set_value(tag, value)
delete_value(tag)
circuitmatter.crypto.Hash(*message) bytes
circuitmatter.crypto.HMAC(key, message) bytes
circuitmatter.crypto.HKDF_Extract(salt, input_key) bytes
circuitmatter.crypto.HKDF_Expand(prk, info, length) bytes
circuitmatter.crypto.KDF(input_key, salt, info, length)
circuitmatter.crypto.ECDH(private_key: ecdsa.keys.SigningKey, public_key: bytes) bytes