pytropicsquare
 
Loading...
Searching...
No Matches
tropicsquare.ports.micropython.TropicSquareMicroPython Class Reference
Inheritance diagram for tropicsquare.ports.micropython.TropicSquareMicroPython:
tropicsquare.TropicSquare

Public Member Functions

 __init__ (self, spi, cs, gpo=None)
 
- Public Member Functions inherited from tropicsquare.TropicSquare
bytes certificate (self)
 
bytes public_key (self)
 
bytes chipid (self)
 
tuple riscv_fw_version (self)
 
tuple spect_fw_version (self)
 
 fw_bank (self)
 
bool start_secure_session (self, int pkey_index, bytes shpriv, bytes shpub)
 
bool abort_secure_session (self)
 
str get_log (self)
 
bytes ping (self, bytes data)
 L3 Commands #.
 
bytes get_random (self, int nbytes)
 
 get_serial_code (self)
 
 r_config_read (self, address)
 
 i_config_read (self, address)
 
bytes mem_data_read (self, int slot)
 
bool mem_data_write (self, bytes data, int slot)
 
bool mem_data_erase (self, int slot)
 
bool ecc_key_generate (self, int slot, int curve)
 
bytes ecc_key_store (self, int slot, int curve, bytes key)
 
tuple ecc_key_read (self, int slot)
 
bool ecc_key_erase (self, int slot)
 
tuple ecdsa_sign (self, int slot, bytes hash)
 
tuple eddsa_sign (self, int slot, bytes message)
 
bool mcounter_init (self, int index, int value)
 
bool mcounter_update (self, int index)
 
int mcounter_get (self, int index)
 
 mac_and_destroy (self, slot, data)
 

Protected Member Functions

 _spi_cs (self, value)
 
 _spi_write (self, data)
 
bytes _spi_read (self, int len)
 
 _spi_readinto (self, bytearray buffer)
 
 _spi_write_readinto (self, tx_buffer, bytearray rx_buffer)
 
 _get_ephemeral_keypair (self)
 
 _hkdf (self, salt, shared_secret, length=1)
 
 _x25519_exchange (self, private_bytes, public_bytes)
 
 _aesgcm (self, key)
 
- Protected Member Functions inherited from tropicsquare.TropicSquare
 _l2_get_response (self)
 
 _l2_get_info_req (self, object_id, req_data_chunk=GET_INFO_DATA_CHUNK_0_127)
 
 _l2_handshake_req (self, ehpub, p_keyslot)
 
 _l2_get_log (self)
 
 _l2_encrypted_command (self, command_size, command_ciphertext, command_tag)
 
 _l2_encrypted_session_abt (self)
 
 _l2_sleep_req (self, sleep_mode)
 
 _l2_startup_req (self, startup_id)
 
 _call_command (self, data)
 

Protected Attributes

 _spi
 
 _cs
 
 _gpo
 
- Protected Attributes inherited from tropicsquare.TropicSquare
 _secure_session
 
 _certificate
 

Additional Inherited Members

- Public Attributes inherited from tropicsquare.TropicSquare
 public_key
 

Constructor & Destructor Documentation

◆ __init__()

tropicsquare.ports.micropython.TropicSquareMicroPython.__init__ (   self,
  spi,
  cs,
  gpo = None 
)

Reimplemented from tropicsquare.TropicSquare.

Member Function Documentation

◆ _aesgcm()

tropicsquare.ports.micropython.TropicSquareMicroPython._aesgcm (   self,
  key 
)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _get_ephemeral_keypair()

tropicsquare.ports.micropython.TropicSquareMicroPython._get_ephemeral_keypair (   self)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _hkdf()

tropicsquare.ports.micropython.TropicSquareMicroPython._hkdf (   self,
  salt,
  shared_secret,
  length = 1 
)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _spi_cs()

tropicsquare.ports.micropython.TropicSquareMicroPython._spi_cs (   self,
  value 
)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _spi_read()

bytes tropicsquare.ports.micropython.TropicSquareMicroPython._spi_read (   self,
int  len 
)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _spi_readinto()

tropicsquare.ports.micropython.TropicSquareMicroPython._spi_readinto (   self,
bytearray  buffer 
)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _spi_write()

tropicsquare.ports.micropython.TropicSquareMicroPython._spi_write (   self,
  data 
)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _spi_write_readinto()

tropicsquare.ports.micropython.TropicSquareMicroPython._spi_write_readinto (   self,
  tx_buffer,
bytearray  rx_buffer 
)
protected

Reimplemented from tropicsquare.TropicSquare.

◆ _x25519_exchange()

tropicsquare.ports.micropython.TropicSquareMicroPython._x25519_exchange (   self,
  private_bytes,
  public_bytes 
)
protected

Reimplemented from tropicsquare.TropicSquare.

Member Data Documentation

◆ _cs

tropicsquare.ports.micropython.TropicSquareMicroPython._cs
protected

◆ _gpo

tropicsquare.ports.micropython.TropicSquareMicroPython._gpo
protected

◆ _spi

tropicsquare.ports.micropython.TropicSquareMicroPython._spi
protected

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