add xmasspirit solve
This commit is contained in:
@@ -9,4 +9,24 @@ letter?
|
||||
|
||||
## Flag
|
||||
|
||||
HTB{4ff1n3_c1ph3r_15_51mpl3_m47h5}
|
||||
|
||||
- See letter.pdf
|
||||
|
||||
## How to solve
|
||||
|
||||
See `decrypt.py`
|
||||
|
||||
## Progress
|
||||
|
||||
### Code analysis:
|
||||
- Choose a `randint` `a` from `1` to `mod`, that is not divisible by mod.
|
||||
- Choose a `randint` `b` from `1` to `mod`.
|
||||
- for each byte in `dt`
|
||||
- calculate `(a * byte + b) % mod`
|
||||
- append to output bytes
|
||||
- return bytes when done
|
||||
|
||||
### Notes
|
||||
|
||||
- `s_next = (a * s_prev + b) mod p` is a linear congruential generator
|
||||
|
||||
Reference in New Issue
Block a user