Description
The Antenna Packet Encryption Model handles the encryption and decryption of data packets transmitted and received by antennas. It provides configurable encryption schemes with varying levels of security and computational complexity, enabling realistic modelling of secure communication links. The model can be attached to any Transmitter or Receiver to encrypt outgoing data or decrypt incoming data using a shared symmetric key.
Example Use Cases
- Secure Command Uplink: Encrypt telecommand packets to prevent unauthorised spacecraft control.
- Protected Telemetry Downlink: Secure sensitive housekeeping or science data during transmission.
- Communication Security Analysis: Evaluate the impact of encryption key mismatches on data integrity.
- Interference Resistance: Use encryption to distinguish valid packets from noise or jamming signals.
- Multi-User Networks: Implement key-based access control for shared communication channels.
Module Implementation
The packet encryption model attaches to an Antenna component (either Transmitter or Receiver) and intercepts data packets during transmission or reception. When attached to a transmitter, the model encrypts outgoing packets before they enter the communication link. When attached to a receiver, the model decrypts incoming packets after they are received from the link.
Encryption Process
For a transmitter with an attached encryption model, each byte array is transformed before transmission:
where is the encryption function, is the original data, and is the encryption key.
For a receiver, the inverse operation is applied:
where is the decryption function. For successful communication, both endpoints must use the same encryption type and key.
Key Extraction
For encryption schemes requiring multiple key bytes, the 32-bit integer key is decomposed into four 8-bit components:
These key bytes are applied cyclically across the data:
Encryption Types
The model supports four encryption schemes with different characteristics:
| Type | Security | Reversibility | Description |
|---|---|---|---|
| None | None | N/A | Data transmitted in plaintext |
| Caesar | Very Low | Different operations | Single-byte shift cipher |
| XOR | Low | Self-reversing | Bitwise exclusive-or with key |
| Vigenère | Low-Medium | Different operations | Multi-byte shift cipher |
None (Plaintext)
When set to None, no encryption is applied and data passes through unchanged:
This mode is useful for debugging or when encryption is handled by higher-level protocols.
Caesar Cipher
The Caesar cipher applies a constant byte shift to all data bytes using the key modulo 256:
Encryption:
Decryption:
The modulo 256 operation ensures the result remains within the valid byte range [0, 255], with automatic wrapping for overflow and underflow.
XOR Cipher
The XOR cipher applies a bitwise exclusive-or operation between each data byte and the corresponding key byte:
This cipher is self-reversing, meaning the same operation encrypts and decrypts:
The XOR cipher has the property that:
making it computationally efficient as only one function is required for both operations.
Vigenère Cipher
The Vigenère cipher extends the Caesar cipher by using all four bytes of the key as a repeating sequence:
Encryption:
Decryption:
This provides improved security over Caesar by varying the shift amount across the data, making frequency analysis more difficult.
Enable/Disable Control
The encryption model includes an enable flag that allows encryption to be toggled without removing the model:
This enables runtime control of encryption without reconfiguring the communication link.
Key Mismatch Effects
When transmitter and receiver use different keys, the decrypted data will not match the original:
For Caesar cipher with keys and :
For XOR cipher:
For Vigenère cipher:
These relationships can be used to analyse the effects of partial key knowledge or key synchronisation errors.
Integration with Antenna
When the encryption model is attached to an antenna, it automatically registers itself:
This registration allows the Transmitter and Receiver to access the encryption functions during data transfer. Upon detachment or destruction, the reference is cleared:
Byte Overflow Handling
All arithmetic operations use byte-level modular arithmetic, ensuring values wrap correctly:
This guarantees that encrypted data remains valid byte sequences regardless of key values.
Assumptions/Limitations
- The encryption model uses symmetric key cryptography; asymmetric (public/private key) schemes are not supported.
- The key is limited to a 32-bit integer; longer keys for stronger encryption are not available.
- The encryption schemes provided are for simulation purposes and do not represent cryptographically secure algorithms.
- No key exchange protocol is modelled; both endpoints must be configured with matching keys manually.
- The model operates on raw bytes; no padding or block alignment is performed.
- Encryption is applied per-packet; cross-packet cipher chaining is not implemented.
- The model does not simulate encryption/decryption computational delays.
- Authentication and integrity verification (e.g., MAC, digital signatures) are not included.
- The XOR cipher with a zero key provides no encryption effect.
- Key management, rotation, and revocation are