Session¶
-
class
lascar.session.
Session
(container, engine=None, engines=None, output_method=None, output_steps=None, name='Session', progressbar=True)[source]¶ Bases:
object
This class is leading side-channel operation in lascar.
a
lascar.session.Session
object’s role is to:- get batch of side channel traces from a Container, ‘container’
- distribute the batchs to the registered engines. ‘engines’
- manage outputs thanks to ‘output_method’, ‘output_step’
Parameters: - container – the container that will be read during the session. Only mandatory argument for constructor.
- engine – lascar engine to be registered by the Session
- engines – list of lascar engines to be registered by the Session
- output_method – specify the output method: how will the results from the engine will be manipulated. see lascar/output for more info.
- output_steps – specify when the Session will ask its engines to compute results.
- name – name given for the Session.
- progressbar – Will the Session display a progressbar during its process.
-
add_engine
(engine)[source]¶ Add an engine to the session
Parameters: engine – engine to be added Returns: None
-
add_engines
(engines)[source]¶ Add a list of engines to the session
Parameters: engines – list of engines to be added Returns: None
-
output_method
¶
-
output_steps
¶
-
run
(batch_size=100, thread_on_update=True)[source]¶ Core function of Session: read all traces from the container, and distibute them to the engines, and manage results
Parameters: - batch_size – the size of the batch that will be read from the container.
- thread_on_update – will the engine be updated on different threads?
Returns: