Rating:

## Solution

Based on the variable names, we can infer that this is probably __RSA__. However, the numbers are either encoded or encrypted in some way.

A quick way to gain insight on what kind of encoding this might be is by looking at the unique characters that we are dealing with.

```python
alphabet = set(N + e + c)
print(len(alphabet))
>>> 10
print(''.join(alphabet))
>>> AblgBZSETO
```

Since the number of unique characters used is `10` then this probably means that there is just some mapping between the characters `0123456789` and `AblgBZSETO`.

One of the first mappings I tried just in sorted order
```python
print(''.join(sorted(alphabet)))
>>> ABEOSTZbgl # -> 0123456789
```

But this did not work. A key insight that you need to get is that some of the characters look similar actual numbers, like `B to 8` and `O to 0`. If we base the mapping based on how much they look alike we get the following mappings

```
0 -> O
1 -> l
2 -> Z
3 -> E
4 -> A
5 -> S
6 -> b
7 -> T
8 -> B
9 -> g
```

And based on that we can get the actual values for `N`, `e`, and `c`.

We start with a standard attack on `RSA` with [`RsaCtfTool.py`](https://github.com/Ganapati/RsaCtfTool) to get the flag.

`noxCTF{RSA_1337_10rd}`

__For the implementation see the link__

Original writeup (https://github.com/pberba/ctf-solutions/tree/master/20180907_nox/wtf).