Bases: oppy.cell.cell.Cell
A container class for representing fixed-length cells.
Pad cell_bytes to uniform length.
Length depends on the Link Protocol version in use.
Parameters: |
|
---|---|
Returns: | str cell_bytes padded to a fixed-length |
Build and return the raw bytes this cell represents.
Parameters: | trimmed (bool) – ignored |
---|---|
Returns: | str byte representation of this cell. |
Bases: cell.fixedlen.FixedLenCell
Note
tor-spec, Section 5.1
Build and return a Create2 cell, using default values where possible.
Automatically create and use an appropriate FixedLenCell.Header.
Parameters: |
|
---|---|
Returns: | Create2Cell |
Construct and return the byte string represented by this cell.
Parameters: | trimmed (bool) – If True, return just the cell bytes with no padding. Otherwise, pad cell bytes out to fixed-length size according to Link Protocol version in use. |
---|---|
Returns: | str formatted byte string represented by this cell |
Bases: cell.fixedlen.FixedLenCell
Note
tor-spec, Section 5.1
Construct and return the byte string represented by this cell.
Parameters: | trimmed (bool) – If True, return just the bytes without padding. Otherwise, pad length out to fixed-length cell size according to Link Protocol version in use. |
---|---|
Returns: | str raw byte string this cell represents. |
Bases: cell.fixedlen.FixedLenCell
Note
Not Implemented.
Bases: cell.fixedlen.FixedLenCell
Note
Not Implemented.
Bases: cell.fixedlen.FixedLenCell
Note
Not Implemented.
Bases: cell.fixedlen.FixedLenCell
Note
Not Implemented.
Bases: cell.fixedlen.FixedLenCell
Note
tor-spec, Section 5.4
Build and return a Destroy cell, using default values where possible.
Automatically create and use an appropriate FixedLenCell.Header.
Parameters: |
|
---|---|
Returns: | DestroyCell |
Construct and return the byte string represented by this cell.
Parameters: | trimmed (bool) – If True, return just the bytes without padding. Otherwise, pad length out to fixed-length cell size according to Link Protocol version in use. |
---|---|
Returns: | str raw byte string this cell represents |
Bases: cell.fixedlen.FixedLenCell
Note
EncryptedCell is not a defined cell type in tor-spec, but we use it as a convenient way to represent RELAY cells or RELAY_EARLY cells that have either been encrypted by oppy or received from the network and have not been decrypted yet.
Build and return a Destroy cell, using default values where possible.
Automatically create and use an appropriate FixedLenCell.Header. The early parameter specifies whether we should send a RELAY cell or a RELAY_EARLY cell.
Warning
RELAY_EARLY cells should always be used during circuit creation to avoid certain classes of attacks. That is, whenever oppy sends a relay EXTEND2 cell, it would be sent as a RELAY_EARLY cell instead of a RELAY cell.
Reference: tor-spec, Section 5.6
Parameters: |
|
---|---|
Returns: | EncryptedCell |
Bases: cell.fixedlen.FixedLenCell
Note
tor-spec.txt, Section 4.5
Build and return a Destroy cell, using default values where possible.
Automatically create and use an appropriate FixedLenCell.Header.
Parameters: |
|
---|---|
Returns: | NetInfoCell |
Bases: cell.fixedlen.FixedLenCell
Note
tor-spec, Section 3, 7.2.
Note
Padding has no cell payload fields so, we just use inherited fields.