LS47 Encrypt¶
Overview¶
This is a slight improvement of the ElsieFour cipher as described by Alan Kaminsky. We use 7x7 characters instead of original (barely fitting) 6x6, to be able to encrypt some structured information. We also describe a simple key-expansion algorithm, because remembering passwords is popular. Similar security considerations as with ElsieFour hold.
The LS47 alphabet consists of following characters: _abcdefghijklmnopqrstuvwxyz.0123456789,-+*/:?!'()
A LS47 key is a permutation of the alphabet that is then represented in a 7x7 grid used for the encryption or decryption.
Status¶
| Field | Value |
|---|---|
| Implementation | Partial |
| Parity | Unknown |
| Availability | Available |
| Input requirement | Required |
| Features | none |
| Side effects | [Random] |
| Deterministic | false |
Input¶
Declared input type: String.
Output¶
Declared output type: String. Redirect stdout or use --output-file for exact binary bytes.
Arguments¶
| # | Argument | Type | Required | Default | Allowed | Sensitive | Description |
|---|---|---|---|---|---|---|---|
| 1 | Password | Bytes |
yes | <empty> |
— | yes | Password used to derive the key |
| 2 | Padding | Integer |
no | 10 |
— | no | Amount of random padding to add |
| 3 | Signature | String |
no | <empty> |
— | no | Signature to append to the end of the plaintext |
Implementation¶
The implementation is in src/operations/ls47_encrypt.rs and declares String input and String output. The operation module owns conversion and domain-error rules; registry resolution, argument validation, input-requirement enforcement, tracing, and output validation are performed by rxchef::execution.
Command-line use¶
This operation requires input. Supply literal UTF-8 with --input, exact bytes with --input-file, or pipe bytes on stdin.
rxchef run "LS47 Encrypt" --input-file input.bin --output-file output.bin
Arguments may be supplied positionally in the table order or by name with repeatable --arg NAME=VALUE. Omitted optional arguments use the documented defaults.
Pipeline use¶
Place the operation anywhere a String value is valid. Its String result becomes the next step's input. Compact syntax uses the operation name followed by comma-separated arguments; JSON/YAML recipes use an op field and an args array.
Error conditions¶
Schema violations are rejected before the operation runs. Malformed input, unsupported parameter combinations, unavailable optional backends, and domain processing failures produce structured errors and a non-zero CLI status; partial output is never reported as success.
CyberChef compatibility¶
Parity status: Unknown. Unknown records an unassessed compatibility claim; it does not imply equality or incompatibility.
Security considerations¶
Declared side effects: [Random]. Treat parser inputs as untrusted and apply execution limits to large data. Arguments marked sensitive in the schema are redacted from metadata-aware History displays.
Testing evidence¶
Correctness tests: - tests/tests/operations/ls47_encrypt.rs
Performance classification¶
Excluded from the committed representative benchmark set: No stable representative benchmark case is defined; operation remains Partial until performance evidence is reviewed.